Skip To Content ArcGIS for Developers Sign In Dashboard

RenderingRule QML Type

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

Import Statement: import Esri.ArcGISRuntime 100.6
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 raster functions for a list of functions and the syntax for rendering rules.

Create a RenderingRule:

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

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

Property Documentation

renderingRuleInfo : RenderingRuleInfo

The meta-data 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.


renderingRuleJsonChanged()

Emitted when the renderingRuleJson property changes.



Feedback on this topic?