> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of > Erik Uzureau > Sent: Tuesday, July 31, 2007 5:48 PM > To: Jeff Dege > Cc: [email protected] > Subject: Re: [OpenLayers-Users] Stopping map events > > On 7/31/07, Jeff Dege <[EMAIL PROTECTED]> wrote: > > I have a div that is being drawn on top of the map. > > > > Clicks in this div are being interpreted as clicks on the map. > > > > Is there a way of either keeping clicks in this div from reaching the > > map, or of temporarily stopping event handling by the map, while the div > > is in place? > > If you search for and study the OpenLayers.Event.Stop() function, you should > be able to do this no problem.
Digging into that functionality would seem to be necessary if I were trying to stop events from my div from propogating to the map. OpenLayers.Popup does this - registering itself on a number of events, preventing the underlying map from seeing them when the event happened in the popup. What I'm looking for is quite a bit simpler, if somewhat more drastic. I don't want the map to respond to input at all, until I let things go again. A simple kludge is to add a boolean idle:false to OpenLayers.Events, then to add 'if (this.idle) return;' to the beginning of OpenLayers.Events.TriggerEvents(). Then, between if I set map.events.idle = true, when I display my div, and set it to false when I bring it down, the map will respond to nothing while my div is visible - making it act like a modal dialog. _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
