Truck-Compliant Routes
Products Used: Directions API & Navigation API
NextBillion.ai’s APIs allows you to specify the dimensions of a truck. The routing engine then will suggest routes which are safe for the given truck dimensions. Use the “truck_size” parameter in the routing APIs to account for size based restrictions.
Let’s take a look at the following sample request with
-
A pair of “origin” & “destination” locations
-
“mode” option set to “truck”.
-
“truck_size” option set with actual truck dimensions.
-
“option” property set to “flexible”
Directions API request
Directions API response
Observe that removing the truck size restrictions changes the route as the vehicle is treated as a truck with default dimensions.
Navigation API request
To get turn-by-turn restrictions as well for easy navigation, users can submit the following Navigation API request for the above scenario:
Navigation API response
Visit product documentation (Directions API | Navigation API) to know more about the available features