Skip to content
GuidesPlaygroundDashboard

Routing

Calculate a route between two points
RouteResult routing().route(RoutingRouteParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/api/v1/route
Snap a coordinate to the nearest road
NearestResult routing().nearest(RoutingNearestParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
GET/api/v1/nearest
Calculate an isochrone from a point
GeoJsonFeature routing().isochrone(RoutingIsochroneParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
GET/api/v1/isochrone
Calculate a distance matrix between points
MatrixResult routing().matrix(RoutingMatrixParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/api/v1/matrix
ModelsExpand Collapse
class MatrixRequest:
GeoJsonGeometry destinations

Destination points (GeoJSON MultiPoint geometry)

Coordinates coordinates

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
List<double>
List<List<double>>
List<List<List<double>>>
List<List<List<List<double>>>>
Type type
One of the following:
POINT("Point")
LINE_STRING("LineString")
POLYGON("Polygon")
MULTI_POINT("MultiPoint")
MULTI_LINE_STRING("MultiLineString")
MULTI_POLYGON("MultiPolygon")

Origin points (GeoJSON MultiPoint geometry)

Coordinates coordinates

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
List<double>
List<List<double>>
List<List<List<double>>>
List<List<List<List<double>>>>
Type type
One of the following:
POINT("Point")
LINE_STRING("LineString")
POLYGON("Polygon")
MULTI_POINT("MultiPoint")
MULTI_LINE_STRING("MultiLineString")
MULTI_POLYGON("MultiPolygon")
Optional<Mode> mode

Travel mode

One of the following:
AUTO("auto")
FOOT("foot")
BICYCLE("bicycle")
class MatrixResult:
List<List<double>> distances

Distance matrix (meters), origins x destinations

List<List<double>> durations

Duration matrix (seconds), origins x destinations

class NearestResult:

GeoJSON Point Feature snapped to the nearest road segment

Coordinates coordinates

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
List<double>
List<List<double>>
List<List<List<double>>>
List<List<List<List<double>>>>
Type type
One of the following:
POINT("Point")
LINE_STRING("LineString")
POLYGON("Polygon")
MULTI_POINT("MultiPoint")
MULTI_LINE_STRING("MultiLineString")
MULTI_POLYGON("MultiPolygon")
Properties properties
Optional<Double> distanceM

Distance to nearest road in meters

Optional<Long> edgeId

Road edge ID

Type type
class RouteRequest:
GeoJsonGeometry destination

Destination point (GeoJSON Point geometry)

Coordinates coordinates

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
List<double>
List<List<double>>
List<List<List<double>>>
List<List<List<List<double>>>>
Type type
One of the following:
POINT("Point")
LINE_STRING("LineString")
POLYGON("Polygon")
MULTI_POINT("MultiPoint")
MULTI_LINE_STRING("MultiLineString")
MULTI_POLYGON("MultiPolygon")

Origin point (GeoJSON Point geometry)

Coordinates coordinates

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
List<double>
List<List<double>>
List<List<List<double>>>
List<List<List<List<double>>>>
Type type
One of the following:
POINT("Point")
LINE_STRING("LineString")
POLYGON("Polygon")
MULTI_POINT("MultiPoint")
MULTI_LINE_STRING("MultiLineString")
MULTI_POLYGON("MultiPolygon")
Optional<Mode> mode
One of the following:
AUTO("auto")
FOOT("foot")
BICYCLE("bicycle")
class RouteResult:
Coordinates coordinates

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
List<double>
List<List<double>>
List<List<List<double>>>
List<List<List<List<double>>>>
Type type
One of the following:
POINT("Point")
LINE_STRING("LineString")
POLYGON("Polygon")
MULTI_POINT("MultiPoint")
MULTI_LINE_STRING("MultiLineString")
MULTI_POLYGON("MultiPolygon")
Properties properties
Optional<Double> distance

Total distance in meters

Optional<Double> duration

Estimated duration in seconds

Optional<String> mode

Travel mode used

Type type