I would like to expand sublayers when the map starts.

I set sublayers and expanded to true but do not see changes.

I wonder if I misplaced or used the incorrect code.

        layerControl: {
            include: true,
            id: 'layerControl',
            type: 'titlePane',
            path: 'gis/dijit/LayerControl',
            title: i18n.viewer.widgets.layerControl,
            iconClass: 'fa-th-list',
            open: true,
            position: 0,
            options: {
                map: true,
                layerControlLayerInfos: true,
                separated: false,
                vectorReorder: false,
                overlayReorder: false,
                sublayers: true,
                expanded: true,

1 Answer 1


sublayers and expanded are specific to each layer not the widget. These options should be placed within the layerControlLayerInfos for the layer. Here's an example. These and other options for the layerControlLayerInfos are listed in the CMV documentation.

  • Thank you very much. I realized expanded works one level. Would it be possible to expand deeper sublayers?
    – Keisuke
    Mar 8, 2018 at 17:52
  • You can expand group layers in the TOC within the MXD used for the Map Service. There is currently no way to do that within the CMV configuration.
    – tmcgee
    Mar 8, 2018 at 18:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.