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; }
Solved! Go to Solution.