0

Possible Duplicate:
GPS coordinates in degrees to calculate distances

Hi friends I am new iPhone developer.

I am working with the iOS GPS to find the distance between my current location and a previous location.

First of all I don't know how to find my current location. Please tell me.

I have a method that is called to find my current location and previous location. I can only get the current location from CoreLocation - how can I get hold of my previous location.

I am fully confused please help me.

Community
  • 1
  • 1
Durga
  • 933
  • 1
  • 9
  • 12

1 Answers1

0

Check out this basic tutorial on using CoreLocation iOS Core Location GPS Tutorial . It explains in simple terms how to obtain a location, save it and do simple calculations with other locations.

To calculate the distance between to coordinates use the distanceFromLocation: method.

Niels Castle
  • 8,039
  • 35
  • 56
  • hi Niels Castle thank you so much it is very use full for me. – Durga Aug 25 '11 at 10:35
  • hi Niels i am running with core location demo app in device current location is showing successfully but when ever i move location is not updated what is the reason please tell me. – Durga Aug 25 '11 at 10:54
  • If u don't mind please tell me distance calculation concept also. – Durga Aug 25 '11 at 10:56
  • @Durga I think you respect the answer by accepting it or upvoting it. – Gaurav Shah Aug 25 '11 at 11:09
  • See question http://stackoverflow.com/questions/3905896 for a description of calculating distance between two locations. Follow the steps in the tutorial referenced and take a walk down the street - you should then see the location get updated. – Niels Castle Aug 25 '11 at 18:58