require(["esri/smartMapping/raster/renderers/colormap"], (rasterColormapCreator) => { /* code goes here */ });
import * as rasterColormapCreator from "@arcgis/core/smartMapping/raster/renderers/colormap.js";
esri/smartMapping/raster/renderers/colormap
This object contains helper methods for generating a RasterColormapRenderer for raster layers (i.e. ImageryLayer, ImageryTileLayer).
The createRenderer method in this module generates a renderer that may be applied directly to the input layer.
Method Overview
Name | Return Type | Summary | Object |
---|---|---|---|
Promise<RasterColormapResult> | Generates a RasterColormapRenderer used to render imagery data. | colormap |
Method Details
-
createRenderer
createRenderer(params){Promise<RasterColormapResult>}
-
Generates a RasterColormapRenderer used to render imagery data.
ParametersSpecificationparams ObjectInput parameters for generating a colormap visualization. See the table below for details of each parameter.
Specificationlayer ImageryLayer|ImageryTileLayerThe input layer for which the renderer is generated.
renderingRule RasterFunctionoptionalDeprecated since 4.27. Use
rasterFunction
instead.rasterFunction RasterFunctionoptionalSpecifies the function for how the requested image should be processed. When
rasterFunction
is applied, the server returns updated service information that reflects custom processing as defined by the raster function. If not provided, the output renderer is created using the layer'srasterFunction
.signal AbortSignaloptionalAllows for cancelable requests. If canceled, the promise will be rejected with an error named
AbortError
. See also AbortController.ReturnsType Description Promise<RasterColormapResult> Resolves to an object containing a RasterColormapRenderer that can be set on the input layer.
Type Definitions
-
The result object of the createRenderer() method. See the table below for details of each property.
- Property
-
renderer RasterColormapRenderer
The colormap renderer to apply to the input layer.