laptop and a wrench

Bug

The LayerList widget does not show sublayers for multiple layers using layers property in the JavaScript application.

Last Published: August 15, 2018 ArcGIS API for JavaScript
Bug ID Number BUG-000115195
SubmittedJuly 6, 2018
Last ModifiedMay 2, 2025
Applies toArcGIS API for JavaScript
Version found3.25
Operating SystemN/A
Operating System VersionN/A
StatusNon-Reproducible

Additional Information

Incorrect syntax, replace it to read var layerList = new LayerList({ map: map, layers: [{ layer: statesLayer, id: "states layer", subLayers: true }, { layer: dynamicMapServiceLayer, id: "dynservice layer", subLayers: true } ], showSublayers: true }, "layerList");' and it works

Workaround

Use:   var layerList = new LayerList({    map: map,           },"layerList");In place of:  var layerList = new LayerList({    map: map,        showSubLayers: true,   layers: [ statesLayer,dynamicMapServiceLayer]            },"layerList");

Steps to Reproduce

Bug ID: BUG-000115195

Software:

  • ArcGIS API for JavaScript

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options