Hi guys,
I am new to WAB(DE), I want to make a widget that removes some layers from the map,
I tried the code below but id does not work,
var layerInfos = LayerInfos.getInstanceSync();
array.forEach(layerInfos.getLayerInfoArray(), function(layerInfo) {
this.map.removeLayer(layerInfo.newSubLayers[0].layerObject);
this.map.removeLayer(layerInfo.newSubLayers[1].layerObject);
this.map.removeLayer(layerInfo.newSubLayers[2].layerObject);
}, this);
What is wrong with it ?
Robert Scheitlin, GISP
ArcGIS Enterprise