How to convert latitude and longitude value into address in javascript? I had tried geolocation, but its display only the 10 address. It will not display more then ten address. my code:
if (result.Status.code == G_GEO_SUCCESS) {
for ( var i = 0; i < result.Placemark.length; i++) {
var addres = result.Placemark[i].address;
// var t1=setTimeout(function(){x.value="2 seconds"},2000);
if (addres == "") {
// alert('blank');
document.getElementById("msg" + noofid).innerHTML = "Unable to find location";
} else {
document.getElementById("msg" + noofid).innerHTML = result.Placemark[i].address;
}
//alert("address");
}
}
// ====== Decode the error status ======
else {
var reason = "Code " + result.Status.code;
if (reasons[result.Status.code]) {
reason = reasons[result.Status.code];
}
alert('Could not find "' + search + '" '
+ reason);
}
});
}