确定两个坐标之间的距离和路线 [英] Figuring out distance and course between two coordinates
问题描述
我有2个坐标,想做一些看似简单的事情。我想弄清楚,给定:
I have 2 coordinates and would like to do something seemingly straightforward. I want to figure out, given:
1)坐标A
2)课程由核心位置提供
3)坐标B
1) Coordinate A 2) Course provided by Core Location 3) Coordinate B
以下内容:
1)A和B之间的距离(目前可以使用distanceFromLocation完成),那个就可以了。
2)从A到B应该采取的课程(与当前旅行的课程不同)
1) Distance between A and B (can currently be done using distanceFromLocation) so ok on that one. 2) The course that should be taken to get from A to B (different from course currently traveling)
有没有一种简单的方法可以实现这一点,任何第三方或内置API?
Is there a simple way to accomplish this, any third party or built in API?
Apple似乎没有提供此功能,但我可能错了。
Apple doesn't seem to provide this but I could be wrong.
谢谢,
~Arash
Thanks, ~Arash
编辑:
感谢快速回复,我相信那里可能有些困惑,我希望得到路线(从点a到点b以度为单位,使得0度=北,90度=东,类似于CLLocation返回的路线值。不试图计算实际转弯转向指示。
Thanks for the fast responses, I believe there may have been some confusion, I am looking to get the course (bearing from point a to point b in degrees so that 0 degrees = north, 90 degrees = east, similar to the course value return by CLLocation. Not trying to compute actual turn by turn directions.
推荐答案
这篇关于确定两个坐标之间的距离和路线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!