It looks to me that I cannot mix WMS and vector layers' order in OpenLayers 2.
I have an ordered map.layers object and assign z-index values to the layers based on order in the object, for example, map.layers has a higher zIndex than map.layers but lower than map.layers.
Yet, if map.layers is a WMS layer and the others are not, the WMS will appear at the bottom on the map, when rendered. The only way to make WMS layer appear on top is to actually setting its zIndex to the highest value on map.layers. Orders between other types of layers are respected and they overlay correctly.
Is it possible to mix WMS and vector layers at all? Or have all the WMS layers to be under all vector layers uncondicionally?
Based on How to define layer order in Openlayers? I manually reordered the whole map.layers object and still it seems to not to work, even if I can check that layer.div.style.zIndex is the theoretically correct for every single layer, and yet that value seems to not be respected when rendering.