0

I'm working on a map application that should be like PokemonGO or something like that. I'm using Google Map API V2 and a simple MapActivity.

The marker uses a custom image and is centered over the location.

I need to change the size of the marker with a smooth animation (when clicked), I've tried to use this code but the marker size grows not centered and looks like this:

enter image description here

the yellow dot represents the location and as you can see is not centered.

Sad Hyena
  • 291
  • 3
  • 16

1 Answers1

0

Marker icon has options like:

icon.origin
icon.anchor
icon.size
icon.scaledSize

You have to change them according to new size.

icon = marker.getIcon();
user3828374
  • 99
  • 3
  • 11