动画在谷歌MapView的标志 [英] Animate markers on Google MapView

查看:140
本文介绍了动画在谷歌MapView的标志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一个Android应用程序,显示在谷歌MapView的多个标记。一切完美,但我想的标记,当他们出现在地图上有一个动画。

I am working on an Android app that displays multiple markers on a Google MapView. Everything works perfectly but I would like the markers to have an animation when they appear on the map.

这里对iPhone类似的例子。见1'20。

Here's an example of something similar on iPhone. See 1'20".

下面是我如何将它们添加到我的图形页面。

Here is how I add them to my MapView.

for(int i=0; i<myMarkerList.length(); i++){
GeoPoint x = new GeoPoint(
                (int)(lat*1E6),
                    (int)(lng*1E6));

        oItem = new OverlayItem(x, title, String.valueOf(nb_marker));
        pin.setAlpha(255);
        oItem.setMarker(pin);           

        if (oItem != null)              
            mapOverlay.addOverlay(oItem); // add the overlay item to the overlay            
        }              
        mapOverlays.add(mapOverlay); // add the overlay to the list of overlays
        mapView.invalidate(); // update the map shown

有等iPhone pretty,必须有人已经做了类似的事情在Android上,但我似乎无法找到任何有用的信息。

It is so pretty on iPhone, and someone must have already done something similar on Android but I can't seem to find any useful info.

编辑:好了,所以我侦察我要么重写这将是漫长的抽签方法,而不是那个pretty,或者干脆放弃使用OverlayItems

Okay so I recon I either have to override the draw method which will be long and not that pretty, or just give up with OverlayItems.

感谢您的时间。

最好的问候,

汤姆

推荐答案

所以我把它用ImageViews简单的ArrayList和动画对他们的工作,没有MapOverlay。

So I got it to work using a simple ArrayList of ImageViews and animation on them, no MapOverlay.

这篇关于动画在谷歌MapView的标志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆