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:
- Routing – Calculate routes between waypoints with customizable parameters
- Route Planning Parameters – Configure routing options (traffic, alternatives, vehicle profiles, etc.)
- Long Distance EV Routing – Plan routes with charging stops for electric vehicles
Displaying routes on the map:
- Routing Module – Display routes with visual styling, alternatives, and interaction
Route Object Structure
The route object contains the following properties:
geometry
coordinates– Path coordinates as an array of[longitude, latitude]pairs
properties
id– Unique route identifiersummary– Route summary statisticssections– Route sections with specific characteristicsguidance– Turn-by-turn instructions (if requested)progress– Progress points along the route (if requested)index– Route index (0 = main route, 1+ = alternatives)
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:
departureTime– Departure date and timearrivalTime– Arrival date and timelengthInMeters– Total route distancetravelTimeInSeconds– Total travel duration
Traffic information:
trafficDelayInSeconds– Extra time due to traffictrafficLengthInMeters– Distance affected by traffic
Alternative travel times (if requested):
noTrafficTravelTimeInSeconds– Free-flow time without traffichistoricTrafficTravelTimeInSeconds– Historical average based on typical patternsliveTrafficIncidentsTravelTimeInSeconds– Current live traffic conditions
Electric vehicles (if applicable):
batteryConsumptionInkWh– Energy consumption in kilowatt-hoursremainingChargeAtArrivalInkWh– Battery level at destinationtotalChargingTimeInSeconds– Total time spent at charging stops
Combustion vehicles (if applicable):
fuelConsumptionInLiters– Fuel consumption in liters
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:
leg- Portion between two consecutive waypoints, includes leg summarycountry- Passage through a country (includes ISO3 country code)importantRoadStretch- Major road segments with street names and numbers
Road types:
motorway- Highway/motorway sectionsferry- Ferry crossingscarTrain- Car train transporttunnel- Tunnel sectionspedestrian- Pedestrian areasurban- Urban area sectionsunpaved- Unpaved road sections
Restrictions:
toll- Toll road sectionstollVignette- Toll vignette required (includes country code)carpool- Carpool/HOV lane sectionslowEmissionZone- Low emission zone sectionsvehicleRestricted- Vehicle restriction sections
Traffic and guidance:
traffic- Traffic incidents and congestion (includes delay, category, speed)lanes- Lane guidance information (includes directions and separators)speedLimit- Speed limit informationroadShields- Road shield references
Section Properties
All section types share base properties, with additional fields specific to each type:
Base properties (all sections):
id– Unique identifierstartPointIndex– Start coordinate indexendPointIndex– End coordinate indexlengthInMeters– Section lengthdurationInSeconds– Time to traverse section
Leg sections (sections.leg):
summary– Leg-specific summary statistics
Traffic incidents (sections.traffic):
categories– Incident categories (e.g.,['jam', 'accident'])magnitudeOfDelay– Severity level ('minor','moderate','major', etc.)delayInSeconds– Extra delay caused by incidenteffectiveSpeedInKmh– Current speed through incidenttec– TPEG2-TEC standard codes for incident classification
Country sections (sections.country):
countryCodeISO3– Three-letter country code (e.g.,'NLD')
Important road stretches (sections.importantRoadStretch):
index– Importance ranking (0 = most important)streetName– Street nameroadNumbers– Road numbers (e.g.,['A1', 'E30'])
Lane guidance (sections.lanes):
lanes– Array of lane informationdirections– Possible directions from this lanefollow– Direction to follow for route
laneSeparators– Lane separator types
Speed limits (sections.speedLimit):
maxSpeedLimitInKmh– Speed limit in kilometers per hour
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:
pointIndex– Index in geometry coordinatesdistanceInMeters– Distance from starttravelTimeInSeconds– Time from start
Guidance
Turn-by-turn navigation instructions. Available when guidance is requested. Access them via route.properties.guidance.instructions:
message– Human-readable instructionmaneuver– Maneuver typepoint– Coordinate of maneuver
API Reference
For complete type documentation, see the complete route feature type Route
Related Guides and Examples
Related Guides
- Routing Quickstart - Calculate and display routes
- Route Planning Parameters - Comprehensive route planning with configuration options
Map Integration
- Routing Module - Display routes on the map with visual styling
Related Examples
- Route with waypoints - Basic route calculation and display
- Route with alternatives - Multiple route options