简体   繁体   English

MyLocationOverlay 将标记更改为 Google Maps 默认值

[英]MyLocationOverlay change the marker to the Google Maps default

I'm investigating MapActivities, and what I'm attempting to do is to change the default marker of MyLocationOverlay from the default circle to the marker that google maps uses (the blue arrow head) Is there any easy way of doing that?我正在调查 MapActivities,我正在尝试做的是将 MyLocationOverlay 的默认标记从默认圆圈更改为谷歌地图使用的标记(蓝色箭头) 有没有简单的方法可以做到这一点? thanks in advance Here is an image with the current default maker http://blogs.conchango.com/photos/conchango_bloggers/images/13878/original.aspx在此先感谢这是当前默认制造商http://blogs.conchango.com/photos/conchango_bloggers/images/13878/original.aspx的图像

You have to draw the circle by yourself using onDraw() method of subclass of Overlay .您必须使用Overlay子类的onDraw()方法自己绘制圆。 Here is a Draw A Circle On Android MapView post how to do that.这是在 Android MapView 上画一个圆的帖子如何做到这一点。

And when talking about blue arrow head There is a list of drawable which are packaged in Android.jar .当谈到blue arrow head时,有一个可绘制列表,它们封装在Android.jar中。 You can access the using their ids, (if they are public) something like:您可以使用他们的 id 访问它们(如果它们是公开的),例如:

android.R.any_id

Have a look at this page .看看这个页面 specifically at ic_maps_indicator_current_position特别是在ic_maps_indicator_current_position

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM