Directions for custom truck sizes
Implement Using: Directions Flexible API
Routing requirements for a truck with custom dimensions can be tricky as not all roads are suitable for all types of trucks. Taking wrong and inappropriate routes can result in operational and regulatory setbacks for a business. In this example, we will generate a route that is legal for a truck with custom dimensions to take. We configure:
origin
&destination
to to denote the starting and end locations of the tripmode
set to “truck” to get a route which a car can taketruck_size
parameter specifying truck dimensions using its length, width and height
Request
Response
Following is a visual representation of the above route on a map. We can observe that a direct route is not suggested here due to the custom truck restrictions.