Add GIF Image to Google Map Api v2 Map Marker

When I add a GIF image to the google map V2 marker, the image is displayed, but it stops moving. What for? And how can I solve this problem and make the image my movement?

Hope someone can help me. Thanks in advance.

+4
source share
1 answer

The marker icon in google maps android api v2 is a static image, and you cannot change the icon after creating the marker. Therefore, if you try to include any animation using GIF images, it will not be supported, and only one GIF image will be displayed as an icon.

The option to achieve changing the marker image is to programmatically remove() marker after a certain time, and then immediately add the marker using addMarker with another image set as an icon in MarkerOptions() and saving other properties.

+4
source

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


All Articles