谷歌地图的当前位置标记和准确性半径覆盖 [英] Google Maps current location marker and accuracy radius overlay
问题描述
我怎么能显示在谷歌地图Android的API V2闪烁省略号和一个圆演示用户的当前位置,准确度(蓝色叠加)?
How can I display a blinking ellipsis and a circle demonstrating user's current location and the accuracy (blue overlay) on Google Maps Android API v2?
要更具体地讲,我怎么能有一个动画绘制像一个谷歌使用?我怎么能显示一个圆圈为蓝色覆盖(25%字母或类似的东西)?
To be more specifically, how can I have an animated drawable like the one Google uses? And how can I display a circle as a blue overlay (25% alpha or something like)?
感谢。
推荐答案
其实,解决的办法是比我想象的简单。
Actually, the solution is simpler than I thought.
在使用谷歌地图Android的API V2,该GoogleMap的对象有一个名为setMyLocation方法。如果设置为true,则地图API的我的定位布局将被激活,它会显示这个蓝色的省略号或箭头指示的方位。
When using Google Maps Android API v2, the GoogleMap object has a method called setMyLocation. If you set it to true, the my-location layout of the Maps API will be activated and it will display this blue ellipsis or an arrow indicating the bearing.
如果您需要在创建活动时,相机会自动移动到用户的位置,你需要按照这篇文章:<一个href="http://discgolfsoftware.word$p$pss.com/2012/12/06/google-maps-android-api-v2-mylocation-locationsource-and-event-handling/">http://discgolfsoftware.word$p$pss.com/2012/12/06/google-maps-android-api-v2-mylocation-locationsource-and-event-handling/
If you need to automatically move the camera to the user's location when the activity is created, you need to follow this article: http://discgolfsoftware.wordpress.com/2012/12/06/google-maps-android-api-v2-mylocation-locationsource-and-event-handling/
这篇关于谷歌地图的当前位置标记和准确性半径覆盖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!