I am trying create a map using google maps v3 api. I have found the below code over internet and I want to show the latitude and logitude in map window instead of address.
Much simpler solution will be :
var address = "New Delhi"
$.ajax({
url:"http://maps.googleapis.com/maps/api/geocode/json?address="+address+"&sensor=false",
type: "POST",
success:function(res){
console.log(res.results[0].geometry.location.lat);
console.log(res.results[0].geometry.location.lng);
}
});
Cheers