对Google Maps API的相同请求在各种计算机上的工作方式不同

时间:2016-11-11 10:11:58

标签: google-maps google-maps-api-3

我注册了API key,并用它编写了以下网址:

https://maps.googleapis.com/maps/api/distancematrix/json?units=metric&origins=Belarus,Minsk,Kuprevicha,1/2&destinations=Belarus,Minsk,Kurchatova,8&key=AIzaSyBngdHtfv-gbJkhKbsgJMqU5T-BnacZuPI

我正在回应街道信息被删除的地方:

{
   "destination_addresses" : [ "Minsk, Belarus" ],
   "origin_addresses" : [ "Minsk, Belarus" ],
   "rows" : [
      {
         "elements" : [
            {
               "distance" : {
                  "text" : "1 m",
                  "value" : 0
               },
               "duration" : {
                  "text" : "1 min",
                  "value" : 0
               },
               "status" : "OK"
            }
         ]
      }
   ],
   "status" : "OK"
} 

我的同事坐在我旁边发出相同的请求,收到了正确的完整回复。

{
   "destination_addresses" : [ "ул. Курчатова 8, Минск, Беларусь" ],
   "origin_addresses" : [
      "ул. Академика Купревича 1/2, Минск 220141, Беларусь"
   ],
   "rows" : [
      {
         "elements" : [
            {
               "distance" : {
                  "text" : "24,5 км",
                  "value" : 24526
               },
               "duration" : {
                  "text" : "20 мин.",
                  "value" : 1196
               },
               "status" : "OK"
            }
         ]
      }
   ],
   "status" : "OK"
}

这种奇怪行为的原因是什么?

0 个答案:

没有答案