This is the documentation of version 0.51.5. Go to the latest version, 1.0.0-rc.5.

Routes

A route is a GeoJSON Feature with LineString geometry containing the path coordinates. The feature properties contain route information including summary statistics, sections, guidance, and progress data.

Where routes are used

Routes are returned by routing services and can be displayed on the map:

Services that return routes:

Displaying routes on the map:

Route object structure

The route object contains the following properties:

geometry

properties

Summary

The summary contains overall route statistics including departure/arrival times, distance, duration, and consumption estimates. Access it via route.properties.summary:

Time and distance:

Traffic information:

Alternative travel times (if requested):

Electric vehicles (if applicable):

Combustion vehicles (if applicable):

Sections

Sections divide the route into portions with specific characteristics. Each section references a range of coordinate indices in the route geometry. Access them via route.properties.sections:

Section types

Sections are grouped by type in the sections property:

Route characteristics:

Road types:

Restrictions:

Traffic and guidance:

A requested section type only appears in the response if the route actually traverses it (for example, ferry is omitted on a route with no water crossing).

Section properties

All section types share base properties, with additional fields specific to each type:

Base properties (all sections):

Leg sections (sections.leg):

Traffic incidents (sections.traffic):

Country sections (sections.country):

Important road stretches (sections.importantRoadStretch):

Lane guidance (sections.lanes):

Speed limits (sections.speedLimit):

Progress

Progress points provide cumulative distance and time at specific coordinates along the route. Available when extended route representations are requested. Access them via route.properties.progress:

Guidance

Turn-by-turn navigation instructions. Available when guidance is requested. Access them via route.properties.guidance.instructions:

API reference

For complete type documentation, see the complete route feature type Route

Related guides and examples

Related guides

Map integration

Related examples