View Full Version : Calculate distance?

Jan 13, 2009, 08:32 AM
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?

Jan 13, 2009, 08:36 AM
If you know the lat/lng you can use Location Manager to calculate the distance.

Google CLLocationManager

Jan 13, 2009, 08:58 AM
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

Jan 13, 2009, 09:02 AM
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".