AnsweredAssumed Answered

How do I get a list of operational layers from a web map built with new Map() and map.addLayer?

Question asked by Zian on Sep 2, 2015
Latest reply on Sep 9, 2015 by Zian

I would like to use the new LayerList widget in version 3.14 of the SDK and I saw that the sample (Layer List Dijit ) calls an undocumented helper function to get a list of operational layers from a web map hosted by ArcGIS Online.

 

Is there any way to get a list of operational layers from a web map where the map and layers have been added using JavaScript calls so that I can pass the list to the LayerList widget? Right now, when I pass in the map object, I see things like "layer0" and "layer1".

Outcomes