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
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.