Optimize route through waypoints
OptimizeResult Optimize.Create(OptimizeCreateParamsparameters, CancellationTokencancellationToken = default)
POST/api/v1/optimize
Optimize route through waypoints
OptimizeCreateParams parameters = new()
{
Waypoints =
[
new()
{
Lat = 48.8566,
Lng = 2.3522,
},
new()
{
Lat = 48.8606,
Lng = 2.3376,
},
new()
{
Lat = 48.8584,
Lng = 2.2945,
},
],
};
var optimizeResult = await client.Optimize.Create(parameters);
Console.WriteLine(optimizeResult);{
"features": [
{
"geometry": {
"coordinates": [
2.3522,
48.8566
],
"type": "Point"
},
"properties": {
"cost_s": 0,
"cumulative_cost_s": 0,
"waypoint_index": 0
},
"type": "Feature"
}
],
"optimization": "optimization",
"roundtrip": true,
"total_cost_s": 0,
"type": "FeatureCollection"
}Returns Examples
{
"features": [
{
"geometry": {
"coordinates": [
2.3522,
48.8566
],
"type": "Point"
},
"properties": {
"cost_s": 0,
"cumulative_cost_s": 0,
"waypoint_index": 0
},
"type": "Feature"
}
],
"optimization": "optimization",
"roundtrip": true,
"total_cost_s": 0,
"type": "FeatureCollection"
}