How to hide and show a layer after added?
myAddedLayer.show = false;
Cheers,
Alex
Thanks Alexander.
I was trying :
const layerInstance =
new WebMapServiceImageryProvider({
url: layer.url,
layers: layer.layers,
rectangle,
})
viewer.imageryLayers.addImageryProvider(layerInstance)
layerInstance.show=false
instead of
const layerInstance = viewer.imageryLayers.addImageryProvider(
new WebMapServiceImageryProvider({
url: layer.url,
layers: layer.layers,
rectangle,
}),1);
layerInstance.show=false