laptop and a wrench


The LayerList widget does not function correctly when layers are added as an array.

Last Published: January 12, 2016 ArcGIS API for JavaScript
Bug ID Number BUG-000093428
SubmittedJanuary 11, 2016
Last ModifiedNovember 4, 2023
Applies toArcGIS API for JavaScript
Version found3.15
Operating SystemWindows OS
Operating System Version7.0 64 Bit

Additional Information

This is not a bug. The layer in the array needs to be defined with a lower-case l as shown in the JSAPI documentation. The app should work if updated as shown below. var myWidget = new LayerList({ map: map, layers:[ { layer: featureL0, id: "Waterbodies", visibility: true }, { layer: featureL1, id: "Rivers" } ] },"layerList"); myWidget.startup(); In the above, the word "layer" needs to use a lower-case l.

Steps to Reproduce

Bug ID: BUG-000093428


  • ArcGIS API for JavaScript

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic