laptop and a wrench

Bug

map.allLayers.on("change", function(event)) doesn't provide the list of the operational layers and the sub layers using event.added.

Last Published: November 3, 2017 ArcGIS API for JavaScript
Bug ID Number BUG-000108390
SubmittedSeptember 28, 2017
Last ModifiedJune 5, 2024
Applies toArcGIS API for JavaScript
Version found4.4
Operating SystemWindows OS
Operating System Version10.0
StatusWill Not Be Addressed

Additional Information

This is not intended to work with sublayers this way. In order to listen for sublayers within the MapImageLayer, you must listen for layer.allSublayers.on("change"...) not map.allLayers.on("change"...)

Workaround

event.moved provides the list of the operational and sublayers.

Steps to Reproduce

Bug ID: BUG-000108390

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