Filter list of layers in the List Layer widget ?

336
2
Jump to solution
06-28-2019 10:41 AM
Labels (1)
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 Esteemed Contributor

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 Esteemed Contributor

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

Autoridad_Nacional_del_AguaANA
New Contributor II

Thanks for the help. He is my hero in GIS

0 Kudos