Avoid Sharp Turns and U-turns
Products Used: Directions API & Navigation API
The avoid
feature in NextBillion’s.ai routing APIs ensures that the trucks don’t need to take the routes with impractical u-turns or other sharp turns. This can protect against potentially dangerous maneuvers and subsequent repair costs. Depending on the information needed, users can use this feature either in NextBillion.ai’s Directions API to get desired route directions along with ETA and distance information, or they can also use Navigation API to get turn-by-turn navigation instructions as well along with other information about the route.
Following is a sample Directions API request with following parameters:
-
A pair of
origin
&destination
locations -
mode
option set totruck
-
option
property set toflexible
-
avoid
option set touturn
andsharp_turn
. Users can go with a single value as well.
Directions API request:
Directions API response:
Notice that the Direction service suggests a route with a U-turn if the avoid parameter is not used for the given pair of origin and destination pairs.
Navigation API request:
Let’s take a look at how a Navigation API call would look like for the exact same parameters as the above example.
Navigation API response:
Notice that this API only responds with the turn-by-turn navigation instructions along with ETA and distance information for a route taken while avoiding roads with tolls.
Visit product documentation (Directions API | Navigation API) to know more about the available features