Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing base layers to GroupedLayerControl plugin #1876

Open
berrfred opened this issue Feb 8, 2024 · 2 comments
Open

Passing base layers to GroupedLayerControl plugin #1876

berrfred opened this issue Feb 8, 2024 · 2 comments

Comments

@berrfred
Copy link
Contributor

berrfred commented Feb 8, 2024

My goal is to display in a single control layer component both base layers and grouped overlays.

As far as I understand today we can either display base layers with non grouped overlays or display grouped overlays with the GroupedLayerControl plugin but then a null is used for base layers ...

Why not allowing to also pass a base layers array to the GroupedLayerControl ? Then setting the regular control to False I should be ok.

@berrfred
Copy link
Contributor Author

berrfred commented Feb 8, 2024

Below what I would like to achieve.

image

@hansthen
Copy link
Collaborator

hansthen commented Apr 7, 2024

@berrfred That would be a useful addition. The underlying leaflet control supports this, so it should be possible to add. I am not sure when this will be picked up though (unless you are willing to make PR yourself).

In the meantime, there is another plugin (treelayercontrol.TreeLayerControl) that already supports adding base Layers.
This control is scheduled to be released with release 17, but you can pip install it from source code. Can you have a look to see if this would help for your use case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants