AnsweredAssumed Answered

Client Side Image Service Filtering

Question asked by sjacksonesriaustralia-com-au-esridist Employee on Jun 17, 2017
Latest reply on Jun 22, 2017 by sjacksonesriaustralia-com-au-esridist

I want to replicate this amazing Raster Layer Sample with my own image service.  My image service (paste of REST details) is not multidimensional, and is from a mosaic dataset containing one raster dataset which has a value between 0-100. This image service performs fast when viewing in the Map Viewer.

 

Here is a JSFiddle of my modified sample, but using a public image service.  

 

The initial load of the app is sluggish (even more so with my image service).

 

Something that does not happen with the above sample, but happens with my service is I keep getting errors in the console.  I am having trouble trying to identify what the problem is here, sure it is simple.  

 

Let me know if you need more info from my end.

 

init.js:113 TypeError: Cannot read property '0' of undefined
at Object.maskPixels [as pixelFilter] (filterStrain.html:204)
at Object._setPixelData (ImageServiceLayerMixin.js:41)
at Object.redraw (ImageServiceLayerMixin.js:27)
at setPixelFilter (filterStrain.html:226)
at Object.maskPixels [as pixelFilter] (filterStrain.html:174)
at Object._setPixelData (ImageServiceLayerMixin.js:41)
at Object._requestDataHandler (ImageServiceLayerMixin.js:41)
at init.js:63
at Object._resolve (Raster.js:9)
at Raster.js:7 "TypeError: Cannot read property '0' of undefined
at Object.maskPixels [as pixelFilter] (http://localhost/telstra/filterStrain.html:204:32)
at Object._setPixelData (http://js.arcgis.com/3.20/esri/layers/ImageServiceLayerMixin.js:41:370)
at Object.redraw (http://js.arcgis.com/3.20/esri/layers/ImageServiceLayerMixin.js:27:395)
at setPixelFilter (http://localhost/telstra/filterStrain.html:226:17)
at Object.maskPixels [as pixelFilter] (http://localhost/telstra/filterStrain.html:174:7)
at Object._setPixelData (http://js.arcgis.com/3.20/esri/layers/ImageServiceLayerMixin.js:41:370)
at Object._requestDataHandler (http://js.arcgis.com/3.20/esri/layers/ImageServiceLayerMixin.js:41:276)
at https://js.arcgis.com/3.20/init.js:63:277
at Object._resolve (http://js.arcgis.com/3.20/esri/layers/Raster.js:9:352)
at http://js.arcgis.com/3.20/esri/layers/Raster.js:7:61"

 

Outcomes