Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 11 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
使用
MyLocationOverlay
。示例代码:Use
MyLocationOverlay
. Example code:也许这个答案可以解决您旋转图标的问题:https://stackoverflow.com/a/8712727/1127492
也可以考虑为8(或16)个主要方向准备8(或16)(小!)图标,并根据方位/8(分别为)来选择图标。 /16)。
May be this answer solves your problem with rotating the icon: https://stackoverflow.com/a/8712727/1127492
You may also consider preparing 8 (or 16) (small!) icons for the 8 (or 16) main directions and select the icon depending on bearing/8 (resp. /16).
以防万一有人再面临这个问题。
首先,这需要
LocationListener
和SensorEventListener
。 在这里您可以找到有关如何在此范围内使用它的更多详细信息。< /a>不管怎样,
Android Google Maps V2 Api
部分解决了这个问题,显示一个箭头指示您的方向,但只有当设备向其他方向移动时才会显示一个点。Just in case somebody is facing out this problem anymore.
First of all, this needs both
LocationListener
andSensorEventListener
. Here you can find more details of how to use it in this scope.Anyway,
Android Google Maps V2 Api
partially solves this problem, displaying an arrow indicating your orientation but only when the device is moving otherway a dot will be displayed.