Travel mode with Amazon Location
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
Walkingfor the travel mode and your data provider is Esri, the start and destination must be within 40km. -
BicycleorMotorcycleare available only when using Grab as the data provider. -
Grab provides only
BicycleandWalkingroutes in certain cities. For more information, see Countries/regions and area covered. -
Truckis 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 asorAvoidFerries.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 asorAvoidFerries, in addition to specifying routes that can accommodate theAvoidTollsandTruckDimensions.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