laptop and a wrench

Bug

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 ModifiedJune 5, 2024
Applies toArcGIS API for JavaScript
Version found3.15
Operating SystemWindows OS
Operating System Version7.0 64 Bit
StatusNon-Reproducible

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

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