AnsweredAssumed Answered

defaultVisibility not matching web map visibility

Question asked by Nobel2020 on Dec 16, 2018

Hi,

I have a web map which is reading layers from ArcGIS Server service, when I change the layer visibility in the web map, it is not reflected in the layerinfo object.

arcgisUtils.getLayerList (response).layerInfos[0].defaultVisibility

it seems that the defaultvisitblity is reading the arcgis server service visibility and not the web map

so the layer List does not reflect the webmap updates

 

 

 arcgisUtils.createMap(map_id, "map").then(function(response){
       
var myWidget = new LayerList({
           map
: response.map,
           layers
: arcgisUtils.getLayerList(response)
       
},"layerList");
        myWidget
.startup();
   
});

Outcomes