0

我在使用 Google Maps Geocoding API v3 时遇到了一个奇怪的问题。它适用于我迄今为止尝试过的所有其他地址,但它给了我以下地址的问题。

35 & 36, Rajiv Gandhi Infotech Park, Pune, 411057, India OR Plot No 35/36,Rajiv Gandhi Infotech Park,Phase 1,MIDC,Hinjawadi,Pune,411057,India 即使是:Rajiv Gandhi Infotech Park, Pune, 411057,印度

GeocoderStatus 为 ZERO_RESULTS。

下面是代码片段。

var geocoder = new google.maps.Geocoder();
              geocoder.geocode({
                  'address' : address
              },
              function (results, status) {
                  if (status == google.maps.GeocoderStatus.OK) {
                     ....
                   }
                   else{...}

但是,在下面的链接中,相同的地址在json 结果中返回了一个有效的纬度/经度,状态为“OK” 。

http://maps.googleapis.com/maps/api/geocode/json?address=35&36+Rajiv+Gandhi+Infotech+Park,+Pune,+411057,+India&sensor=true

谁能告诉我这个问题的原因及其解决方法?

4

1 回答 1

0

也许该特定地址最近已添加到 Google 的数据库中。

为什么 Google Maps API 地理编码器提供的位置与 Google Maps 不同?

API 地理编码器和谷歌地图地理编码器有时使用不同的数据集(取决于国家)。API 地理编码器偶尔会使用新数据进行更新,因此您可以预期结果会随着时间的推移而发生变化或改进。

取自:http ://code.google.com/apis/maps/faq.html#geocoder_differences

于 2011-12-11T19:51:57.933 回答