Hi everyone
We're building a webmap with the API 4.x.
We've got a couple of layers which we need to order in the legend in a given way. The order of the layers in the layerlist needs to be thematically ordered. (We don't need to order sublayers nor features.)
However, the drawing order of these layers needs to fit cartographic and other needs. We would like to stick to "polygon under lines under points". Furthermore, there are some layers with higher importance than others. We would like to be able to place those above (or below) other layers.
How can we control the drawing order of the layers independently from the order of the layers in the layerlist?
I created a codepen: https://codepen.io/nwp_nadja_bernhard/pen/OJvOQdp?editors=0011