Renderer

sealed class Renderer : JsonSerializable

A base class for renderers that use a collection of one or more symbols to display features in a Layer or graphics in a GraphicsOverlay. If the renderer contains more than a single symbol, it uses the rules to determine the symbol to apply to each geoelement, based on one or several attribute values. There are three basic types of renderers:

  • SimpleRenderer - simple renderers use a single symbol for all geoelements.

  • UniqueValueRenderer - unique value renders define a different symbol for each unique value of an attribute.

  • ClassBreaksRenderer - class break renderers define a different symbol for each range of numeric values.

To symbolize and display the geoelements, apply the renderer to the FeatureLayer.renderer or the GraphicsOverlay.renderer.

A GraphicsOverlay can contain graphics with different geometry dimensions, such as a Point and Polygon. A Renderer, however, can only provide symbols with one geometry dimension. Therefore, if you apply a renderer to a graphics overlay, only graphics with the specified geometry dimension are displayed. All other graphics are not visible.

If you apply a Symbol directly to a graphic, the symbol displays in preference to the GraphicsOverlay.renderer.

For raster data, rendering is handled by a RasterRenderer.

Since

200.1.0

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The expression describing how attributes values are translated into a rotation to be applied to the GeoElement. When an attribute name is specified in the rotation expression, it is enclosed in square brackets, for example: Rotation.

Link copied to clipboard

Indicates whether the rotation calculated from the Renderer.rotationExpression is interpreted as arithmetic or geographic. The options are:

Link copied to clipboard

The scene view properties for the renderer. This can be used to make changes to how a GeoElement is displayed in a SceneView.

Functions

Link copied to clipboard
abstract fun clone(): Renderer

Clones the Renderer.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
fun getSymbol(feature: Feature, applyAttributeOverrides: Boolean = false): Symbol?

Returns the symbol that is used to visualize the given feature with override attributes from the renderer. If applyAttributeOverrides is set to true, this method will get the symbol from the renderer and override the symbol properties with the overrides available on the renderer. These include visual variable size, color, opacity and rotation. If the override expression or attributes contain any information not known to either the renderer or observation (such as "scale"), that override will not be applied. If the override attributes are applied successfully, a symbol with overridden properties will be returned otherwise the original symbol will be returned.

fun getSymbol(graphic: Graphic, applyAttributeOverrides: Boolean = false): Symbol?

Returns the symbol that is used to visualize the given graphic with override attributes from the renderer. If applyAttributeOverrides is set to true, this method will get the symbol from the renderer and override the symbol properties with the overrides available on the renderer. These include visual variable size, color, opacity and rotation. If the override expression or attributes contain any information not known to either the renderer or observation (such as "scale"), that override will not be applied. If the override attributes are applied successfully, a symbol with overridden properties will be returned otherwise the original symbol will be returned.

fun getSymbol(dynamicEntity: DynamicEntity, applyAttributeOverrides: Boolean = false): Symbol?

Returns the symbol that is used to visualize the given dynamic entity with override attributes from the renderer. If applyAttributeOverrides is set to true, this method will get the symbol from the renderer and override the symbol properties with the overrides available on the renderer. These include visual variable size, color, opacity and rotation. If the override expression or attributes contain any information not known to either the renderer or dynamic entity (such as "scale"), that override will not be applied. If the override attributes are applied successfully, a symbol with overridden properties will be returned else the original symbol will be returned.

fun getSymbol(dynamicEntityObservation: DynamicEntityObservation, applyAttributeOverrides: Boolean = false): Symbol?

Returns the symbol that is used to visualize the given dynamic entity observation with override attributes from the renderer. If applyAttributeOverrides is set to true, this method will get the symbol from the renderer and override the symbol properties with the overrides available on the renderer. These include visual variable size, color, opacity and rotation. If the override expression or attributes contain any information not known to either the renderer or observation (such as "scale"), that override will not be applied. If the override attributes are applied successfully, a symbol with overridden properties will be returned else the original symbol will be returned.

Link copied to clipboard
open override fun hashCode(): Int

Inherited functions

Link copied to clipboard
open override fun toJson(): String

Convert an object to JSON string.