0

I've tested the GSP Sample project provided with Windows Mobile 6 SDK.

Let's say that I have my destination point coordinates (Latitude & Longitude). Basing on that sample app and doing the math Calculate distance between 2 GPS coordinates I can obtain the distance between my location and the destination point.

But this calculation assumes a straight line between these points, and won't be correct, because I go along the streets etc.

So, I want to know how to make that distance calculation right while my movement - according to the determined route. Is there any libraries (C#) or maybe some APIs which will be useful ? I don't need to show the route for the user.

Community
  • 1
  • 1
Tony
  • 12,405
  • 36
  • 126
  • 226

1 Answers1

1

You have to use some navigation software API, ie Google Maps API, to get the way points and then calculate the sum of the distances between the way points (or just query the navigation API for the distance):

Waypoints API

directions API

Some Windows Mobile/Windows CE navigation software also provides API for this calculation, ie ALK CoPilot, these work also offline, whereas Gooogle API needs an online internet connection.

josef
  • 5,951
  • 1
  • 13
  • 24
  • I was thinking about Google Maps API, but in that approach I suppose I should set some time interval for each API request because it's very likely that I move faster than my device gets response from the API server. Don't you think ? – Tony Jan 27 '14 at 08:39
  • Using online service may always fail or delay. To overcome this you only have the option to use a local (offline) navigation software SDK. OTOS think about how often and how precise the distance information you want to show has to be. – josef Jan 28 '14 at 07:35