AnsweredAssumed Answered

Raster Function Rendering Rules to apply a color ramp?

Question asked by abristow on Mar 6, 2019
Latest reply on Mar 6, 2019 by JGravois-esristaff

Does anyone have a working example using ESRI Leaflet to assign a color ramp to a DEM hosted as an ArcGIS REST ImageServer?

 

I've been using this documentation from ESRI and have managed to get a hillshade example working:

 

///Hillshade DEM
var renderingRule = {
"rasterFunction":"Hillshade",
"rasterFunctionArguments": {
"Azimuth":315,
"Altitude":45,
"ZFactor":1
},"variableName":"DEM"
};

var dem = L.esri.imageMapLayer({
url: 'https://gis.arkansas.gov/arcgis/rest/services/ImageServices/DEM_1M_2018/ImageServer',
renderingRule: renderingRule
});

 

But have had no luck applying a color ramp:

 

var renderingRuleTwo = {
"rasterFunction" : "Colormap",
"rasterFunctionArguments" : {
"ColorrampName" : "Blue Bright"
},
"variableName" : "Raster"
};

var demTwo = L.esri.imageMapLayer({
url: 'https://gis.arkansas.gov/arcgis/rest/services/ImageServices/DEM_1M_2018/ImageServer',
renderingRule: renderingRuleTwo
});

 

Thanks in advance to anyone who can provide some insight!

 

Edit: Formatting

Outcomes