calculateRoute
This operation is no longer current and may be deprecated in the future. We recommend you upgrade to CalculateRoutes/location/latest/APIReference/API_CalculateRoutes.html or CalculateIsolines/location/latest/APIReference/API_CalculateIsolines.html unless you require Grab data.
CalculateRouteis part of a previous Amazon Location Service Routes API (version 1) which has been superseded by a more intuitive, powerful, and complete API (version 2).The version 2
CalculateRoutesoperation gives better results for point-to-point routing, while the version 2CalculateIsolinesoperation adds support for calculating service areas and travel time envelopes.If you are using an Amazon Web Services SDK or the Amazon Web Services CLI, note that the Routes API version 2 is found under
geo-routesorgeo_routes, not underlocation.Since Grab is not yet fully supported in Routes API version 2, we recommend you continue using API version 1 when using Grab. Calculates a route given the following required parameters:
DeparturePositionandDestinationPosition. Requires that you first create a route calculator resource.
By default, a request that doesn't specify a departure time uses the best time of day to travel with the best traffic conditions when calculating the route.
Additional options include:
Specifying a departure time using either
DepartureTimeorDepartNow. This calculates a route based on predictive traffic data at the given time. You can't specify bothDepartureTimeandDepartNowin a single request. Specifying both parameters returns a validation error.Specifying a travel mode using TravelMode sets the transportation mode used to calculate the routes. This also lets you specify additional route preferences in
CarModeOptionsif traveling byCar, orTruckModeOptionsif traveling byTruck.If you specifywalkingfor the travel mode and your data provider is Esri, the start and destination must be within 40km.