Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add GIF image to marker of Google Map Api v2

When I add GIF Image to marker of google map V2 the image is shown but it stops its movement. Why? And how can I solve this issue and make the image do its movement?

Hope anyone can help me. Thanks in advance.

like image 637
Eman87 Avatar asked Oct 03 '22 00:10

Eman87


1 Answers

Marker Icon in google maps android api v2 is a static image and you cannot change the icon once you have created the marker. So if you are trying to include any animation using GIF images, it will not be supported and only a single image from the GIF will be shown as the icon.

An option to achieve changing marker image is to programatically remove() the marker after a certain time and then immediately add the marker using addMarker with a different image set as icon in MarkerOptions() and retaining other properties.

like image 151
tony m Avatar answered Oct 07 '22 20:10

tony m