Whenever you need data about a specific point in your route, you can use the routePath
query. It can return information about temperatures
, speed
, elevation
and more.
When using the routePath
query you need a route id and location
as a GeoJSON point of a specific point in the route. You can create a new route and receive the route id
using the new route mutation as described here. Please note that the coordinates need to be identical to those you receive back from your route request. You can find all coordinates by decoding the encoded polyline
.
ID of a route that you require for a route path segment
The GeoJSON Point of a route path segment
Optional alternative ID. By default we will retrieve the fastest route
GeoJSON location of a route path segment
Elevation (altitude) in meters
Average speed, in km/h, for this route path segment
Recommended speed, in km/h for this route path segment to optimise the consumption
Consumption, in kWh, of a route path segment
Consumption, in kWh per km, of a route path segment
Distance, in meters, of a route path segment
Duration, in seconds, of a route path segment
If successful, the HTTP status code in the response header is
200
and the response body contains the attributes you
requested.
If unsuccessful, the header status code is an error code and the response body contains an error response object. The error response object can be any of the ones below.
ROUTE_NOT_FOUND
No route was found with the provided ID
ROUTE_PATH_INVALID_POINT_COORDINATES
The coordinates provided are not valid
ROUTE_PATH_LOCATION_NOT_FOUND
No location was found with the provided input
ROUTE_PATH_NOT_FOUND
No route path was found with the provided ID or alternative ID