簡體   English   中英

在Google地圖中未返回duration_in_traffic

[英]duration_in_traffic is not returned in Google Maps

我正在嘗試執行url查詢,但沒有有關流量持續時間的結果

https://maps.googleapis.com/maps/api/distancematrix/json?origins=garching&destinations=hamburg&departure_time=now&api_key=my_api_key

查詢結果如下:

{
   "destination_addresses" : [ "Гамбург, Германия" ],  
   "origin_addresses" : [ "85748 Гархинг, Германия" ],  
   "rows" : [  
      {  
         "elements" : [  
            {  
               "distance" : {  
                  "text" : "761 км",  
                  "value" : 761011  
               },  
               "duration" : {  
                  "text" : "7 ч. 17 мин.",  
                  "value" : 26216  
               },  
               "status" : "OK"  
            }  
         ]  
      }
   ],  
   "status" : "OK"  
}

結果不包含duration_in_traffic 為什么?

僅當指定了departure_time duration_in_traffic ,才返回duration_in_traffic結果。

https://developers.google.com/maps/documentation/javascript/distancematrix

似乎該目的地/原點沒有流量數據。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM