[英]Map Marker icon animation (Google Maps API V2 for Android)
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. 在自定义事件中,我需要我的Marker
更新其可绘制对象6次(基本上,我希望Marker
进行3次增长和收缩,每次增长与每次收缩之间的延迟为0.5 s),以便它通知用户该事件。
Is there any way to achieve this without actually having to remove the Marker
and adding it again with a different Drawable
? 有什么方法可以实现此目的,而无需实际删除Marker
并使用其他Drawable
再次添加它?
Marker has a new function added as of rev.7 of API v2. 标记自API v2的修订版7起添加了新功能。 Marker.setIcon . Marker.setIcon 。 Have fun animating. 有趣的动画。
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. 单击此处在另一个线程中获得良好的解释。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.