Marco Batista
Marco Batista

Reputation: 1428

osmdroid MapView IconOverlay - Is there a way to change the size of the icon?

In my app I have a map which is "powered" by GoogleMaps, but sometimes there is a need to use the map offline, so I decided to add support to osmdroid. With a few adjustments to my previous code I managed to get it working it all the features that the GoogleMaps one had.

Now my problem.. in GoogleMaps' mapView the icons appear like the one in the following image:

GoogleMaps icon

But in the OSM's mapView the icon is very big and blurry:

OSM icon

I tried to reduce the size of the image (the *.png object) to see if that was the problem, but the icons remained big and blurry, my guess is that osmdroid is for some reason scaling the icons to a predetermined sized, is there a way to change it?

I have searched around for a couple of hours and I haven't found anything useful yet, so I decided to try my luck around here. Thank you :)

Upvotes: 4

Views: 3871

Answers (1)

Marco Batista
Marco Batista

Reputation: 1428

By chance a friend of mine stumbled across the answer, Issue 331

The issue was solved in a revision, here's what I did:

get:

then add them to your project and then extend/use these files instead of the osmdroid's library files. With this I managed to get the icon to look like the ones in Google Maps (except the shadow, but that wasn't something that I realy wanted)

fixede OSM icon

Upvotes: 1

Related Questions