Compass指南者GPS目的地

编程入门 行业动态 更新时间:2024-10-26 18:30:21
本文介绍了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目的地

本文发布于:2023-11-15 16:32:19,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1596116.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:目的地   指南   Compass   GPS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!