Calculate distance from a point to a route

zflavia
11-01-2007, 09:09 AM
I cannot find a proper method to calculate the distance from a point(lat/long) to a Route object. Any suggestions?

Winwaed
11-02-2007, 08:43 AM
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

zflavia
11-05-2007, 10:14 AM
Thanks, I needed to check if a car follows a route.

 
Web mp2kmag.com
mapforums.com