[OpenLayers-Users] layer event transparency

protos kildimo at gmail.com
Tue May 12 08:25:07 EDT 2009


Thanks for your replies. 
Interesting that the vector layer won't allow events through.

I moved the vector layer down to the bottom so that all
other layers are on top. All the markers layers are working fine now
but something is blocking events on the vector layer now !
There's three marker layers and events can be caught on all three marker
layers, but not on the vector layer. Does this have something to do with 
the fact that I'm using selectFeature to pick up the events ?

Another thing I've noticed is that when setting up z-index'es using the
openLayers setLayerZIndex() function, if you then look at the html and 
the z-indexes assigned to the layer divs, they are completely different 
to what was assigned by setLayerZIndex. I don't mean the actual number
but the layer indexes as they are related to each other. I'm sure there's a
good reason 
for this but it's very confusing - Is there any documentation around on this
? 




protos wrote:
> 
> Hi,
> 
> I have a map with a transparent vector overlay over it, which has some
> features.
> I want the features to pickup click events and apart from that I want the
> overlay
> to allow all other events to go through the vector layer and get picked up
> by the
> layers below (map / markers etc) 
> 
> The vector overlay z-index is higher than all other layers.
> There are no events registered on the vector layer. 
> The features use the selectFeature to pick up events on them. (works fine)
> I've set vectorLayer.event.fallthrough  to true
> I've set vectorLayer.style.pointerEvents to 'none'
> 
> I can't get it to work though and the worst thing is that it's behaving
> very strangely.
> Some of the lower layers will pick up click events, some don't. dragging
> the map 
> works. Events on all the map controls work. 
> 
> Basically the map and one other layer seem to pick up all events.
> 2 other layers don't pick up any events.
> If I remove the vector layer everything works fine so it definitely seems 
> to be the culprit
> 
> Can anyone see what the issue could be with this ?
> Is there problems / bugs with vector layer events  - it seems to be very
> inconsistent.
> 
> Any help appreciated.
> 
> Cheers.
> 
> 
> 
> 
> 

-- 
View this message in context: http://n2.nabble.com/layer-event-transparency-tp2844713p2868792.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list