Filter list of layers in the List Layer widget ?

647
2
Jump to solution
06-28-2019 10:41 AM
Autoridad_Nacional_del_AguaANA
New Contributor II

I'm creating a widget in WAB. Adding the FeatureLayer object to the map also adds me to the List Layer Widget.

I do not want the layers that I'm consulted to show in the ListLayer Widget

Atte: HDRamosMendoza

Email: heber.daniel.ramos.mendoza@gmail.com

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Daniel,

Sure to make your FeatureLayer not appear in the LayerList widget just use this code (line 5):

var statesLayer = new FeatureLayer("https://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5", {
  mode: FeatureLayer.MODE_SELECTION,
  outFields: ["ObjectID", "STATE_NAME", "POP2000"]
});
lang.setObject('_wabProperties.isTemporaryLayer', true, statesLayer);

View solution in original post

2 Replies
RobertScheitlin__GISP
MVP Emeritus

Daniel,

Sure to make your FeatureLayer not appear in the LayerList widget just use this code (line 5):

var statesLayer = new FeatureLayer("https://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5", {
  mode: FeatureLayer.MODE_SELECTION,
  outFields: ["ObjectID", "STATE_NAME", "POP2000"]
});
lang.setObject('_wabProperties.isTemporaryLayer', true, statesLayer);
Autoridad_Nacional_del_AguaANA
New Contributor II

Thanks for the help. He is my hero in GIS

0 Kudos