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&destinationto to denote the starting and end locations of the tripmodeset to “truck” to get a route which a car can takehazmat_typeparameter set to “circumstantial”optionset 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.
