Wasn't it Shane who wrote:

>GEvent.addListener( map, "mousedown", function(){ alert('please
>work.'); });

That doesn't work because the API doesn't issue "mousedown" events for
the map itself, only for some types of overlay.

>GEvent.addDomListener( map.getContainer(), "mousedown", function()
>{ alert('no dice.'); });

That doesn't work because the API eats the event above the map
container, so that it can do map drags. The event doesn't get all the
way down to the map container.

In fact the "mousedown" event only gets down as far as the
map.getDragObject() layer. So you can catch it there, but only if
there's no "mousedown"able overlay at that location. Unlike "click"s,
the API doesn't propagate "mousedown" events. Once the "mousedown" hits
something that's listening for that event it gets eaten.

  GEvent.addDomListener( map.getDragObject(), "mousedown", function() {
        alert('This Works');
   });

  GEvent.addListener( map.getDragObject(), "mousedown", function() {
        alert('And so does this');
  });

-- 
http://econym.org.uk/gmap
The Blackpool Community Church Javascript Team


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to Google-Maps-API@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to