I've been reading through the help and readme.md and playing with the configuration options for the CMV LayerControl and I'm pretty confused by the possibilities. It seems to me there are at least 2 if not 3 places where configurations can be set for this control.
The first choice seems to be where you configure the widget in viewer.js in the widgets.layerControl.options. In the "options" object you can add "Control Options" configuration attributes such as "exclude", "noLegend", "noZoom", "noTransparency", "swipe", "swipeScope", "expanded", "sublayers", "metadataUrl", "allSublayerToggles". Setting it here would affect all service "layers".
The next place where you can do some configuration is the viewer.js in the operationalLayers.layerControlLayerInfos object. It looks like here you can also add some "Control Options" at the service "layer" level. This would affect each service "layer" independently.
The final place, and this is what I'm most confused about, it appears that you can create your own LayerInfos array of LayerInfo objects to customize the Layer Control for each GIS "layer" (ie. sub-layer in a Dynamic Map Server Layer)?
Maybe I'm just wishing this to be the case.
Can someone confirm that?
Where would you use the LayerControl Class?
I guess that would be if you wanted to add the LayerControl widget to the DOM in a some other location?
Can you do anything with sub-layers in a Dynamic Map Service Layer?