本文介绍了Compass指南者GPS目的地的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想旋转的的ImageView 从当前用户位置的一些previously保存GPS位置的箭头。如何做到这一点?
I want to rotate an ImageView with an arrow from the current user location to some previously saved GPS location. How do I do this?
时的初始轴承从 Location.distanceBetween 方法得到了正确的道路要走呢?如果是这样,我怎么使用它与指南针的读数?
Is the Initial Bearing got from the Location.distanceBetween method the right way to go on this? If so, how do I use it with the compass readings?
推荐答案您可以使用 bearingTo 在位置类的方法, 然后利用获取当前轴承 SensorManager.getOrientation 的方法。
You can use the bearingTo method in Location class, then retrieve the current bearing using the SensorManager.getOrientation method.
最后,将两个结果,绘制箭头。
Finally, adding both results, draw the arrow.
希望它帮助。
更多推荐
Compass指南者GPS目的地
发布评论