-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Layer ordering issue ? #52
Comments
The problem is that the layers are added as you click on them in the menu, if I a not wrong. You would have the same problem using a ControlLayer, right? |
Thanks for your answer. Indeed, it is not an issue of your plugin.
As removing and re-adding layer can be slow (if many layers), the bLayerAdded allow to optimize a bit (i remove/re-add only if a layer has been added below) Maybe I can modify a copy of your plugin instead of modifiyng leaflet code, it seems more clean for me. -> do you know a way to implement this reordering in your plugin, I've not found a good way (but I am a real beginner in javascript) Thanks in advance. |
I was thinking more on defining |
Hi,
I create 3 LayerGroup (L1, L2, L3). I would like that L3 is over L2 and L2 over L1.
In pure leaflet code, if create the 3 layergroups and add them to the map in this order 1->2->3 and the result is OK.
But if then I create a ControlTreeLayer with these 3 layers, if I deselect then reselect L1, it goes over L2 and L3.
-> how can I maintain the order of the layers, whatever I do with selection/deselection ?
I forced the option autoZIndex:true (which is true by default anyway) but it doesn't seem to work.
Thanks a lot for your help !
Olivier
The text was updated successfully, but these errors were encountered: