Adding the duration and distance aggregation from the routes api

This commit is contained in:
Kadir 2024-02-29 19:58:54 +01:00
parent ce9956ea52
commit 83b3f1d3fd
2 changed files with 119 additions and 75 deletions

View file

@ -1,70 +1,84 @@
{
"routes": [
{
"legs": [
"routes": [
{
"stepsOverview": {
"multiModalSegments": [
{
"stepStartIndex": 0,
"stepEndIndex": 2,
"navigationInstruction": {
"instructions": "Walk to Finsbury Park"
},
"travelMode": "WALK"
},
{
"stepStartIndex": 3,
"stepEndIndex": 3,
"navigationInstruction": {
"instructions": "Subway towards Brixton"
},
"travelMode": "TRANSIT"
},
{
"stepStartIndex": 4,
"stepEndIndex": 4,
"navigationInstruction": {
"instructions": "Walk to Euston"
},
"travelMode": "WALK"
},
{
"stepStartIndex": 5,
"stepEndIndex": 5,
"navigationInstruction": {
"instructions": "Subway towards Morden via Bank"
},
"travelMode": "TRANSIT"
},
{
"stepStartIndex": 6,
"stepEndIndex": 6,
"navigationInstruction": {
"instructions": "Walk to Bank Station"
},
"travelMode": "WALK"
},
{
"stepStartIndex": 7,
"stepEndIndex": 7,
"navigationInstruction": {
"instructions": "Light rail towards Woolwich Arsenal"
},
"travelMode": "TRANSIT"
},
{
"stepStartIndex": 8,
"stepEndIndex": 9,
"travelMode": "WALK"
}
]
}
"legs": [
{
"steps": [
{
"distanceMeters": 6,
"staticDuration": "5s",
"travelMode": "WALK"
},
{
"distanceMeters": 158,
"staticDuration": "133s",
"travelMode": "WALK"
},
{
"distanceMeters": 19,
"staticDuration": "16s",
"travelMode": "WALK"
},
{
"distanceMeters": 102,
"staticDuration": "87s",
"travelMode": "WALK"
},
{
"staticDuration": "30s",
"travelMode": "WALK"
},
{
"distanceMeters": 133,
"staticDuration": "60s",
"travelMode": "WALK"
},
{
"distanceMeters": 5202,
"staticDuration": "392s",
"travelMode": "TRANSIT"
},
{
"distanceMeters": 21,
"staticDuration": "30s",
"travelMode": "WALK"
},
{
"distanceMeters": 5627,
"staticDuration": "600s",
"travelMode": "TRANSIT"
},
{
"distanceMeters": 45,
"staticDuration": "60s",
"travelMode": "WALK"
},
{
"distanceMeters": 10907,
"staticDuration": "1320s",
"travelMode": "TRANSIT"
},
{
"distanceMeters": 63,
"staticDuration": "64s",
"travelMode": "WALK"
},
{
"distanceMeters": 70,
"staticDuration": "54s",
"travelMode": "WALK"
},
{
"distanceMeters": 85,
"staticDuration": "73s",
"travelMode": "WALK"
}
]
}
],
"distanceMeters": 22438,
"duration": "3463s",
"staticDuration": "3463s"
}
],
"distanceMeters": 22438,
"duration": "3463s",
"staticDuration": "3463s"
}
]
}
]
}