MultilayerSymbol class final

A base class for multilayer symbols. Multiple layers of symbols combine to make complex multilayer symbols that you can add to a map or scene.

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. They can also be created from JSON by calling ArcGISSymbol.fromJsonString. You can programmatically create and change them using the MultilayerPointSymbol, MultilayerPolylineSymbol, and MultilayerPolygonSymbol subclasses. You can also access the layers that comprise the symbol through MultilayerSymbol.symbolLayers and modify their 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, 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 symbol specification than ArcGIS Pro and this API. When you read symbols from a web scene in your app, you get a representation of the multilayer symbol.

If you create a multilayer symbol from a collection of SymbolLayer objects, the first symbol layer in the collection will be drawn first, with the second symbol layer on top of the first, and so on. Note that symbol layers in a multilayer symbol are in reverse order of how they appear in the JSON representation.

If a multilayer symbol is created from multiple ModelSymbolLayer types or a mix of ModelSymbolLayer types and other symbol layer types, only the first ModelSymbolLayer is rendered, and all other symbol layers are ignored for rendering.

Inheritance
Implementers

Properties

color Color
The consensus color of all layers in the symbol (excluding those that are color-locked).
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
referenceProperties SymbolReferenceProperties?
The properties change how the multilayer symbol behaves when attached to a renderer.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sceneSizeUnit SymbolSizeUnits
The size unit of the symbol when rendered in an ArcGISScene.
getter/setter pair
symbolLayers List<SymbolLayer>
The symbol layers of the multilayer symbol.
no setter

Methods

clone() ArcGISSymbol
Clones the ArcGISSymbol.
inherited
createSwatch({required double screenScale, double width = 0, double height = 0, Color backgroundColor = Colors.transparent}) Future<ArcGISImage>
Creates a swatch image using the provided width, height, screen scale, and optional background color.
inherited
createSwatchWithGeometry({required double screenScale, required double width, required double height, required Geometry geometry, Color backgroundColor = Colors.transparent}) Future<ArcGISImage>
Creates a swatch image using the provided geometry, width, height, screen scale, and optional background color.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<CaseInsensitiveString, dynamic>
Returns a JSON representation of this Object in the data type used by jsonDecode.
inherited
toJsonString() String
Returns a JSON representation of this Object as a String.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited