I want to retrieve x/y coordinates at every click-event on Google Maps.
Could someone help me please?
I want to retrieve x/y coordinates at every click-event on Google Maps.
Could someone help me please?
google.maps.event.addListener(map, "click", function (e) {
document.form1.waypointLog.value = e.latLng.lat().toFixed(6)
+ ' |' + e.latLng.lng().toFixed(6);
});
Source: https://groups.google.com/group/google-maps-js-api-v3/browse_thread/thread/3f4329e3a20e7b0b
You can also check: http://forums.gpsreview.net/viewtopic.php?t=3632