Hello,

I am sending a gLatLng to getLocations to do a reverse geocode. I am
getting 5 placemarks back, none of which have the same point as I gave
it!

Simplified code snippet:

    point = new GLatLng('40.456800', '-74.721000')
    this.geocoder.getLocations(point, function(response) {
        thisC.geocodeHandler(point, response, thisC)
    });

    geocodeHandler: function(inAddress, response, thisC) {
        place = response.Placemark[0];
        outPoint = new GLatLng(place.Point.coordinates[1],
place.Point.coordinates[0]);
    }

outPoint will not have the same latlong as I gave it! There are four
other returned placemarks with progressively worse results.

Ahhhaa!

I think I have it figured out now. It appears to be returning the
centroid of the closest cities (Hillsborough, Somerset), the state
(New Jersey) and the country (USA) in the result set. If you are also
close to a street, it will return the closest address range, probably
the middle of the street segment, not a centroid.

This is not explained in the API docs, so it is now explained here.

- Brad

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to