-1

I am building a map services website. Using "20635 ne 25th ct" as an example, on maps.google.com, it returns a house in Sammamish WA 98074. But with my codes:

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);
        }
    });

it returns a very different location: 40.6086666, -96.68688929999996

However, if I use full address "20635 ne 25th ct sammamish wa 98074", then the codes returns the same as maps.google.com

Any clue?

  • It is resolving that to: "20635 S 25th St, Hickman, NE 68372, USA (40.6086666, -96.68688929999996)". Always be as specific as you can be with addresses to the geocoder. – geocodezip Feb 10 '16 at 23:29
  • thanks! I just don't get the background or the logic here. If their database can find a better match (ROOFTOP type location), then why do they choose return a RANGE_INTERPOLATED location? and this is the only return in that array.... And different products have different result??? – user2639723 Feb 10 '16 at 23:32
  • Google Maps != Google Maps Geocoder – geocodezip Feb 10 '16 at 23:34

1 Answers1

0

Ok, let me answer myself. I asked my friend who is in MA to run that address, then maps.google.com returns location near her. So what I guess is maps.google.com will collect some user info or location info, and return a address base on these infos first, instead of based on best match of address itself.

So, right, in order to get best result no matter where you at, giving the address as detail as possible... I guess