AnsweredAssumed Answered

Mosaic Raster Identify Task Timeout Issue

Question asked by deleted-user-1_r2dgYuILKY on Aug 17, 2017

I have a dynamic map service layer that contains a time enabled mosaic raster. I set up an identify task to grab the pixel values from the mosaic. I set a three second timeout to close the popup after it displays the result. The issue is, sometimes when I click an area were the pixel value should be around 0%, I'll get a result like 86%. This doesn't happen every time, but it shouldn't happen at all. I'm wondering if the identify task is getting messed up when I click and then click again before the three second timeout? When I do this, the popup will come up (with the wrong percentage) for a split second and disappear. Here is the identify portion of my script. 


var identifyTask, identifyParams;
          map.on("load", mapReady);
          function mapReady () {
          map.on("click", executeIdentifyTask);
          identifyTask = new IdentifyTask(eclipseURL);
          identifyParams = new IdentifyParameters();
          identifyParams.tolerance = 1;
          identifyParams.returnGeometry = true;
          identifyParams.layerIds = [7];
          identifyParams.width = map.width;
          identifyParams.height = map.height;

        function executeIdentifyTask (event) {
          identifyParams.geometry = event.mapPoint;
          identifyParams.mapExtent = map.extent;

           var deferred = identifyTask
            deferred.addCallback(function (response) {

              return, function (result) {
                var feature = result.feature;
                var layerName = result.layerName;
                              var value = feature.attributes['Pixel Value'];
                                   iTemplate = new InfoTemplate(layerName,
                                   "Cloud Cover: " + value + " %");
                return feature;