15

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
  • Maybe you check out github.com/davicustodio/Leaflet.StyledLayerControl – g07kore Aug 31 '17 at 7:45
  • 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 Mar 21 '18 at 7:47
  • 2
    @Senshi I have, and most plugin authors say that nested groups are out of scope for their plugins. – Tom Chadwin Mar 21 '18 at 23:25

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.