Shortest and fastest route

Hi,

How do i toggle between bringing back the fastest and shortest route? Currently the weighting factory is set to “Custom”.

I have tried ?weighting=fastest but that is no longer supported, is there a way to change this dynamically so i can switch between modes.

Updating Fastest from True to False on the request doesn’t change the route/mileage or time for the route.

Thanks,
Brandon

The simpler way is to create two different profiles like car_fastest (or just car) and car_shortest. And for car_shortest use e.g. a bigger distance_influence to prefer shorter routes. You can read more about customizability here.

1 Like