navigation

Compute a turn-by-turn route

A route between 2 and 10 waypoints on the global road graph, optionally with a sampled elevation profile.

When to use: Retrieve route geometry, directions, distance, and travel time between waypoints.

When not to use: Use a matrix for travel-time comparisons across multiple origins and destinations.

post/route

Request

  • Base URL: https://api.mapsource.io
  • URL: https://api.mapsource.io/route
  • Auth: HTTP bearer

Request body

costing'auto' | 'bicycle' | 'pedestrian' | 'truck' | 'motor_scooter' | 'bus'

Travel mode.

elevationboolean

Also return a terrain profile with gain and loss.

Response

Compute a turn-by-turn route

schemastring
profilestring

The costing model that produced this result.

geometryAvailable'inline' | 'handle'

Where the geometry is. handle means read geometryRef.

costingstring

Travel profile; equivalent to profile.

geometryobject

GeoJSON. Omitted when the route is large enough to be handle-backed; read geometryRef then.

geometryRefstring nullable

A result handle holding the geometry, when it was too large to inline.

elevationobject

Present when elevation was requested: samples, gain, loss, and the sampling and smoothing method used.

Changes

No recorded changes to this operation across all 1 revision of this API.