Osmdroid MapView IconOverlay - is there a way to resize the icon?

In my application, I have a map that "works" from GoogleMaps, but sometimes there is a need to use the map offline, so I decided to add support for osmdroid. With some changes in my previous code, I managed to get it to work with all the functions that GoogleMaps had.

Now my problem .. on the GoogleMapsView map the same icons are displayed as in the following image:

GoogleMaps icon

But in OSM mapView, the icon is very large and blurry:

OSM icon

I tried to reduce the size of the image (* .png object) to see if this problem was, but the icons remained large and blurry, I believe that osmdroid for some reason scales the icons to a predetermined size, is there any way to change it?

I searched a couple of hours and I have not found anything useful yet, so I decided to try my luck here. Thanks:)

+4
source share
1 answer

Randomly my friend stumbled upon an answer, Problem 331

The problem was resolved by the editors, this is what I did:

we get:

then add them to your project and then continue / use these files instead of the osmdroid library files. With this, I managed to get an icon similar to the one that was on Google Maps (except for the shadow, but that was not what I really wanted)

fixede OSM icon

+1
source

Source: https://habr.com/ru/post/1446341/


All Articles