[OpenLayers-Users] layer event transparency

Christopher Schmidt crschmidt at metacarta.com
Fri May 8 07:46:02 EDT 2009


On Fri, May 08, 2009 at 04:04:46AM -0700, 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) 

Can't do it. Vector layers block clicks going through to lower layers.

> 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. 

Map controls are all above the vector layers. The map *click* events
will get through, but the markers will not get clicks.

> 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

Yes.

> Can anyone see what the issue could be with this ?
> Is there problems / bugs with vector layer events  - it seems to be very
> inconsistent.

I doubt it's inconsistent -- though it is likely to be the cae sthat it
doesn't do what you want.

-- Chris

> Any help appreciated.
> 
> Cheers.
> 
> 
> 
> 
> -- 
> View this message in context: http://n2.nabble.com/layer-event-transparency-tp2844713p2844713.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> 
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users

-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list