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.
Where you have
var address = '';
if (place.address_components) {
address = [
(place.address_components[0] && place.address_components[0].short_name || ''),
(place.address_components[1] && place.address_components[1].short_name || ''),
(place.address_components[2] && place.address_components[2].short_name || '')
].join(' ');
}
infowindow.setContent('' + place.name + '
' + address);
infowindow.open(map, marker);
Change the infowindow line to read
infowindow.setContent('' + place.name + '
' + place.geometry.location.lat() + ',' + place.geometry.location.lng());