Calculate a route between two points
RouteResult Routing.Route(RoutingRouteParamsparameters, CancellationTokencancellationToken = default)
POST/api/v1/route
Calculate a route between two points
RoutingRouteParams parameters = new()
{
Destination = new()
{
Lat = 48.8584,
Lng = 2.2945,
},
Origin = new()
{
Lat = 48.8566,
Lng = 2.3522,
},
};
var routeResult = await client.Routing.Route(parameters);
Console.WriteLine(routeResult);{
"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"
}