AnsweredAssumed Answered

JavaScript API: Can I use setRenderingRule on an Image Service Layer to show above/below a given value?

Question asked by shepa006 on Mar 27, 2015
Latest reply on Apr 9, 2015 by Piraino_K

I have an image service that I want to let the user quickly show what from that layer is above and below a given value using a basic symbology of red being values less than the user specified value and green being values larger. Would this be an appropriate use for the ArcGISImageServiceLayer setRenderingRule method?


I looked through the API and all I can find from RasterFunction | API Reference | ArcGIS API for JavaScript is that raster functions are objects. I was thinking of creating a remap raster function, like you would in ArcMap/Catalog for a mosaic dataset, but I'm not sure how to set this up dynamically as part of a JavaScript application. So my question is really two parts 1) how do I write a raster function in JavaScript to handle the remap 2) how do I then set the symbology (assume remaped values indicate 1 = less than value of interest and 2 = greater than value of interest) so that it displays properly in the web application?


I haven't done this before so any help is appreciated, this might not even be the best approach so I'm open to other ideas.