-
-
Notifications
You must be signed in to change notification settings - Fork 278
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 Control - Add ability to group layers with toggle all layers for each group #230
Comments
I also use a lot of layers. I am thinking instead of listing all the layers of all groups, it would be great to save some space by just showing the layers of the group when the group is selected. The group names itself can be the buttons. The group names (buttons) can be all at the top of the widget box with another smaller button (or menus) to turn all layers on/off in that group. The color of the button changes to indicate the selected group. |
I like this idea a lot. It would definitely help save space. I think in the short term, @btfou will be adding functionality to turn on layers on or off. I believe the UI controls should be easily styleable by overriding css. One way to achieve this might be to create a separate widget that uses multiple instances of LayerControl and a stack container controlled by the group buttons. I use a separate instance of LayerControl in one of my widgets and it works very well. The tricky part would be grouping the layers in the config file. If you were to add a group property, it would probably not get passed along in the layerControlInfos a widget can register for. |
@leafyeh7 I like the concept, but it would easier to build a widget with controls like your mockup and a Not sure if you're aware https://github.com/cmv/cmv-app/tree/LayerControl-1.3.1-patch/viewer/js/gis/dijit/LayerControl has complete docs. I won't be adding any UI controls for turning all layers on/off but I will be adding two methods for doing so. Any suggestions for enhancements are welcome or submit a PR. :) |
Reopened. Will close when updated LayerControl is included in a CMV release. |
It would be useful to group operational layers in the LayerControl widget into groups or sets and have the ability to toggle all layers within the set.
Mockup:
The text was updated successfully, but these errors were encountered: