Method Overview
Name | Return Type | Summary | Object |
---|---|---|---|
Promise<RasterUniqueValuesResult> | Generates a UniqueValueRenderer to render thematic imagery. more details | uniqueValue |
Method Details
-
createRenderer(params){Promise<RasterUniqueValuesResult>}
-
Generates a UniqueValueRenderer to render thematic imagery.
ParametersSpecificationparams ObjectInput parameters for generating a unique value visualization. See the table below for details of each parameter.
Specificationlayer ImageryLayer|ImageryTileLayerThe input layer for which the renderer is generated.
renderingRule RasterFunctionoptionalSpecifies the rule for how the requested image should be rendered. When
renderingRule
is applied, the server returns updated service information that reflects custom processing as defined by the rendering rule. If not provided, the output renderer is created using the layer'srenderingRule
.classFieldName StringoptionalA preferred class field name used for calculating unique values.
optional The colors to apply to each unique value. This must be a two-dimensional array where each item of the first dimension is an array of 3-4 numbers representing RGB or RGBA values of each unique value. This overrides
colorRamp
.colorRamp AlgorithmicColorRamp|MultipartColorRampoptionalThe color ramp to apply to the renderer.
signal AbortSignaloptionalAllows for cancelable requests. If canceled, the promise will be rejected with an error named
AbortError
. See also AbortController.ReturnsType Description Promise<RasterUniqueValuesResult> Resolves to an object containing a unique value renderer that can be set on the input layer.
Type Definitions
-
RasterUniqueValuesResult
-
The result object of the createRenderer() method. See the table below for details of each property.
- Properties
-
renderer UniqueValueRenderer
The UniqueValueRenderer renderer to apply to the input layer.
classFieldName StringThe class field name from which the unique value infos were generated.