34

I need a Leaflet plugin which extends L.Control.Layers. I have the following requirements:

  • works with Leaflet 1.x
  • handles ungrouped layers alongside grouped ones
  • handles nested layer groups
  • does not rely on actual Leaflet LayerGroups, but can be built up independently (in other words, layers can be grouped in this control in a different structure to how the layers themselves are grouped in the Leaflet map)

I've tried:

Can anyone suggest if any plugin does what I need?

BOUNTY ADDED To qualify for the bounty, please link to or upload a fully working example using Leaflet 1.x, including in the custom layer control:

  • ungrouped layers
  • grouped layers
  • nested groups
5
  • 4
    Maybe you check out github.com/davicustodio/Leaflet.StyledLayerControl Commented Aug 31, 2017 at 7:45
  • 4
    I think you're asking the wrong question. It'd make more sense to ask WHY the plugins you already linked are not working for you, and try investigating that.
    – Senshi
    Commented Mar 21, 2018 at 7:47
  • 5
    @Senshi I have, and most plugin authors say that nested groups are out of scope for their plugins. Commented Mar 21, 2018 at 23:25
  • 3
    do you mean grouping together items like tile layers separate to your geojson file ? Commented Jul 26, 2020 at 13:38
  • 4
    Greta question, and I would love to know the answer. Of course, nowadays, I would ask on software recommendations
    – Mawg
    Commented Feb 15, 2021 at 9:42

0

Browse other questions tagged or ask your own question.