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
146 stars 36 forks source link

Radiogroup for subgroups #51

Open fernakasa opened 3 years ago

fernakasa commented 3 years ago

Hi, firts of all thank you very much for this excelent work, my proposal is, if possible, create mutually exclusive subgroups of layers, that is, subgroups with radiogroups

Example: 
var overlayLayers = {
label: 'Group 1',
children: [
  {  label: 'SubGroup 1',
      radioGroup: 'bc',
      children: [
         {  label: 'Layer 101',
            layer: lay101-example
         }, 
         ...
   },
  {  label: 'SubGroup 2',
      radioGroup: 'bc',
      children: [
         {  label: 'Layer 201',
            layer: lay202-example
         },
         ...
   }
 ]
};

I hope i have explained myself, i know my english is not good but im working on it

olivbrau commented 3 years ago

That would be very nice, and very useful !