Add GIF image to marker of Google Map Api v2

会有一股神秘感。 提交于 2019-11-30 09:02:26

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/18715504/add-gif-image-to-marker-of-google-map-api-v2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!