Does anyone know how to make the default Google map screen long and lat-coordinates in the info window when the user clicks on the map?
Header Code:
<script src="http://maps.google.com/maps?file=api&v=2&sensor=true&key=..." type="text/javascript"></script>
<script type="text/javascript">
function initialize() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(13.175771, -59.556885), 10);
map.setUIToDefault();
}
}
</script>
Body code:
<div id="map" style="width: 640px; height: 300px"></div>
source
share