Wasn't it Meyvn who wrote:
>
>Hey Mike thanks for the reply.
>I had a answer from someone a little while back saying:
>
>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.
>

It might work.

It probably needs some fairly serious smart code. Since you can only
modify the route by adding waypoints, I suspect that it might be quite
common to obtain directions that travel most of the way along the
original route, then make silly detours to visit a waypoint on one of
your preferred truck routes, make a u-turn and return to the original
route. A human being would spot the silliness immediately, but the sort
of common sense required to reject such routes is not easy to code.

If your preferred routes are dual carriageways, then you need to be
quite careful to add your waypoints on the correct carriageway. The
Google database seems to internally represent a dual carriageway as two
one-way streets. Consider this route:
        http://tinyurl.com/4nw3f4
Because waypoint "B" is a few feet too far South, it is considered to be
on the westbound carriageway. Because waypoints are mandatory, you get
back a route that performs a u-turn, and then winds its way back through
a housing estate. Exactly the sort of thing that you don't want to tell
your truck drivers to do.

I suggest that you look for some other routing service that supports the
facilities that you need. If necessary, export the routes and draw them
as dumb polylines on Google Maps or Google Earth.

-- 
http://econym.org.uk/gmap
The Blackpool Community Church Javascript Team


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to Google-Maps-API@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to