AnsweredAssumed Answered

Override LayerList layer name in 3.16

Question asked by evtguy on May 19, 2016
Latest reply on Jan 30, 2018 by rscheitlin

So, awhile back, I posted this thread about changing the label associated with a layer checkbox in the LayerList widget. The solution posted in that thread (setting id: "some layer name") does not seem to work using the 3.16 API version of the layerList widget.

 

code snippet:

        // Initialize and set up the LayerList
        layerWidget = new LayerList({
           map: app.map,
           showLegend: true,
           showOpacitySlider: true,
           showSubLayers: false,
           layers: [
                {layer:wsdotBridgeLayer,
                visibility:true,
                id:"WSDOT Bridges"
                },
                {layer: KingCoBridgeLayer,
                visibility:true,
                id:"King County Bridges"                
                },
                {layer:priorityRoadsLayer,
                visibility:true,
                id:"Priority Roads"
                }
           ]},"layerList");
        layerWidget.startup();

 

Result at load:

layerList_layerLabel_3_16_example.jpg

 

Has anybody encountered this and found a solution?

 

Steve

Outcomes