Javascript Google Geocode API返回不同的结果,然后';google.maps.Geocoder';

Javascript Google Geocode API返回不同的结果,然后';google.maps.Geocoder';,javascript,google-maps-api-3,Javascript,Google Maps Api 3,我有一个返回坐标的javascript函数: function getCoordinates(address, callback){ var geocoder = new google.maps.Geocoder(); geocoder.geocode( {'address': address}, function(results, status) { if (status === google.maps.GeocoderStatus.OK) {

我有一个返回坐标的javascript函数:

function getCoordinates(address, callback){
    var geocoder = new google.maps.Geocoder();
    geocoder.geocode( {'address': address}, function(results, status) {
        if (status === google.maps.GeocoderStatus.OK) {
            callback({"lat": results[0].geometry.location.lat(), "lng": results[0].geometry.location.lng()});
        }else{
            callback(null);
        }
    });
}
返回此函数的示例:

  • 地址:“科罗内尔·奥塔维奥·迈耶,40,明尼苏达州波索·阿雷格里,邮编:37550-068,巴西”

    坐标:纬度:-22.226949,液化天然气:-45.939313

  • 地址:“科罗内尔·奥塔维奥·迈耶,20,明尼苏达州波索·阿雷格里,邮编:37550-068,巴西”

    坐标:纬度:-22.226949,液化天然气:-45.939313

  • 不同的地址,相同的坐标

    返回谷歌地理编码API的示例:

  • 网址:

    坐标:纬度:-22.2302273,液化天然气:-45.9383279

  • 网址:

    坐标:纬度:-22.2300552,液化天然气:-45.9385431

  • 不同的地址,不同的坐标

    为什么我的javascript函数返回的结果与Google Geocode API不同?

    请提供一个示例来说明您的问题。我从Google Maps Javascript v3(与您从Google Geocode API获得的结果相匹配)中得到了不同的“coronel otávio meyer,40,pouso alegre,mg,37550-068,Brasil”和“coronel otávio meyer,20,pouso alegre,mg,37550-068,Brasil”的结果。