Travel mode
You can set a travel mode when using CalculateRoute
or
CalculateRouteMatrix
. The mode of travel affects speed of travel and
road compatibility. While the default mode of travel is by car, you can specify which
mode of travel you're using while traveling along a route with the following optional
parameter:
-
TravelMode
– Specifies the mode of transport when calculating a route, such as:
,Bicycle
,Car
,Motorcycle
, orTruck
.Walking
Limitations
-
If you specify
Walking
for the travel mode and your data provider is Esri, the start and destination must be within 40km. -
Bicycle
orMotorcycle
are available only when using Grab as the data provider. -
Grab provides only
Bicycle
andWalking
routes in certain cities. For more information, see Countries/regions and area covered. -
Truck
is not available when using Grab as the data provider.
Additional preferences
If you specify a TravelMode
of
, you can specify additional route
preferences with the following optional parameter:Car
-
CarModeOptions
– Specifies route preferences when traveling in a car, such as
orAvoidFerries
.AvoidTolls
If you specify a TravelMode
of
, you can specify additional route
preferences with the following optional parameter:Truck
-
TruckModeOptions
– Specifies route preferences when traveling in a truck, such as
orAvoidFerries
, in addition to specifying routes that can accommodate theAvoidTolls
andTruckDimensions
.TruckWeight
The following CalculateRoute
request specifies
as the mode of travel.
Additional route restrictions include: avoiding routes that use ferries and avoiding
roads that can't accommodate the truck dimensions and weight.Truck
{ "DeparturePosition": [-122.7565,49.0021], "DestinationPosition": [-122.3394, 47.6159], "DepartNow": true, "TravelMode": "
", "TruckModeOptions": { "AvoidFerries":
Truck
, "AvoidTolls":
true
, "Dimensions": { "Height":
false
, "Length":
4.5
, "Unit": "
15.5
", "Width":
Meters
}, "Weight": { "Total":
4.5
, "Unit": "
7500
" } } }
Pounds