MultilayerPolylineSymbol Class

  • MultilayerPolylineSymbol
  • class Esri::ArcGISRuntime::MultilayerPolylineSymbol

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

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

    Public Functions

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

    Detailed Description

    A MultilayerPolylineSymbol can contain multiple layers that are combined to create different appearances, for example, a solid road with dashed pattern on top to show the center line. The individual layers have their own properties such as width and dash patterns, and can be accessed programmatically through MultilayerSymbol::symbolLayers. For more information about multilayer symbols, refer to Symbol layers.

    If you create a MultilayerPolylineSymbol 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 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);

    See also Symbol.

    Member Function Documentation

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

    Creates a multilayer polyline symbol object with symbol layers.

    • symbolLayers - A list 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] 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.

    [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.