android - 如何判断两个地理点的方向

标签 android point direction geopoints

我有 3 个地理点

(起始位置)11.986242477259117,79.84657287597656`

(中间位置)11.984521304799278, 79.84583258628845

(结束位置)11.985014568760436, 79.844491481781

我从 How to draw a path on a map using kml file? 得到了知识

而且我已经像这样在地理点之间画了线。

enter image description here

我已经使用 How to calculate distance between two locations using their longitude and latitude value 计算了距离

我的问题是,当用户站在“A”(起始位置)附近时,我想告诉方向,你必须像这样移动到“北”、“东”、“西”、“南”。

如果用户错误地移动了其他方向,需要像“You hav mov wrong direction”这样说并说出正确的方向。

如何获取两个地理点之间的方向?

我已经从 Get direction (compass) with two longitude/latitude points 获得了学位

它返回了一定程度,但我无法告诉正确的方向。

如何获取两个地理点之间的方向?

最佳答案

关于android - 如何判断两个地理点的方向,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11806776/

相关文章:

java - 为什么 Playscape SDK 找不到 JDK?

android - 管理注册的 GCM 服务

python - 添加随机加权点

android - 如何针对未知目的地实现 Google Directions API?

java - 在java中使用键盘以角度移动圆

vector - XNA 2D 矢量角 - 计算的正确方法是什么?

java - 如何复制 ByteBuffer 的内容?

java - 无法使用 Apache 从 Android 向 Django Web 服务器发出 http 请求

arrays - 在 Point Chart Flutter 中实现 List

java - Android OpenGL 点数组