2.4 Layer List - Hide Label

1068
3
03-27-2017 12:36 PM
HunterCarver
Occasional Contributor

WAB 2.4 Blog post states that

   "LayerList widget has a new context menu option to show/hide feature labels, when a feature layer has labels applied"

I installed 2.4 but I do not have Hide Labels option showing up in Layer List menu.  Anyone know whats up with this?

This would be really helpful as many of my maps have a lot of layers and users want to be able to turn layers off to control clutter.

https://blogs.esri.com/esri/arcgis/2017/03/02/whats-new-in-web-appbuilder-for-arcgis-march-2017/

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Hunter,

   It has to be a featurelayer and that featurelayer has have labeling info (meaning that the layer in the web map has to have someone click on the "create labels" option). If those requirements are not meet then the option will not be present.

NickHarvey
Occasional Contributor II

Thanks for explaining... I was beginning to look into this after seeing the 5th bullet on the "What's new" page.  May need to be reworded as "The Layer List widget now supports showing or hiding feature layer labels", or similar (?).

What's new in version 2.4—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers 

0 Kudos
KumarHarish
New Contributor III

Hunter,

Please go through this sample code. 

Labeling features on the client | ArcGIS API for JavaScript 3.20 

0 Kudos