Layer order control
Ability to easily control the z-index order of tile and vector layers.
The problem with this feature is that SVG doesn’t support z-index ordering by design. The only way to do this is to reorder DOM objects, which is quite inefficient if you want precise control. It’s even worse in Canvas where you have to rerender all layers in the correct order.
In the current master version, I’ve implemented bringToBack and bringToFront methods for both vector and tile layers which should satisfy most of the use cases here, but will continue designing a more sophisticated solution.
I have found that the order of the DOM objects does control the order of the tile layers (first statement is first) in Firefox Funnelcake and Chrome Version 32.0.1700.102 m, but NOT in Internet Explorer 11.
Thomas Schmidt commented
Would this change allow to lay transparent tile layers on top of the tjson map? Those decorating tile layer don't need to be clickable, just click-through to the vector map. Is that possible?
Do you have a roadmap/timeframe when layer order control might be implemented completely?
Ok, I an imagine that this feature probably is not solvable so easily...
Currently we use Openlayers but I would really like to use Leaflet in the feature because of its general performance . Just our scientific background requires that we show more than some baselayers in the map...Thanks for the fast response and for having this on the planned feature list!
Any updates on this? I plan to use Leaflet once it has a proper layer management where I can order layers in a stack and change the position. Also openlayers is going this direction...The artificial limitation in current APIs is somehow a relict of the past :-)