Avoid sharp turns for a truck
Implement Using: Directions Flexible API
It gets complicated and risky for large trucks to maneuver around sharp turns. With Directions Flexible API users can specify the custom turn angles which are safe for their trucks to take. In order to use the turn_angle_range
parameter, users also need to set the avoid
property to “sharp_turn”. Let’s see how to configure such a request:
origin
&destination
to to denote the starting and end locations of the tripmode
set to “truck” to get a route which a car can takeavoid
parameter set “sharp_turn”turn_angle_range
set to 110 to allow trucks to make turns between [110,250] degreesoption
set to “flexible”
Request
Response
Following is a visual representation of the above route on a map. We can observe that the turn at the interchange was avoided in favor of a longer route because of the “turn_angle_range” setting.