myLocationOverlay改变标志 [英] myLocationOverlay change the marker

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

问题描述

我要如何更改默认蓝色的动画标记MyLocationOverlay在谷歌地图?

how do i change the default blue animated marker for MyLocationOverlay in google maps?

推荐答案

第1步:创建一个子类 MyLocationOverlay

Step #1: Create a subclass of MyLocationOverlay.

步骤#2:覆盖 drawMyLocation()键,但是你喜欢画的标记。请记住,这种方法不仅绘制了标记,但如果用户的位置移动屏幕的边缘附近,我们已经被赋予了 MapController 在我们的构造,我们将滚动到recenter了新的阅读。

Step #2: Override drawMyLocation() and draw the marker however you like. Bear in mind that this method not only draws the marker, but "if the user's position moves near the edge of the screen, and we've been given a MapController in our constructor, we'll scroll to recenter the new reading".

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

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