Hi I would like to know if Geocoder is still working? It does not seems to reactive when I initialize new google.maps.geocoder(); My purpose here is to obtain the location address from the latitude and longitude.
Alert A and B is working. Stops at Alert C.
$('#btn').click(function initialize() {
alert("A");
var loc = {};
alert("B");
var geocoder = new google.maps.Geocoder();
alert("C");
if(google.loader.ClientLocation) {
alert("D");
loc.lat = google.loader.ClientLocation.latitude;
loc.lng = google.loader.ClientLocation.longitude;
var latlng = new google.maps.LatLng(loc.lat, loc.lng);
geocoder.geocode({'latLng': latlng}, function(results, status) {
if(status == google.maps.GeocoderStatus.OK) {
alert(results[0]['formatted_address']);
};
});
}
});