AnsweredAssumed Answered

How to Change the Colors on a RasterStretchRenderer

Question asked by ryan.sutcliffe on Aug 29, 2020

If I have an ImageryLayer or ImageryTileLayer in my ArcGIS JavaScript API map, how do I change the colors of the renderer. Is it possible? I cannot get it to work. 

 

Here is a CodePen of what I've tried. Basically I'm trying to replace the colorRamp with a new one and then update the renderer. This is basically a copy of an ESRI sample that shows how you can change all other properties of the RasterStretchRenderer on a LERC-based Raster layer. 

 

I assumed that this was possible as you can change colors and complete styles for SimpleRenderers on vector data. I haven't yet looked at other types of Renderers to see what happens there.

 

Hoping I don't have to create a new layer. I'd like avoid requiring the client from having to pull all the data down each time the renderer is changed.

Thoughts advice are welcome.

 

Ryan

Outcomes