ArcGIS Developers
Dashboard

MultilayerSymbol QML Type

Base type for multi-layer symbols. More...

Import Statement: import Esri.ArcGISRuntime 100.10
Since: Esri.ArcGISRuntime 100.2
Inherits:

Symbol

Inherited By:

MultilayerPointSymbol, MultilayerPolygonSymbol, and MultilayerPolylineSymbol

Properties

Signals

Detailed Description

A base class for multilayer symbols. Multilayer symbols are built from multiple layers of symbols, which combine to let you add complex symbols to maps and scenes.

Multilayer symbols can be returned from feature layers based on web maps, feature services (with Use Advanced Symbology set to true), or mobile map packages, and can also be created from JSON by calling Symbol.fromJson. The same multilayer symbols and the components used to build them are available in ArcGIS Runtime, allowing you to programmatically create and change them using the MultilayerPointSymbol, MultilayerPolylineSymbol, and MultilayerPolygonSymbol subclasses. You can access the layers that comprise the symbol through MultilayerSymbol::symbolLayers. You can modify symbol layer properties, such as the color of a multilayer symbol. Some subclasses also expose additional symbol properties.

The symbol layers that comprise the symbol can be of different types. For example, a polyline geometry may be drawn with a MultilayerPolylineSymbol that has line (stroke) symbol layers that draw the line geometry, and also point (marker) symbol layers that are drawn at specified point locations relative to the line geometry. When you save an ArcGIS Pro map as a web map, any multilayer symbols in the map are converted to simple symbols. In general, point symbols are converted to picture marker symbols optimized for the web, and line and polygon symbols are simplified while representing the original symbol as closely as possible. If you're authoring a feature service from ArcGIS Pro or ArcGIS Desktop, however, both the original symbols and the simplified symbols are stored. The stored symbols allow clients that support advanced symbols to render the features as originally symbolized, while those that do not support advanced symbols (such as ArcGIS Online Map Viewer) can use the simple symbols for display. Having both sets of symbols allows you to retain the advanced symbology where available and still share the feature service as widely as possible. Symbols used by web scenes are also multilayer but use a different specification than the ArcGIS Pro and ArcGIS Runtime symbols. When you read symbols from a web scene in your ArcGIS Runtime app, you get an ArcGIS Runtime representation of the multilayer symbol. Symbol layers in an ArcGIS Runtime multilayer symbol are in reverse order of how they appear in the JSON representation from the server.

Multilayer symbols are built from multiple layers of symbols, which combine to let you add complex symbols to maps and scenes. Multilayer symbols can be returned from feature layers based on web maps, feature services (with Use Advanced Symbology set to true), or mobile map packages. The same multilayer symbols and the components used to build them are available in ArcGIS Runtime, allowing you to programmatically create and change them using the MultilayerPointSymbol, MultilayerPolylineSymbol, and MultilayerPolygonSymbol subclasses. You can access the layers that comprise the symbol through MultilayerSymbol::symbolLayers. You can modify symbol layer properties, such as the color of a multilayer symbol. Some subclasses also expose additional symbol properties.

The symbol layers that comprise the symbol can be of different types. For example, a polyline geometry may be drawn with a MultilayerPolylineSymbol that has line (stroke) symbol layers that draw the line geometry, and also point (marker) symbol layers that are drawn at specified point locations relative to the line geometry. When you save an ArcGIS Pro map as a web map, any multilayer symbols in the map are converted to simple symbols. In general, point symbols are converted to picture marker symbols optimized for the web, and line and polygon symbols are simplified while representing the original symbol as closely as possible. If you're authoring a feature service from ArcGIS Pro or ArcGIS Desktop, however, both the original symbols and the simplified symbols are stored. The stored symbols allow clients that support advanced symbols to render the features as originally symbolized, while those that do not support advanced symbols (such as ArcGIS Online Map Viewer) can use the simple symbols for display. Having both sets of symbols allows you to retain the advanced symbology where available and still share the feature service as widely as possible. Symbols used by web scenes are also multilayer but use a different specification than the ArcGIS Pro and ArcGIS Runtime symbols. When you read symbols from a web scene in your ArcGIS Runtime app, you get an ArcGIS Runtime representation of the multilayer symbol. Symbol layers in an ArcGIS Runtime multilayer symbol are in reverse order of how they appear in the JSON representation from the server.

Note: Symbol layers in a multilayer symbol are in reverse order of how they appear in the JSON representation.

// in this multilayer symbol pseudocode json, the 'symbolLayers' ordered list of symbol
// layers contains a solid stroke symbol layer followed by a solid fill symbol layer.
{ "symbolLayers": [{"type": "CIMSolidStroke", "color": "black"},{"type": "CIMSolidFill", "color": "red"}],"type": "CIMPointSymbol" }

// this is the solid fill symbol layer, the reverse order from the json representation
var symbolLayerIndexZero = multilayerSymbol.symboLayers.get(0); // red fill in the image below

// this is the solid stroke symbol layer, the reverse order from the json representation
var symbolLayerIndexOne = multilayerSymbol.symboLayers.get(1); // black outline in the image below

"MultilayerPoint symbol"

Multilayer symbol consisting of two layers.

This QML type supports the following default properties. A default property may be declared inside another declared object without being assigned explicitly to a property.

The following default properties are supported when creating any of the creatable multi-layer symbol subclasses.

TypeDefault Property
SymbolLayersymbolLayers (appends to model, since Esri.ArcGISRuntime 100.5)

Note: You cannot declare or create a component of this type in QML code.

Property Documentation

color : Color

Returns the consensus color of all layers of the MultilayerSymbol (excluding those that are color-locked).

Because MultilayerSymbol may have multiple symbol layers, this property represents the value of all color and tint color properties of constituent symbol layers, excluding any outlines. The property defines the color and tint color of symbols contained in VectorMarkerSymbolElement. Constituent symbol layers whose colorLocked property is true do not change color as a result of this property. To change outline colors, modify the outline symbol layer colors individually.

The default color is transparent black, RGBA(0, 0, 0, 0)


symbolLayers : SymbolLayerListModel

Returns the symbol layers included in this multi-layer symbol as a list model.

This property was introduced in Esri.ArcGISRuntime 100.5.


Signal Documentation

colorChanged()

Emitted when the color property changes.

Note: The corresponding handler is onColorChanged.



Feedback on this topic?