Reputation: 4382
I want to get a list of directions between two locations. Google Directions API says that the results are placed in routes array.
I tried directions using API and got only a single direction, but when searched in Google Maps with the search text as "Hall Bazar, Amritsar to Majitha Road, Amritsar", I got three route suggestions.
Please correct me if I misunderstood Google Directions API.
Upvotes: 1
Views: 1431
Reputation: 1
var request = {
origin: start,
destination: end,
travelMode: google.maps.TravelMode.DRIVING,
provideRouteAlternatives:true
};
put provideRouteAlternatives:true
Upvotes: -1
Reputation: 21091
Check the documentation, you need to ask for alternatives
&alternatives=true
Upvotes: 2