How to get Legend to show all layers without having them selected in the content pane

469
3
02-08-2018 03:12 PM
PatriceCase2
New Contributor

I'm making a webmap using ArcGIS online that is going to be used in a javascript html webmap. I want the webmap to show all the layers in a legend on the webpage, but they don't show up unless they're selected in the content pane. Is there anyway to show the layers in the legend without having them selected in the content pane?

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus

Patrice,


   By selected you mean visible?

0 Kudos
PatriceCase2
New Contributor

Hi,

   Yes, by selected I mean visible. I apologize if my question isn't worded clearly, I have been learning this as I go. 

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Patrice, The Legend widget will automatically update based on layer visibility unless you set the autoUpdate and respectCurrentMapScale to false in the widgets constructor.

0 Kudos