CalculateRoutes computes routes given the following required parameters: Origin and Destination.
For more information, see Calculate routes in the Amazon Location Service Developer Guide.
Query parameters
Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.
Request body
Uses the current time as the time of departure.
The final position for the route. In the World Geodetic System (WGS 84) format: <code>[longitude, latitude]</code>.
Measurement system to be used for instructions within steps in the response.
Maximum number of alternative routes to be provided in the response, if available. For <a href="https://docs.aws.amazon.com/location/latest/developerguide/GrabMaps.html">GrabMaps</a> customers, <code>ap-southeast-1</code> and <code>ap-southeast-5</code> regions support only up to 3 alternative routes.
The start position for the route in World Geodetic System (WGS 84) format: [longitude, latitude].
A list of optional features such as <code>SpeedLimit</code> that can be requested for a Span. A span is a section of a Leg for which the requested features have the same values. Not supported in <code>ap-southeast-1</code> and <code>ap-southeast-5</code> regions for <a href="https://docs.aws.amazon.com/location/latest/developerguide/GrabMaps.html">GrabMaps</a> customers.
Type of step returned by the response. <code>Default</code> provides basic steps intended for web based applications. <code>TurnByTurn</code> provides detailed instructions with more granularity intended for a turn based navigation system. For <a href="https://docs.aws.amazon.com/location/latest/developerguide/GrabMaps.html">GrabMaps</a> customers, <code>ap-southeast-1</code> and <code>ap-southeast-5</code> regions <code>Default</code> does not return any steps.
Response
Success
Specifies the format of the geometry returned for each leg of the route.