Traveling Salesman Problem
Calculation of the optimal route between the desired locations.
GET Copy
https://maps-api.planplus.rs/services/traveling?lid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&coordinates=20.480082,44.813506;20.466899,44.794057;20.500293,44.799607;20.458126,44.812345&profile=car&steps=false&overview=simplified
JSON Copy
{
"waypoints": [
{
"location": [
20.4799,
44.813303
],
"name": "Ljubomira Stojanovića",
"trips_index": 0,
"waypoint_index": 0
},
{
"location": [
20.467166,
44.794112
],
"name": "Nebojšina",
"trips_index": 0,
"waypoint_index": 2
},
{
"location": [
20.500305,
44.799726
],
"name": "Dimitrija Tucovića",
"trips_index": 0,
"waypoint_index": 1
},
{
"location": [
20.458574,
44.812482
],
"name": "Kraljice Natalije",
"trips_index": 0,
"waypoint_index": 3
}
],
"trips": [
{
"distance": 14082,
"duration": 1243.6,
"weight": 475.6,
"weight_name": "routability",
"geometry": {
"type": "LineString",
"coordinates": [
[
20.4799,
44.813303
],
[
20.482794,
44.812628
],
[
20.485524,
44.810186
],
[
20.482014,
44.807974
],
[
20.484888,
44.805053
],
[
20.492261,
44.8016
],
[
20.500305,
44.799726
],
[
20.500765,
44.799656
],
[
20.500804,
44.799068
],
[
20.499612,
44.799175
],
[
20.499794,
44.799883
],
[
20.499407,
44.798485
],
[
20.499509,
44.796334
],
[
20.498896,
44.795502
],
[
20.503841,
44.793401
],
[
20.503252,
44.792521
],
[
20.497675,
44.79134
],
[
20.499479,
44.788348
],
[
20.501812,
44.782048
],
[
20.501975,
44.781504
],
[
20.501696,
44.781291
],
[
20.499917,
44.781466
],
[
20.498026,
44.781129
],
[
20.490077,
44.781891
],
[
20.486915,
44.782387
],
[
20.483841,
44.783356
],
[
20.472886,
44.787883
],
[
20.470349,
44.789744
],
[
20.468763,
44.792483
],
[
20.467166,
44.794112
],
[
20.465702,
44.798857
],
[
20.466299,
44.802007
],
[
20.466692,
44.802556
],
[
20.466315,
44.802769
],
[
20.465566,
44.80261
],
[
20.458022,
44.807198
],
[
20.458718,
44.809065
],
[
20.459733,
44.810592
],
[
20.458574,
44.812482
],
[
20.457796,
44.81411
],
[
20.462737,
44.814514
],
[
20.462337,
44.815599
],
[
20.462379,
44.816648
],
[
20.476743,
44.817171
],
[
20.47732,
44.815121
],
[
20.478571,
44.815112
],
[
20.478926,
44.814056
],
[
20.4799,
44.813303
]
]
},
"legs": [
{
"distance": 2724,
"duration": 249,
"weight": 76.2,
"summary": "",
"steps": []
},
{
"distance": 6325.3,
"duration": 522.4,
"weight": 88.2,
"summary": "",
"steps": []
},
{
"distance": 2492.1,
"duration": 227.2,
"weight": 192.9,
"summary": "",
"steps": []
},
{
"distance": 2540.6,
"duration": 245,
"weight": 118.3,
"summary": "",
"steps": []
}
]
}
],
"code": "Ok"
}