AnsweredAssumed Answered

Progress bar while adding ArcGISDynamicMapServiceLayer to map

Question asked by bforbhavin on Jul 10, 2014
Latest reply on Jul 10, 2014 by bforbhavin

I add ArcGISDynamicMapServiceLayer to map using following code. It's added successfully and shows the map as expected. When the map is loading, I want to mask the screen. I am doing it as per following code (see bold comments). Now, if map image is taking time to load then which event I can capture so, I can unmask in that event? I added map-image-export to the dynamiclayer but it never gets called from the api. I see from the fiddler that export image url is in progress but 'layer-add-result' gets executed. It seems if map image takes time to load, then API is firing export url explicitly and load the map in configured div. Does API sends status of map loading in any callback function?


//masking here

vDynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer(vURL, {

  'opacity' : 1,

  'imageParameters' : vImageParameters



vMap = new Map(vMapDiv, {

  sliderOrientation: 'vertical',

  infoWindow: vPopup,

  autoResize: true,

  logo: false



vDynamicMapServiceLayer.on('map-image-export', function() {

//unmask here



vMap.on('layer-add-result', function() {

//unmasking here

  }, error);