MKMapKit

Discussion in 'iOS Programming' started by Nnavick, Apr 11, 2011.

  1. macrumors regular

    Joined:
    Oct 13, 2010
    #1
    Hi ,
    How can I find the distance between my current location and a dropped pin?

    Thank you !!
     
  2. macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #2
    Make a math function that calculates the difference between the latitude/longitudes..
     
  3. thread starter macrumors regular

    Joined:
    Oct 13, 2010
  4. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #4
  5. thread starter macrumors regular

    Joined:
    Oct 13, 2010
    #5
    HAHA

    I found at the core location a function that does it

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

Share This Page