我一直使用Google Places v 3.0 API(https://developers.google.com/maps/documentation/javascript/places),直到今天,它總是返回address_components字段中的縣(即type:administrative_area_level_2)。其他一切仍然存在,但縣缺失。有什麼改變嗎?這是否影響其他人?Google Maps Places API不再返回縣(adminstrative_area_level_2)
回答
我們遇到了同樣的問題(2014年9月10日),但根據Google的支持,現在應該(2014年9月16日)得到解決。
是的,我報告了谷歌支持上的錯誤,並確認我的舊代碼再次運行,我不再需要解決方法。 – harrysny 2014-09-16 20:26:36
我有這個問題,並多次訪問此頁面,但直到今天,我才知道發生了什麼事情。
根據您給的位置,美國的多個縣可能在那裏佔有空間。就我而言,我會提供郵政編碼(例如79556),這些郵政編碼並不總是會返回一個縣。
原因是一些郵政編碼(如79556)實際上跨越了幾個縣。 (see this map)
確保您所做的搜索不會進入多個縣的空間。如果是這樣,你將不會得到所提供的位置所在的所有縣的數組;你將不會獲得任何縣的價值。
對於跨多個縣的郵政編碼,您是正確的,我也在想,爲什麼API沒有返回縣而不是單縣的名單。 您是否發現啓用此功能的其他服務?我正在研究幾個選項,並認爲我會從這裏開始。 – codephreek 2017-08-28 21:25:04
不幸的是,我沒有。我們最終使用了一個大型的MySQL表格將郵政編碼連接到縣區。我不禁想到應該有更好的方法,但我還沒有找到它。 – 2017-08-30 01:31:21
- 1. Google Maps JavaScript Places API - URL undefined
- 2. 如何讓Google Maps「Places API」返回郵政編碼信息?
- 3. Google Places API未返回響應
- 4. Google Maps API V3返回610,0,0,0
- 5. 解析從Google Maps API返回的JSON
- 6. Google Places/Maps API - 小知識文字?
- 7. Google Maps Places沒有結果Api
- 8. AngularJS-Google-Places不返回詳細信息
- 9. Google Places API cors
- 10. Google Places API不一致
- 11. Google Places API subway_station ,?
- 12. Google Places API圖像請求網址不會返回圖像
- 13. Angular 2:Google Maps和Angular Google Places
- 14. PHP - 從Google Maps API返回值
- 15. Google Maps API返回「未定義」
- 16. 我可以使用Google Places API返回住宅地址嗎?
- 17. Google Places API爲什麼不能返回隔壁的位置?
- 18. Google Places API不返回時的信用使用位置ID
- 19. Google Places API不會根據地點返回建議
- 20. Google Places API錯誤
- 21. Google Places API返回指定關鍵字的零結果
- 22. Google Places API返回結果遠離搜索中心
- 23. Google Places Api Android
- 24. Google places Api Key
- 25. Google Places API Warning
- 26. 雷達搜索Google Places API返回的結果太少
- 27. Google Places API,返回對象的句柄/引用
- 28. Google Places API期間[]不顯示
- 29. Google Maps API - GDirections.getDuration()第一次返回null,第二次返回
- 30. Google Places API - 響應數量
我可以通過調用Geocoder()庫來獲得縣,但它沒有任何意義,他們退出縣(administrative_area_level_2)。 – harrysny 2014-09-13 01:33:18
已解決:https://code.google.com/p/gmaps-api-issues/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Introduced%20Fixed%20Summary%20Stars%20ApiType %20Internal&groupby =&sort =&id = 7139 – harrysny 2014-09-16 20:27:21