首页 文章

谷歌 Map API - 反向地理编码相同place_id,JS API返回结果但Web API没有

提问于
浏览
0

Google提供了两种检索反向地理编码结果的方法 - 一种Web服务API:

https://maps.googleapis.com/maps/api/geocode/json?address=place_id:xxxxxxxxxxx&key=YOUR_API_KEY

或Javascript Map 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) . Web服务是否存在限制?

与#2(js)而不是#1(Web服务)一起使用的示例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

1 回答

相关问题