Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

arnieterm

macrumors regular
Original poster
Aug 28, 2008
201
0
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?
Thanks
Arnieterm
 

detz

macrumors 65816
Jun 29, 2007
1,051
0
If you know the lat/lng you can use Location Manager to calculate the distance.

Google CLLocationManager
 

arnieterm

macrumors regular
Original poster
Aug 28, 2008
201
0
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
 

detz

macrumors 65816
Jun 29, 2007
1,051
0
Go to XCode, Open up Documentation under the Help menu and type

getDistanceFrom

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".
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.