I would like to be able to calculate distance based upon movement, as in user taps a start button and then when they reach their destination they tap a stop button. The app would calculate the actual distance travelled between the two points.
I have the mapkit working in that I can get the start location and the map tracks movement I just need to add in the calculation of distance.
Is this possible? If so any sample code would be much appreciated.
well what you could do is, record the user’s coordinates when he hits start. The record his coordinates when he hits stop. Then you could use the CoreLocation framework to calculate the distance between the two points.
EDIT
I see now that you want the distance actually travelled by the person. I know that in the new IOS you can make use of the direction functionality, so what you could do is record the distance traveled every time the user changes the direction, and then add everything up when they hit STOP
EDIT
you can check out some of apple’s sample code