RenderingRule QML Type

Represents a rendering rule created from JSON or a pre-defined one on server. More...

Import Statement: import Esri.ArcGISRuntime 100.15
Since: Esri.ArcGISRuntime 100.1
Inherits:

Object

Properties

Signals

Detailed Description

A rendering rule defines the processing that is to be done to the ArcGIS image service. An instance of this class can be created from a RenderingRuleInfo or a JSON string that specifies a service-defined or client-defined rendering rule. See {https://developers.arcgis.com/documentation/common-data-types/raster-function-objects.htm}{Raster function objects} for a list of functions and the syntax for rendering rules.

Create a RenderingRule:

// get the rendering rule info at the selected index
const renderingRuleInfo = imageServiceRaster.serviceInfo.renderingRuleInfos[index];
// create a rendering rule object using the rendering rule info
const renderingRule = ArcGISRuntimeEnvironment.createObject("RenderingRule", {renderingRuleInfo: renderingRuleInfo});
// create a new image service raster
const newImageServiceRaster = ArcGISRuntimeEnvironment.createObject("ImageServiceRaster", {url: imageServiceUrl});
// apply the rendering rule
newImageServiceRaster.renderingRule = renderingRule;
// create a raster layer using the image service raster
const rasterLayer = ArcGISRuntimeEnvironment.createObject("RasterLayer", {raster: newImageServiceRaster});

You can see the complete code in the QML sample Raster Rendering Rule.

Property Documentation

renderingRuleInfo : RenderingRuleInfo

The metadata of a rendering rule on the image service from which to construct this rendering rule.


renderingRuleJson : string

The raster function JSON used to construct this rendering rule.

Empty if the rendering rule is constructed from RenderingRuleInfo. This is a server side raster function JSON and not a client side RasterFunction JSON.


Signal Documentation

renderingRuleInfoChanged()

Emitted when the renderingRuleInfo property changes.

Note: The corresponding handler is onRenderingRuleInfoChanged.


renderingRuleJsonChanged()

Emitted when the renderingRuleJson property changes.

Note: The corresponding handler is onRenderingRuleJsonChanged.


Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.