Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jan 13, 2009, 08:32 AM   #1
arnieterm
macrumors regular
 
Join Date: Aug 2008
Calculate distance?

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

Last edited by arnieterm; Jan 13, 2009 at 08:42 AM.
arnieterm is offline   0 Reply With Quote
Old Jan 13, 2009, 08:36 AM   #2
detz
macrumors 65816
 
Join Date: Jun 2007
If you know the lat/lng you can use Location Manager to calculate the distance.

Google CLLocationManager
detz is offline   0 Reply With Quote
Old Jan 13, 2009, 08:58 AM   #3
arnieterm
Thread Starter
macrumors regular
 
Join Date: Aug 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
arnieterm is offline   0 Reply With Quote
Old Jan 13, 2009, 09:02 AM   #4
detz
macrumors 65816
 
Join Date: Jun 2007
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".
detz is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Calculate Gravity larswik iPhone/iPad Programming 10 May 29, 2014 06:43 PM
Siri cannot calculate... Husky1992 iOS 7 16 Jan 31, 2014 12:03 PM
Calculate Windchill Dock Status iPhone and iPod touch Apps 0 Jan 5, 2013 12:23 AM
Understanding how to calculate percentages! Dock Status iPad Apps 0 Oct 8, 2012 09:00 PM
Calculate Percentages Dock Status iPhone and iPod touch Apps 0 Oct 8, 2012 08:58 PM

Forum Jump

All times are GMT -5. The time now is 06:32 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC