MultilayerPolylineSymbol Class

  • MultilayerPolylineSymbol
  • class Esri::ArcGISRuntime::MultilayerPolylineSymbol

    A multi-layer polyline symbol. More...

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

    This class was introduced in Esri::ArcGISRuntime 100.2.

    Public Functions

    MultilayerPolylineSymbol(const QList<Esri::ArcGISRuntime::SymbolLayer *> &symbolLayers, Esri::ArcGISRuntime::SymbolReferenceProperties *referenceProperties, QObject *parent = nullptr)
    MultilayerPolylineSymbol(const QList<Esri::ArcGISRuntime::SymbolLayer *> &symbolLayers, QObject *parent = nullptr)
    virtual ~MultilayerPolylineSymbol() override
    void setWidth(float width)
    float width() const

    Detailed Description

    This is a polyline symbol with multiple layers. Each layer has its own properties, like width and dash patterns, that can be combined to create line symbols with special effects (a solid road with dashed pattern on top to show the center line, for example). These symbols are rendered with polyline geometry.

    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 black solid stroke symbol layer followed by a red solid stroke symbol layer.
    { "symbolLayers": [{"type": "CIMSolidStroke", "color": "black"},{"type": "CIMSolidStroke", "color": "red"}],"type": "CIMPolylineSymbol" }
    
    // this is the red solid stroke symbol layer, the reverse order from the json representation
    auto* symbolLayerIndexZero = multilayerSymbol->symboLayers()->at(0);
    
    // this is the black solid stroke symbol layer, the reverse order from the json representation
    auto* symbolLayerIndexOne = multilayerSymbol->symboLayers()->at(1);

    Member Function Documentation

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

    Creates a multilayer polyline 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.

    MultilayerPolylineSymbol::MultilayerPolylineSymbol(const QList<Esri::ArcGISRuntime::SymbolLayer *> &symbolLayers, QObject *parent = nullptr)

    Constructor that takes a list of symbolLayers and an optional parent.

    This function was introduced in Esri::ArcGISRuntime 100.5.

    [override virtual] MultilayerPolylineSymbol::~MultilayerPolylineSymbol()

    Destructor.

    void MultilayerPolylineSymbol::setWidth(float width)

    Sets the width to width in device independent pixels (DIPs).

    When getting the width from a multilayer polyline symbol, the value reported is the largest width of all the symbol layers it contains. The symbol width is updated when its symbol layer widths change (if there is a new largest layer width). When setting a new width at the polyline symbol level, the width of the largest symbol layer is given the provided value, and all the smaller layers are sized proportionately. An individual symbol layer can be given a specific width without affecting the other layers.

    When getting the width from a multilayer polyline symbol, the value reported is the largest width of all the symbol layers it contains. The symbol width is updated when its symbol layer widths change (if there is a new largest layer width). When setting a new width at the polyline symbol level, the width of the largest symbol layer is given the provided value, and all the smaller layers are sized proportionately. An individual symbol layer can be given a specific width without affecting the other layers.

    See also width().

    float MultilayerPolylineSymbol::width() const

    Returns the width in device independent pixels (DIPs).

    See also setWidth.

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