How do I hide a layer in the layer list widget when the layers are being generated from a AGO web map? I know I can control the visibility on the layer but I'm not declaring any layers--just pulling over what exists in the web map.
Scott
Scott, you need to loop through the web maps layer and use the legendEnabled property on the layer of interest.
https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html#layers
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.