Direction API return only one route when specify waypoints Direction API return only one route when specify waypoints json json

Direction API return only one route when specify waypoints


According to this article

Generally, only one entry in the routes array is returned for directions lookups, though the Directions service may return several routes if you pass alternatives=true.

So there is no guarantee that will get some alternative routes if you added alternatives=true


The docs may have changed from the time this question was posted. But now (in 2021) they are clear:

waypoints:

... Waypoints alter a route by directing it through the specifiedlocation(s)...

alternatives:

... This is only available for requests without intermediatewaypoints.

So, yes, if you use waypoints you will get just one route, regardless of the alternatives prop's value.

Current docs here