Calculate a route between two points
Calculate a route between two points
Parameters
Body param: Geographic coordinate as a JSON object with lat and lng fields.
Body param: Geographic coordinate as a JSON object with lat and lng fields.
Query param: Response format for alternatives: json (default), geojson, csv, ndjson
Body param: Number of alternative routes to return (0-3, default 0). When > 0, response is a FeatureCollection of route Features.
Body param: Include per-edge annotations (speed, duration) on the route (default: false)
Body param: Electric vehicle parameters for EV-aware routing
Body param: Comma-separated road types to exclude (e.g. toll,motorway,ferry)
Body param: Geometry encoding format. Default: geojson.
Body param: Level of geometry detail: full (all points), simplified (Douglas-Peucker), false (no geometry). Default: full.
Calculate a route between two points
plaza routing route \
--api-key 'My API Key' \
--destination '{lat: 48.8584, lng: 2.2945}' \
--origin '{lat: 48.8566, lng: 2.3522}'{
"geometry": {
"coordinates": [
2.3522,
48.8566
],
"type": "Point"
},
"properties": {
"distance_m": 4523.7,
"duration_s": 847.2,
"annotations": {
"foo": "bar"
},
"charge_profile": [
[
0
]
],
"charging_stops": [
{
"foo": "bar"
}
],
"edges": [
{
"foo": "bar"
}
],
"energy_used_wh": 0
},
"type": "Feature"
}Returns Examples
{
"geometry": {
"coordinates": [
2.3522,
48.8566
],
"type": "Point"
},
"properties": {
"distance_m": 4523.7,
"duration_s": 847.2,
"annotations": {
"foo": "bar"
},
"charge_profile": [
[
0
]
],
"charging_stops": [
{
"foo": "bar"
}
],
"edges": [
{
"foo": "bar"
}
],
"energy_used_wh": 0
},
"type": "Feature"
}