Map Marker icon animation (Google Maps API V2 for Android)

天涯浪子 提交于 2019-12-29 07:19:36

问题


On a custom event, I need my Marker to update its drawable 6 times (basically, I want the Marker to grow and shrink 3 times with a delay of 0.5 s between each growth and each shrink) so it notifies the user of said event.

Is there any way to achieve this without actually having to remove the Marker and adding it again with a different Drawable?


回答1:


I'm afraid there is no way to do it today without actually removing the marker and adding it again with another drawable. I have just done so myself in an attempt to create a progress bar. It works, but it is an awkward way of doing it.

Click here for a good explanation in another thread.




回答2:


Marker has a new function added as of rev.7 of API v2. Marker.setIcon. Have fun animating.



来源:https://stackoverflow.com/questions/16340921/map-marker-icon-animation-google-maps-api-v2-for-android

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