[OpenLayers-Dev] Vector layers seem to block mouseover/mouseout events from lower Marker layers

Peterson Eric-EEP002 Eric.Peterson at motorola.com
Thu Jul 19 17:17:22 EDT 2007


Here's what I'm seeing ... is this correct behavior or am I doing
something wrong?

I've got a Markers layer, and each marker in the layer has an associated
popup. On a mouseover/mouseout event on the marker, it runs the
corresponding popup's show()/hide() method.

I've noticed that if I also have a Vector layer and the Vector layer has
a higher z-index than the Markers layer, then the mouseover/mouseout
events are never triggered for the Markers layer. But if I call
map.raiseLayer() on the Markers layer to move it higher than the Vector
layer, then the events work normally.

The effect seems to work with multiple Markers layers as you'd expect -
the ones above the highest Vector layer all have their
mouseover/mouseout events triggered. But the ones beneath the highest
Vector layer never see mouseover/mouseout events.

I'm using Firefox 2.0.0.4. I haven't tested this behavior on IE (yet).

Is this the way it's supposed to work? I'm hoping that there's some
Layer option that blocks propogation of events to lower layers that I've
forgotten to disable. But I've thumbed through the code and the apidocs
for Layer and Vector, but I didn't see anything immediately obvious.

Any ideas?

-eP
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20070719/1bdf7daa/attachment.html


More information about the Dev mailing list