[OpenLayers-Users] Problems with layer order
Andreas Hocevar
ahocevar at opengeo.org
Wed Mar 16 22:01:50 EDT 2011
On Mar 16, 2011, at 14:08 , Stefan Kemper wrote:
> Hi Andreas
>
> thanks for your answer. Now I understand the behavior much more. It
> means that it is not posible to us z-index combined with a SelectFeature
> control over multiple Layers.
>
> One question is still remaining: is it posible to change the order of
> the g-tags after the first initialisation?
Sure. Use OpenLayers.Map::setLayerIndex.
Andreas.
>
> I am glad to hear from you.
>
> Greetings
> Kempi
>
> Am 16.03.11 01:04, schrieb Andreas Hocevar:
>> Hi,
>>
>> OpenLayers only groups vector layers into one svg root when you use a SelectFeature control with multiple layers and have it activated. Otherwise, each layer has its html div and its own svg root.
>>
>> Cheers,
>> Andreas.
>>
>> On Mar 10, 2011, at 10:24 , Kempi wrote:
>>
>>> Hello...
>>>
>>> I'am new with openlayers and could make a lot of things. But one thing is
>>> strange and I don't understand it:
>>>
>>> If I add my vector layers they are normally all in one svg image. Each layer
>>> has its own g-tag. Thats nice... but if it is so the function on the layer
>>> setZIndex dosen't have any effect. This is logical because the z-index match
>>> on the hole svg-image.
>>>
>>> Question 1:
>>> But how can i change the g-tags order in the image if I like to change that
>>> after the initiation process?
>>>
>>> Question 2:
>>> If I add a layer after a while, openlayers put them into a separated svg
>>> image. Thats nice because than I can work with z-indexes but the div of that
>>> new svg is greater then the visible part of the svg image. That is the
>>> reason why I can't work with mouseover events on the svg image under the new
>>> svg image I made. How dose the openlayerscript decide when it makes a new
>>> svg image and do I have the posibility to affect the behavior of OpenLayers?
>>>
>>> I would be glad to get some help with these questions.
>>>
>>> regards
>>> Kempi
>>>
>>> --
>>> View this message in context: http://osgeo-org.1803224.n2.nabble.com/Problems-with-layer-order-tp6158137p6158137.html
>>> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>>
>>
>
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
More information about the Users
mailing list