Hi Friends-
I am trying to determine the lng,lat of a user's click on a GMap...
and due to crazy incompatibilities with other javascript event
handling in my code, I can't use:
GEvent.addListener(map, "click", function() { ... })
So instead, to deal with click events on my map, I must do this:
GEvent.addDomListener(_DOMMapElement, 'click', function(ev) {
var current = _gMap.fromContainerPixelToLatLng(new GPoint
(ev.clientX, ev.clientY));
alert("current: " + current.lat() + "," + current.lng());
});
However, this is returning points that are shifted south east of where
they should be. It seems to shift farther the more I zoom out.
Does anyone have any idea why this might be?
Thanks!!
Dannyboy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" 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-API?hl=en
-~----------~----~----~----~------~----~------~--~---