Skip to content

Distance Matrix

When using and/or manipulating trips, either through REST services or through planning algorithms/jobs, distance matrices can be used. The distance matrix service computes the travel time and distances between each stop in a trip, and uses these values for displaying and calculations. This often gives a more realistic result than when using the Haversine distances and approximated travel times (which is the default).

Note that using distance matrices comes with an additional fee, and requires 'credits' to function.

The UseDistanceMatrix preference indicates whether to use the distance matrix service.

UseDistanceMatrix
Type Default Value Example
Boolean false true

Depending on the underlying matrix provider used, specific properties must be provided. Note that currently only OSRM is enabled.

The distancematrix.osrm.baseUrl indicates the URL of the distance matrix server instance to use.

distancematrix.osrm.baseUrl
Type Default Value Example
String Undefined https://router.project-osrm.org/table/v1/driving/

The distancematrix.osrm.clientSecret indicates the secret/token that will be passed to the OSRM service in a Authorization: Bearer header.

distancematrix.osrm.clientSecret
Type Default Value Example
String Undefined <text>