谷歌提供检索反向地理编码结果的两种方法 - Web服务API:谷歌地图API - 反向地理编码相同place_id,JS API返回的结果,但网络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
我发现,与后者(JS),而不是前者(网络服务)返回结果place_id值 - 返回值为ZERO_RESULTS (The request did not encounter any errors but, but returned no results)
。 Web服务是否存在限制?
一个例子place_id值与2号(JS),而不是#1(Web服务)的工作原理:ChIJY01wxrsV64YR40ZRS9kaz_U
Web服务(#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