Thanks Larry, in case anyone gets this issue, this is what I did to
fix it:
//takes a google.LatLng object
//returns an array with city at [0] amd country at [1]
function reverseGeocode(marker) {
var location = new Object();
city = ["administrative_area_level_1", "political"];
country = ["country", "political"];
var geocoder = new google.maps.Geocoder();
geocoder.geocode({location: marker.getPosition()}, function(results,
status) {
if (status == google.maps.GeocoderStatus.OK) {
for(i=0; i < results[0].address_components.length; i++) {
if((location.city && location.country) == null) {
if(results[0].address_components[i].types[0] == city[0] &&
location.city == null) {
location.city =
results[0].address_components[i].long_name;
}
else if(results[0].address_components[i].types[0] == country[0]
&& location.country == null) {
location.country = results[0].address_components[i].long_name;
}
}
}
marker.city = location.city;
marker.country = location.country;
}
});
}
On Nov 5, 12:36 am, "
geocode...@gmail.com" <
geocode...@gmail.com>
wrote: