I use the function "duration_in_traffic" and "duration" using the DistanceMatrix API.
For a given pair of coordinates, I see the following results:
{
"destination_addresses": [
"Hamburg, Germany"
],
"origin_addresses": [
"85748 Garching, Germany"
],
"rows": [
{
"elements": [
{
"distance": {
"text": "761 km",
"value": 760831
},
"duration": {
"text": "7 hours 1 min",
"value": 25242
},
"duration_in_traffic": {
"text": "6 hours 42 mins",
"value": 24145
},
"status": "OK"
}
]
}
],
"status": "OK"
}
Here is my question:
How is it that duration_in_traffic is less than duration?
From what I understood:
Duration: The duration of the journey along the route ... Not sure if it is without traffic
Duration_in_traffic: Duration of the trip along the route in traffic conditions.
Any explanation in this regard would be greatly appreciated.
source
share