【发布时间】:2017-01-22 20:16:12
【问题描述】:
Google 提供了两种检索反向地理编码结果的方法 - 一种网络服务 API:
https://maps.googleapis.com/maps/api/geocode/json?address=place_id:xxxxxxxxxxx&key=YOUR_API_KEY
或 Javascript 地图 API:
https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap
我发现 place_id 值使用后者 (js) 而不是前者 (Web 服务) 返回结果 - 返回值为 ZERO_RESULTS (The request did not encounter any errors but, but returned no results)。网络服务是否存在限制?
一个适用于 #2 (js) 而不是 #1 (web service) 的 place_id 值示例:ChIJY01wxrsV64YR40ZRS9kaz_U
网络服务(#1):https://google-developers.appspot.com/maps/documentation/utils/geocoder/embed
Javascript 服务(#2):https://google-developers.appspot.com/maps/documentation/javascript/examples/full/geocoding-place-id
【问题讨论】:
标签: google-maps-api-3 google-places-api reverse-geocoding