Routes for Cars & Trucks
Product Used: Directions API
NextBillion.ai’s Routing APIs provides the mode
feature to determine the correct routes for a given driving mode. In case of trucks, you can further customize the suggested routes by adding truck size, truck weight and axle load constraints to ensure the safety and legitimacy of the routes. In this example, we will create requests to get suitable routes for different types of vehicles in the fleet
Vehicle Type: Pickup Truck
Following is a request to get the directions for a pickup truck with
- An “origin” and “destination” set
- “mode” option set to “car” to emulate driving conditions for a pickup truck
- “avoid” option set to “highway”
Request
Response
Vehicle Type: Truck
Following is a Directions Flexible request to get the directions for a freight truck with axle load settings An “origin” and “destination” set “mode” option set to “truck” to emulate driving conditions for a freight truck “truck_axle_load” configured to get legitimate routes
Request
Response
Vehicle Type: Freight Truck
Following is a request to get the directions for a freight truck with
- An “origin” and “destination” set
- “mode” option set to “truck” to emulate driving conditions for a freight truck
- “truck_size” constraints configured to get legitimate routes
Request
Response
Visit Directions API & documentation to know more about the available features.