MultilayerPolygonSymbol Class

  • MultilayerPolygonSymbol
  • class Esri::ArcGISRuntime::MultilayerPolygonSymbol

    A polygon symbol built with multiple layers of symbols to display graphics and features that have polygon geometry. More...

    Header: #include <MultilayerPolygonSymbol.h>
    Since: Esri::ArcGISRuntime 100.2
    Inherits: Esri::ArcGISRuntime::MultilayerSymbol

    Public Functions

    MultilayerPolygonSymbol(const QList<Esri::ArcGISRuntime::SymbolLayer *> &symbolLayers, QObject *parent = nullptr)
    MultilayerPolygonSymbol(const QList<Esri::ArcGISRuntime::SymbolLayer *> &symbolLayers, Esri::ArcGISRuntime::SymbolReferenceProperties *referenceProperties, QObject *parent = nullptr)
    virtual ~MultilayerPolygonSymbol() override

    Detailed Description

    A MultilayerPolygonSymbol can contain multiple layers that are combined to create different appearances, for example, a polygon with a marker in the center. The individual layers have their own properties such as width, height, and offset, and can be accessed programmatically through MultilayerSymbol::symbolLayers. For more information about multilayer symbols, refer to Symbol layers.

    If you create a MultilayerPolygonSymbol 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.

    // 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": "CIMPolygonSymbol" }
    
    // this is the solid fill symbol layer, the reverse order from the json representation
    auto* symbolLayerIndexZero = multilayerSymbol->symboLayers()->at(0); // red fill in the image below
    
    // this is the solid stroke symbol layer, the reverse order from the json representation
    auto* symbolLayerIndexOne = multilayerSymbol->symboLayers()->at(1); // black outline in the image below

    "MultilayerPolygon symbol"

    Multilayer symbol consisting of two layers.

    See also Symbol.

    Member Function Documentation

    [explicit, since Esri::ArcGISRuntime 100.5] MultilayerPolygonSymbol::MultilayerPolygonSymbol(const QList<Esri::ArcGISRuntime::SymbolLayer *> &symbolLayers, QObject *parent = nullptr)

    Creates a multilayer polygon symbol object with symbol layers.

    • symbolLayers - A collection of symbol layers that make up the symbol.
    • parent - The optional parent QObject.

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

    This function was introduced in Esri::ArcGISRuntime 100.5.

    [since Esri::ArcGISRuntime 100.13] MultilayerPolygonSymbol::MultilayerPolygonSymbol(const QList<Esri::ArcGISRuntime::SymbolLayer *> &symbolLayers, Esri::ArcGISRuntime::SymbolReferenceProperties *referenceProperties, QObject *parent = nullptr)

    Creates a multilayer polygon symbol object with symbol layers and SymbolReferenceProperties.

    • symbolLayers - A collection of symbol layers that make up the symbol.
    • referenceProperties - The symbol reference properties for the symbol.
    • parent - The optional parent QObject.

    This function was introduced in Esri::ArcGISRuntime 100.13.

    [override virtual] MultilayerPolygonSymbol::~MultilayerPolygonSymbol()

    Destructor.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.