title: LeafletJS - Default selection of layers
body: <p>I'm using <a href="https://github.com/ismyrnow/leaflet-groupedlayercontrol/blob/gh-pages/src/leaflet.groupedlayercontrol.js" rel="noreferrer">leaflet-groupedlayercontrol</a> to add my grouped layers to the map and I have a problem: </p>
  
  <p>All the layers are deselected, but I want to <strong>select all</strong> by default. I am using checkboxes, not radio buttons.</p>
  
  <pre><code>var groupedOverlays = {
      "Select": {}
  };
  
  groupedOverlays["Select"]["Group 1"] = groups[0];
  groupedOverlays["Select"]["Group 2"] = groups[1];
  groupedOverlays["Select"]["Group 3"] = groups[2];
  
  // Use the custom grouped layer control, not "L.control.layers"
  L.control.groupedLayers(null, groupedOverlays, {collapsed:false}).addTo(map);
  </code></pre>
  
  <p><strong>I tried to select them with JS</strong>, but didn't worked.</p>
  
  <p><em>If you know a solution for LeafletJS, but not for that particular plugin, it's ok too.</em></p>