I cannot find a proper method to calculate the distance from a point(lat/long) to a Route object. Any suggestions?
This is a discussion on Calculate distance from a point to a route within the MapPoint Desktop Discussion forums, part of the Map Forums category; I cannot find a proper method to calculate the distance from a point(lat/long) to a Route object. Any suggestions?...
I cannot find a proper method to calculate the distance from a point(lat/long) to a Route object. Any suggestions?
Well, which bit of the route?
You will need to loop over the route. The waypoints are all available for distance measuring.
The directions also have location objects but these are intended to be "ideal viewpoints" - ie. there's no guarantee that they are actually on the route.
If your route can be recalculated as a shortest route, then adding frequent rest stops may be useful. You can then measure the distance to each of the rest stops.
Richard
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
Thanks, I needed to check if a car follows a route.
There are currently 1 users browsing this thread. (0 members and 1 guests)