Well, everything is possible, and if the truck routes are continuous then it shouldn't be too difficult. However, if the routes are segmented, you'd be looking at something similar to the "travelling salesman" problem, which is tough to solve because the number of possible permutations increases exponentially with every destination, (or in your case with every route segment), that you add to the equation.
If the routes are continuous, one possible strategy, (from the top of my head), might be: The first thing to do would be to build some array containing information about the truck routes, mainly their endpoints. Then, Suppose you need directions from A to B, which are two points on an East-West line: - build a rectangle (GLatLngBounds) extending from A to B and some distance to both sides of the road, (north and south of the line A-B). - Then check if there are any truck routes inside that rectangle. - If yes, then check if those routes go roughly in the same direction as the direct route from A to B. Suppose three of them do. - Next you need to decide which of those 3 routes to use, and for that you can get directions 3 times, once with each truck route included, and then choose one of the three results. Just some thoughts. :-) -- Marcelo - http://maps.forum.nu -- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Maps-API?hl=en -~----------~----~----~----~------~----~------~--~---
