Query route path

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.

Show elevation details

Fetch the height profile of a route and display it in a graph

Show elevation details

Query

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.

Arguments

id ID

Required

ID of a route that you require for a route path segment

location PointInput

Required

The GeoJSON Point of a route path segment

alternativeId ID

Optional alternative ID. By default we will retrieve the fastest route

Other fields

location Point

GeoJSON location of a route path segment.

elevation Int

Elevation (altitude) in meters.

averageSpeed Float

Average speed, in km/h, for this route path segment.

recommendedSpeed Float

Recommended speed, in km/h for this route path segment to optimise the consumption.

consumption Float

Consumption, in kWh, of a route path segment.

consumptionPerKm Float

Consumption, in kWh per km, of a route path segment.

distance Float

Distance, in meters, of a route path segment.

duration Float

Duration, in seconds, of a route path segment.

stateOfCharge Float

State of charge, in kWh, of a route path segment.

Response

A response can either contain a data or an errors object. The response header will always return 200 as a status code.

Data object

When successful, a data object will be returned with the requested fields. If there are no fields present the data object will return the operation name with the appropriate return type. If the operation was a query, this output will be an object of the schema’s query root type; if the operation was a mutation, this output will be an object of the schema’s mutation root type.

Error object

If unsuccessful, an errors object will be returned with more details in the extensions object. The error object can contain any of the following objects.