PDA

View Full Version : MKMapKit




Nnavick
Apr 11, 2011, 02:53 PM
Hi ,
How can I find the distance between my current location and a dropped pin?

Thank you !!



jnoxx
Apr 12, 2011, 06:24 AM
Hi ,
How can I find the distance between my current location and a dropped pin?

Thank you !!

Make a math function that calculates the difference between the latitude/longitudes..

Nnavick
Apr 12, 2011, 07:56 AM
Do you now what is the function?

robbieduncan
Apr 12, 2011, 08:06 AM
A quick Google search gives us this: http://www.movable-type.co.uk/scripts/latlong.html

Note the suggestion was that you write this function yourself...

Nnavick
Apr 12, 2011, 09:42 AM
HAHA

I found at the core location a function that does it

CLLocationDistance distance = [newLocation distanceFromLocation:Newloc]/1000;