Question

I am nearly sure, that i have seen a method (provided by the Apple-SDK) a time ago, that could find the distance between 2 MKAnnotations. That time i havent seen a use in the funktion. But, how it goes, now i would like to have this function but i can´t find it anymore.

Can anyone please help me ? Maybe I have just something wrong in my mind or sth, but i have searched and i am a bit confused.

Was it helpful?

Solution 2

ok, on googles 10th page i have found it: http://developer.apple.com/library/ios/#documentation/CoreLocation/Reference/CLLocation_Class/CLLocation/CLLocation.html

distanceFromLocation: is what i have searched for

OTHER TIPS

You can use this

MKMapPoint point1 = MKMapPointForCoordinate(annotation1.coordinate);

MPMapPoint point2 = MKMapPointForCoordinate(annotation2.coordinate);

CLLocationDistance distance = MKMetersBetweenMapPoints(point1,point2);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top