jjimenezshaw / Leaflet.Control.Layers.Tree

a Tree Layers Control for Leaflet
https://jjimenezshaw.github.io/Leaflet.Control.Layers.Tree/examples/basic.html
BSD 3-Clause "New" or "Revised" License
148 stars 36 forks source link

Legend Control #6

Closed mmirhi closed 6 years ago

mmirhi commented 6 years ago

Hi

Thank you for the great function.

When you say: "addBaseLayer, addOverlay and removeLayer are non usable in L.Control.Layers.Tree.", do you mean I cannot control the legends of the map for each layer?

Thank you

jjimenezshaw commented 5 years ago

Hi. Sorry for the late answer. For some reason I didn't get any notification.

Those methods are not usable because they add (or remove) a layer incrementally, at the end of the list. Due to the tree structure, you have to provide the full tree, not layers one by one.