I'm trying to get the coordinates for a single click on the map.
The code below is something I've cobbled together that gets the coords
for the center of the map, upon double click. But I'd like to get the
point under the mouse when I single click.
(stuff in comments are attempts)
google.maps.event.addListener(
map, "dblclick", function(
overlay, latlng, overlaylatlng
) {
// var point = new GLatLng( latlng.y, latlng.x );
//document.getElementById("log").innerHTML =
map.getCenter().toString();
document.getElementById("log").innerHTML = '|' +
map.getCenter().lat().toFixed(6) + ' |' +
map.getCenter().lng().toFixed(6);
});
same code here...
http://pastebin.com/A293Et9b