[OpenLayers-Users] popup and setzindex
brad
brad at numaps.com.au
Wed May 11 18:01:11 EDT 2011
Valeria,
I may have this wrong so people can correct me.
But this seems to be an issue with OL as I notice that if you have a lot of
layers and vectors and event controls you can get in a little bit of a
pickle with respect to different zIndexes.
I got around this by making all my added layers relative to the popups which
I set initially at 10000 with the following >> map.Z_INDEX_BASE['Popup'] =
10000;
Then whenever I add a layer I make its zIndex below that with the following
>> PolygonLayer.setZIndex(map.Z_INDEX_BASE['Popup'] - 1000); So this vector
layer is set at 9000. Etc.
I have noticed that sometimes zIndexes change so periodically in my app I
reset all the zIndexes so that they are where I want them to be with a
function call resetZlevels().
If I also want a layer to be on the top I can temporarily change its zIndex
so its on top of others but always below popup. With the following >>
layerObject.setZIndex(map.Z_INDEX_BASE['Popup']-10);
This way I have managed to work around some of the problems you refer to but
its probably a sledgehammer approach.
Hope this helps.
Cheers, Brad....
From: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] On Behalf Of Valeria Muñoz
Sent: Thursday, 12 May 2011 5:44 AM
To: users at openlayers.org
Subject: [OpenLayers-Users] popup and setzindex
hi!!
i have a problem with my popup, the popup appears under the layers.
can i define something like setZindex for OpenLayers.Popup?
RG
Valeria
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110512/54695109/attachment-0001.html
More information about the Users
mailing list