[OpenLayers-Dev] Re-Ordering Layers

Christian Mayer mayer at terrestris.de
Tue Feb 22 07:51:18 EST 2011


Hello Kevin,

I think the setLayerIndex of the OpenLayers.Map object is what you are 
looking for.

Here the API docs:
http://dev.openlayers.org/releases/OpenLayers-2.10/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.setLayerIndex

Best regards,
Chris


Am 21.02.2011 21:25, schrieb KevinGreen24:
> I have a select feature control which holds some vector layers. I then add a
> WMS layer to the map, which does not go inside the select feature control.
> Is there any way to reIndex or reOrder the layers such that the WMS layer
> could appear above one or many of the layers inside of the SelectFeature
> control's layer list? I think the problem is that the SelectFeature spawns
> this RootContainer layer, which is at the top layer, and i cannot move my
> WMS layer above it.
>
> Does this make sense? I can clarify if need be.
>
> -KG


More information about the Dev mailing list