Skip To Content ArcGIS for Developers Sign In Dashboard

RenderingRule Class

(Esri::ArcGISRuntime::RenderingRule)

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

Header: #include <RenderingRule>
Since: Esri::ArcGISRuntime 100.1
Inherits: Object

Public Functions

RenderingRule(const QString &renderingRuleJson, QObject *parent = nullptr)
RenderingRule(const RenderingRuleInfo &renderingRuleInfo, QObject *parent = nullptr)
~RenderingRule()
RenderingRuleInfo renderingRuleInfo() const
QString renderingRuleJson() const
  • 31 public functions inherited from QObject

Additional Inherited Members

Detailed Description

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

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 from the service info
RenderingRuleInfo renderingRuleInfo = m_imageServiceRaster->serviceInfo().renderingRuleInfos().at(index);
// create a new rendering rule with the rendering rule info
RenderingRule* renderingRule = new RenderingRule(renderingRuleInfo, this);
// create an image service raster
ImageServiceRaster* isr = new ImageServiceRaster(m_url, this);
// set the rendering rule
isr->setRenderingRule(renderingRule);

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

Member Function Documentation

RenderingRule::RenderingRule(const QString &renderingRuleJson, QObject *parent = nullptr)

Constructs a RenderingRule from the raster function JSON renderingRuleJson with an optional parent.

This is a server side raster function JSON and is different from the JSON returned by RasterFunction.

RenderingRule::RenderingRule(const RenderingRuleInfo &renderingRuleInfo, QObject *parent = nullptr)

Constructs a RenderingRule from renderingRuleInfo

RenderingRule::~RenderingRule()

Destructor.

RenderingRuleInfo RenderingRule::renderingRuleInfo() const

Returns the RenderingRuleInfo with which this object is constructed.

QString RenderingRule::renderingRuleJson() const

Returns the raster function template JSON used to create this RenderingRule.

Empty string is returned if this RenderingRule was created from a RenderingRuleInfo. This is a server side raster function JSON and not a client side RasterFunction JSON.


Feedback on this topic?