Get routes for hazmat load
Implement Using: Directions Flexible API
To get routes for safely transporting hazardous material, use the hazmat_type
parameter of the Directions Flexible API to avoid unsafe routes for your truck. Users need to provide the type of material that is being carried by the truck to get the legal routes as per the contents of the truck load. In this example, we will generate such a route by configuring:
origin
&destination
to to denote the starting and end locations of the tripmode
set to “truck” to get a route which a car can takehazmat_type
parameter set to “circumstantial”option
set to “flexible”
Request
Response
Following is a visual representation of the above route on a map. We can observe that a direct route was avoided and a longer, but legal route was suggested due to the hazmat settings configured in the input request.