I am having a hard time applying a Colormap to my image service. I have tried other functions (Hillshade and NDVI) and they do work on my service. Based on this API reference, my code should work: http://resources.arcgis.com/en/help/rest/apiref/israsterfunctions.htmlThis is how I am creating my Colormap RasterFunction:private function resetColormapByExtent():void{ var newCM:Array; var rasterArgs:Object = {}; newCM = new Array( [0,97,21,13], [10,99,25,14], [20,102,28,15], [30,105,30,16], [40,107,36,18], [50,110,38,19], [60,112,42,20], [70,115,47,22], [80,117,50,23], [90,120,54,25], [100,122,57,27]); rasterArgs["Colormap"] = newCM; var rasterFunction:RasterFunction = new RasterFunction(); rasterFunction.arguments = rasterArgs; rasterFunction.functionName = "Colormap"; imageLayer.renderingRule = rasterFunction; }
When I execute this code the image service layer disappears. I have looked for a specific Colormap examples and I have not found one yet. Has anyone encountered this problem?