Android的:做一个箭头指向一个目标基于设备的方向和用户位置(经纬度)。 [英] Android: Make an arrow point to a destination (LatLng) based on device orientation and user location.
问题描述
我正在开发基于地理定位的Android应用程序,这是一个实际指南。而且我真的需要这部分帮助:
I am developing an android app based on geolocation, It's a Guide actually. And I really need help in this part :
让我们假设有:
- 的经度和放大器;在地图上的一个点(L)的纬度。
- 的经度和放大器;其中用户站的点(I)的纬度。
- 显示一个箭头的活动。
我怎么能作出这样的箭头指向点L? (根据课程的时候,我的,并在设备的方向)
How can I make that arrow point to the point L ? (Based of course on the point I, and on the device's orientation)
我不要求为code。这将是太多问。我只需要推理。或者,也许一个简单的方法来做到这一点?图书馆?一个框架?数学公式?我真的不能在任何地方找到答案。
谢谢。
很抱歉,如果它已经被问。
I am not asking for code. It would be too much asked. I Just need the reasoning . Or maybe a simple method to do this ? a library? a framework? mathematical formula ? I really can't find an answer anywhere. Thank you. Sorry if it has already been asked.
推荐答案
的的的部分=http://www.movable-type.co.uk/scripts/latlong html的相对=nofollow>此页面应该给你正是你需要的。
The bearing section of this page should give you exactly what you need.
仅供参考,我的谷歌查询是
FYI, my google query was
两点之间的罗盘方向
这篇关于Android的:做一个箭头指向一个目标基于设备的方向和用户位置(经纬度)。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!