If there are multiple Placemarks, then the result.Placemark[] array will
have length greater than 1.
if (result.Placemark.length > 1) { ... }
You can loop through the Placemark[] array like this:
for (var i=0; i<result.Placemark.length; i++) {
var coords = result.Placemark[i].Point.coordinates;
var address = result.Placemark[i].address;
...
}
E.g. http://econym.org.uk/gmap/example_didyoumean1.htm
The number of situations in which the geocoder returns multiple
addresses for forward geocoding has significantly decreased from what it
was originally, but "Bispham Road, Bispham, UK" really is an ambiguous
address. There really are two "Bispham Roads" in Bispham (and Google
currently adds a third one that's really in Cleveleys). I've no idea how
the postman copes with letters that don't have postcodes.
--
Mike Williams
http://econym.org.uk/gmap
--
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.