Alternative Routes doesn't show?
jpcarts23 opened this issue · 1 comments
jpcarts23 commented
I tried to print the count of routes and it always print 1 when there is another possible route.
poulpix commented
Hi @jpcarts23,
By default the Google Directions API only returns one result, but you can ask for "alternative routes" by simply activating the alternatives
flag on your PXGoogleDirections
instance, like this:
directionsAPI.alternatives = true
(where directionsAPI
is your PXGoogleDirections
instance).
With this flag enabled you should receive up to 3 routes, pretty much like what Google Maps shows you for that same itinerary search.
Hope this helped?
Kind regards