Wednesday, 7 August 2013

Is there a way that I can tell the direction request to stay on one road while it plots the start to end?

Is there a way that I can tell the direction request to stay on one road
while it plots the start to end?

Is there a way that I can tell the direction request to stay on one road
while it plots the start to end?
For an Example:
Request:
Say Start (Lat/Lon) and End (Lat/Lon) are on the Route US1.
Say Interstate i-95 runs parallel along Route US1 at the above Start to
End segment.
API route direction request for the above Start to End.
Map Route Shows:
Starts at Start point on route US1.
Takes the exit from US1 to run the route on i-95.
Just before the End point, takes the exit from i-95 to US1 and ends at the
End point on Route US1.
Current Behavior:
Above Routing is understandable that Google API plots the direction on the
fastest route and so API takes route i-95 which is parallel to that
segment of the US1.
My Requirement:
Is there parameter that I can specify in the below direction request to
always stay on the US1 route, regardless of any faster/quicker/shorter
alternate route?
var request = {
origin:start,
destination:end,
travelMode: google.maps.DirectionsTravelMode.DRIVING
};
Thanks and Appreciate any response!
Arif

No comments:

Post a Comment