开发者

Location Pointer and Distance Calculation

I need to calculate the开发者_如何学C distance between the current location(by getting latitude,longitude from GPS) and designation (mecca[mosque]) which is fixed. Please anyone guide me.

-Thanks in Advance.


Make use of

 [location1 distanceFromLocation:location2];

In your case

[currentLocation distanceFromLocation:meccaLocation];

Note that this returns the distance in CLLocationDistance


http://www.movable-type.co.uk/scripts/latlong.html

Excellent coverage of the subject.

Additional details are in Bowditch's American Practical Navigator.

And it may help to know this: 21° 25' 36" N / 39° 49' 34" E

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜