[OpenLayers-Dev] raiseLayer doesn't raise my layer

Kevin Kempfer mail at kevinkempfer.de
Thu Mar 19 11:27:49 EDT 2009


Hi,

I have two base layers and 2 overlays. One of the overlays is a vector
layer, the other is a marker layer. The marker layer doesn't react on
events - looks like the vector layer lies on top of it and doesn't let
events fall through. When I switch off the vectors layer, the markers
layer reacts as expected.

I tried to map.raiseLayer(vectors,-1) and map.raiseLayer(markers,1) to
no avail even with greater values. I had a look into the code and
realized the z-index of these layers should be changed when calling
raiseLayer. So I changed the z-index myself using
markers.div.style.zIndex = vectors.div.style.zIndex + 1
Now it works as expected, the vector layer catches its events (features
clicked etc.) and the markers layer does, too.

I know this is not the way it should be done - did I miss anything? Do I
have to take care of something other than calling raiseLayer?

OpenLayers.VERSION_NUMBER="$Revision: 4899 $";

Thanks for any help,

Kevin

-- 
http://www.kevinkempfer.de
Tel.: (07071) 860303
ICQ:  2186573
Skype: kevin0815

"Persönliche Angaben zum Antrag sind freiwillig. Allerdings kann der
Antrag ohne die persönlichen Angaben nicht weiter bearbeitet werden."
(Formular in Postgirodienst)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3249 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20090319/05a98e74/smime.bin


More information about the Dev mailing list