0

Im using the built-in Apple maps Framework in my iOS app.For some reason it returns the geometrical distance in miles and not the driving distance.Is there any way to get the driving distance in Apple maps or even in google maps?

Parth Mody
  • 438
  • 1
  • 5
  • 17

1 Answers1

0

If you are referring to the recording the distance you have driven so far, there is no built in method for this. If you want to get the driving distance you will need to get the location of the phone every 5 seconds and then compute the distance each time and add it up, otherwise it will just give you the miles as if you were flying from point A to point B. You can make it more accurate if you change this to every 1 second, but it will take more battery... or you could do slightly less accurate and go every 20 seconds.

Ben
  • 609
  • 11
  • 19