Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/google-maps/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google maps google geocoder API从maps.google.com返回不同的位置_Google Maps_Google Maps Api 3_Geocoding_Google Geocoder_Google Geocoding Api - Fatal编程技术网

Google maps google geocoder API从maps.google.com返回不同的位置

Google maps google geocoder API从maps.google.com返回不同的位置,google-maps,google-maps-api-3,geocoding,google-geocoder,google-geocoding-api,Google Maps,Google Maps Api 3,Geocoding,Google Geocoder,Google Geocoding Api,我正在建立一个地图服务网站。以“20635东北25 ct”为例,在maps.google.com上,它返回了位于Sammamish WA 98074的一所房子。但用我的密码: geocoder.geocode({'address': address}, function (results, status) { if (status == google.maps.GeocoderStatus.OK) { alert(results.length);

我正在建立一个地图服务网站。以“20635东北25 ct”为例,在maps.google.com上,它返回了位于Sammamish WA 98074的一所房子。但用我的密码:

geocoder.geocode({'address': address}, function (results, status) {
        if (status == google.maps.GeocoderStatus.OK) {
            alert(results.length);
            var coordinates = results[0].geometry.location;
            lat = coordinates.lat();
            lng = coordinates.lng();
            _CallBack();
        } else {
            alert("Geocode was not successful for the following reason: " + status);
        }
    });
它返回一个非常不同的位置:40.6086666,-96.6868892999996

但是,如果我使用完整地址“20635 ne 25 ct sammamish wa 98074”,则代码返回的结果与maps.google.com相同


有什么线索吗?

好的,让我自己回答。我让我在马萨诸塞州的朋友管理那个地址,然后maps.google.com返回她附近的位置。所以我猜maps.google.com会收集一些用户信息或位置信息,然后首先返回基于这些信息的地址,而不是基于地址本身的最佳匹配


所以,对,为了得到最好的结果,无论你在哪里,给地址尽可能详细。。。我猜它是在解决这个问题:“20635 S 25 St,Hickman,NE 68372,USA(40.6086666,-96.686889299996)”。始终尽可能具体地告诉地理编码员地址。谢谢!我只是不明白这里的背景和逻辑。如果他们的数据库可以找到更好的匹配(屋顶类型的位置),那么他们为什么选择返回范围\插值位置?这是该数组中唯一的返回。。。。不同的产品有不同的结果???谷歌地图!=谷歌地图地理编码器