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
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.