Truck Routes with Weight Limits
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 legal for the given weight. Use the “truck_weight” 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 weight restrictions changes the route and suggests a comparatively shorter route as the vehicle is treated as a truck with default dimensions.
Navigation API request
In case turn-by-turn restrictions are also needed 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