You might consider ditching that reverse geocoder script and using
GClientGeocoder directly.
var geocoder = new GClientGeocoder();
GEvent.addListener(map, 'click', function(overlay, latlng){
if(latlng){
geocoder.getLocations(latlng, function (result) {
if (result.Status.code == G_GEO_SUCCESS) {
var html = result.Placemark[0].address;
if (result.Placemark[0].AddressDetails.Country) {
html += "<br><b>Country code:";
html +=
result.Placemark[0].AddressDetails.Country.CountryNameCode;
}
} else {
var html = "Reverse geocode failed: error "+ result.Status.code;
}
map.openInfoWindowHtml(latlng,html);
});
}
});
--
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
-~----------~----~----~----~------~----~------~--~---