Calculate distance?

Discussion in 'iOS Programming' started by arnieterm, Jan 13, 2009.

  1. macrumors regular

    Aug 28, 2008
    For an iphone application that communicates with a google datastore table containing co-ordinates [Latitude n Longitude]. For a given venue record as fetched from datastore table and iphone location [Lat n Long] as obtained from Core Location framework, can it be possible to calculate distance in miles between these two locations?
    The location values both in datastore as well as ones returned by iphone core location are all in double
    How can it be done?
  2. macrumors 65816

    Jun 29, 2007
    If you know the lat/lng you can use Location Manager to calculate the distance.

    Google CLLocationManager
  3. thread starter macrumors regular

    Aug 28, 2008
    I have seen the core location framework sample earlier but it is missing now. Can you tell me how to calculate distance?
    I am also searching for core location sample
  4. macrumors 65816

    Jun 29, 2007
    Go to XCode, Open up Documentation under the Help menu and type


    Read. I don't mean to be a jerk but if you can't figure out how to use the documentation when it's right there how can you expect to create a solid application?

    I'm teaching you to fish instead of giving you the fish. ;-)

    Either that or ask a specific question, not "show me how to do it".

Share This Page