oasad

ArcGISDynamicMapServiceLayer always invisible

Discussion created by oasad on Dec 23, 2013
Latest reply on Dec 30, 2013 by enigma2522
Hello everyone,

I used to use this code to show layers from ArcGISDynamicMapServiceLayer on map but after switching to the api 3.7 it stops from working the dynamic layer is not showing on map anymore. for an unknown reason the dynamic layer has visible set to false and suspended set to true.

   var layer = mymap.getLayer('MasterDynamicLayer');
   var dynamicLayers = [];
   var dynamicLayerInfo = new DynamicLayerInfo();
      
     dynamic_LayerInfo.defaultVisibility = true;
     dynamic_LayerInfo.id = layer_info.id;
     dynamic_LayerInfo.name = layer_info.name;
     dynamic_LayerInfo.source = new LayerMapSource({ mapLayerId: layer_info.id });
     dynamicLayers.push(dynamic_LayerInfo);

            layer.setDynamicLayerInfos(dynamicLayers, false);

Thank you.

Outcomes