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

Layer Switcher - Layer does not need the group to be marked to be visible #1057

Open
NicolasSvaiger opened this issue Apr 29, 2024 · 4 comments

Comments

@NicolasSvaiger
Copy link

I want the layer to be visible even with the group unmarked, so that when the group is marked, turn on all the layers present in it and if it is unmarked, turn them off.
Group turn on
image
Group turn off
image

Group off, layer on

Uploading image.png…

@Viglino
Copy link
Owner

Viglino commented Apr 30, 2024

You have to do it programmatically.
Here is an example: https://codepen.io/viglino/pen/bGQNdPB

@NicolasSvaiger
Copy link
Author

Thanks, worked. But the layers and layers group are inverted.

@NicolasSvaiger
Copy link
Author

The GroupLayers they are being added inverted, when I place, for example, the groups on the map: Base, Over, Extra.
He is:
Extra
Over
Base
Rather than:
Base
Over
Extra

@Viglino
Copy link
Owner

Viglino commented May 12, 2024

That’s the standard behavior: extra is on top of the other layers and base is the lower one. The order reflect what is seen on the map.

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