Is there any way to have the Geocoder return multiple matching
results? For example: if I query "Halifax" I get "Halifax, England",
but I'm actually looking for "Halifax, Canada". The geocoder could
return multiple results based on the country bias and the match score.
It doesn't however, as far as I can tell.
To see what I mean:
http://www.microsoft.com/maps/isdk/ajax/
Click "Find Information (advanced)", then "Using different settings",
and enable the option "Disambiguation: custom".
The geocoder already returns multiple results for ambiguous queries.
Note that the .geocode() method calls back with an array of
GeocoderResponse structs:
http://code.google.com/apis/maps/documentation/v3/reference.html#Geocoder
I'll file a bug internally to check why "Halifax, Canada" is not
returned. Note that maps.google.com (which uses the same geocoding
database) also returns just Halifax, England:
http://maps.google.com/maps?q=Halifax
Cheers
Ben
> --
>
> You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
> To post to this group, send email to google-map...@googlegroups.com.
> To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>
>
>
I realize that it is supposed to; I've just never seen it do it for
address lookups. Do you have an example? :) I've tried many and never
seen multiple results.
Nick
Example: "new london" always returns New London, CT even though there
are a bunch of them.
It does work for "mystic"... a bunch will be returned.
--Jon
var southWest = new google.maps.LatLng(31.223231, -85.390489); //
Dothan, AL
var northEast = new google.maps.LatLng(34.3797125804622,
-71.7626953125); //Virginia Beach, VA
boundary = new google.maps.LatLngBounds(southWest, northEast);
if(geocoder) {
geocoder.geocode( { 'address': address, 'region': country, 'bounds':
boundary}, function(response, status) { //code } }
Star it if you're interested in this feature please.