Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top