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

Non base layer group with radio buttons #315

Open
kennethhaspeel opened this issue May 27, 2020 · 2 comments
Open

Non base layer group with radio buttons #315

kennethhaspeel opened this issue May 27, 2020 · 2 comments

Comments

@kennethhaspeel
Copy link

As it is now, the base layer group gets radio buttons. Other layer groups get checkboxes. But i would prefer that the user can only select one layer at a time, so with radio buttons.
Is this possible?
I tried setting the optional layers as base layer but that just controls all base layers, not just the layers in that group.
I could add a dropdown outside of the map and toggle visibility but it's for use on mobile devices so screen real estate is limited. And i prefer everything to be focused on the map.
I'm pretty sure this is just an option somewhere that I don't know about

Something like this
image

@walkermatt
Copy link
Owner

I'm not in front of my laptop ATM so can't test but have you tried setting type of the layers to base?

@kennethhaspeel
Copy link
Author

That is what i meant with "I tried setting the optional layers as base layer but that just controls all base layers, not just the layers in that group". I assumed it would work like this but it doesn't.
I set all the layers to base. This sets the name attribute of the inputs to base. So all the layers are in one radio group and not in radio groups by layer groups
Initial
image
Click layer
image
Hope this explains it better than my first attempt. I want the user to be able to select a base layer (not sure if that's the correct term) and then select one detail layer

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