<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>RE: [OpenLayers-Users] OT: Event propagation problem...</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>I had a similar problem, and I hacked in a little kludge to allow me to turn off event propogation entirely:<BR>
<BR>
var map = new OpenLayers.Map('map', mapOptions);<BR>
<BR>
//This is a serious kludge, to allow us to turn off event handling on the map,<BR>
//when OpenLayers supports no such functionality.<BR>
map.events.idle = false;<BR>
map.events.originalTriggerEvent = openLayersMap.events.triggerEvent;<BR>
map.events.triggerEvent = function(type, evt) {<BR>
if (this.idle) return;<BR>
this.originalTriggerEvent(type, evt);<BR>
};<BR>
<BR>
It's ugly, and it may get me into real trouble, some time in the future, but it works.<BR>
<BR>
If I set map.events.idle = true, no events fire at all.<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: Steve Lime [<A HREF="mailto:Steve.Lime@dnr.state.mn.us">mailto:Steve.Lime@dnr.state.mn.us</A>]<BR>
Sent: Wed 11/28/2007 5:12 PM<BR>
To: Jeff Dege; users@openlayers.org<BR>
Subject: RE: [OpenLayers-Users] OT: Event propagation problem...<BR>
<BR>
No response at all, the content covers the whole map interface at the moment. Whether that works as a design (from a user perspective) is yet to be seen.<BR>
<BR>
Steve<BR>
<BR>
>>> On 11/28/2007 at 5:01 PM, in message<BR>
<34E056CD4D475841B8C9ABCE956F92F615A37B@mrburns.KorOffice.local>, "Jeff Dege"<BR>
<jdege@korterra.com> wrote:<BR>
> Do you want the map to not respond to clicks on your help or legend div?<BR>
><BR>
> If so, you'll need to define event handlers, the way Popups do.<BR>
><BR>
> Or do you want the map to not respond at all, while your help or legend is<BR>
> visible?<BR>
><BR>
><BR>
> -----Original Message-----<BR>
> From: users-bounces@openlayers.org on behalf of Steve Lime<BR>
> Sent: Wed 11/28/2007 4:56 PM<BR>
> To: users@openlayers.org<BR>
> Subject: [OpenLayers-Users] OT: Event propagation problem...<BR>
> <BR>
> Hi all: Slightly off-topic question. I'm working on an interface that plops<BR>
> help and legend content over the top of an OpenLayers<BR>
> map. Problem is that mouse events continue to propagate through the help or<BR>
> legend content to OpenLayers. Anyone aware of<BR>
> an easy way to stop that or do I need to go ahead and define event handlers<BR>
> (that do nothing) for the div that holds this other<BR>
> content?<BR>
><BR>
> Steve<BR>
><BR>
> _______________________________________________<BR>
> Users mailing list<BR>
> Users@openlayers.org<BR>
> <A HREF="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</A><BR>
<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>