Get routes suitable only for trucks
Products Used: Directions API & Navigation API
NextBillion.ai’s APIs provide mode
feature which helps in avoiding roads which a truck can not take. Setting this parameter avoids the roads where a truck with default dimensions is prohibited. Please visit API documentation to know more about default truck dimensions.
Following is a request to get the directions with
-
A
origin
anddestination
set -
mode
option set totruck
.
Directions API request:
Directions API response:
Notice that a different route is suggested when a different mode type (car
) is used for the same origin and destination.
Navigation API request:
Following is a Navigation API request for the above scenario:
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