I m trying to execute url query but have no results about duration in traffic .
The results of query listed below:
{
"destination_addresses" : [ "Гамбург, Германия" ],
"origin_addresses" : [ "85748 Гархинг, Германия" ],
"rows" : [
{
"elements" : [
{
"distance" : {
"text" : "761 км",
"value" : 761011
},
"duration" : {
"text" : "7 ч. 17 мин.",
"value" : 26216
},
"status" : "OK"
}
]
}
],
"status" : "OK"
}
The result does not contain duration_in_traffic
. Why?
The duration_in_traffic
result is only returned where traffic data is available, when a departure_time
is specified.
https://developers.google.com/maps/documentation/javascript/distancematrix
It seems no traffic data is available for that destination/origin.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.