SymbolLayer Class

  • SymbolLayer
  • class Esri::ArcGISRuntime::SymbolLayer

    Symbol layers are used to build Multilayer symbols. More...

    Header: #include <SymbolLayer.h>
    Since: Esri::ArcGISRuntime 100.5
    Inherits: Esri::ArcGISRuntime::Object
    Inherited By:

    Esri::ArcGISRuntime::FillSymbolLayer, Esri::ArcGISRuntime::MarkerSymbolLayer, and Esri::ArcGISRuntime::StrokeSymbolLayer

    Public Functions

    virtual ~SymbolLayer() override
    Esri::ArcGISRuntime::SymbolLayer *clone(QObject *parent = nullptr) const
    bool isColorLocked() const
    bool isEnabled() const
    void setColorLocked(bool colorLocked)
    void setEnabled(bool enabled)
    Esri::ArcGISRuntime::SymbolLayerType symbolLayerType() const
    bool operator!=(Esri::ArcGISRuntime::SymbolLayer *other) const
    bool operator==(Esri::ArcGISRuntime::SymbolLayer *other) const

    Detailed Description

    The available symbol layer types correspond to the primitive geometry they are designed to render: marker layers for point, stroke layers for line, and fill layers for area. Layer types, however, are not applied exclusively to the corresponding geoelement geometry type. A marker symbol layer, for example, could be applied to a polyline feature to render its vertices. Each layer type has a unique set of properties to control its display.

    Symbol typeTypical symbol layersRole
    Point symbolMarker layersDraw relative to the point geometry
    Polyline SymbolMarker layersDraw at specified locations relative to the line geometry
    Stroke layersDraw relative to the line geometry
    Polygon SymbolMarker layersDraw relative to the polygon outline or in the interior, depending on placement setting
    Stroke layersDraw relative to the polygon outline
    Fill layersDraw relative to the polygon interior

    A symbol can contain one or several symbol layers of the same or different type. A symbol used to render polygons, for example, might contain a fill symbol layer to render the polygon interior, a stroke symbol layer for rendering the polygon outline, and a marker symbol layer to render polygon vertices. A symbol to render a polyline might contain several stroke layers of varying widths. If a symbol contains a layer that cannot render the type of geometry to which it is applied, that symbol layer is ignored when rendering.

    Symbol and layer property interaction

    Most SymbolLayer properties are only accessible on the symbol layer. However, there are some properties that are also exposed for the symbol as a whole. Properties such as color and size, for example, can be modified either for an individual symbol layer, or for the symbol itself. For such properties, the value provided for the symbol may have an effect on the corresponding property for the symbol layers it contains. Similarly, the property value for a multilayer symbol might be determined from the values of the individual symbol layers it contains.

    There are no notifications from a symbol or symbol layer when a property has been changed. If your app needs to respond to property changes in a symbol (as a result of a propagated change, for example) you will need to reread property values to identify changes.

    Unknown symbol layers or properties

    The multilayer symbol specification is complex and continues to evolve. It is possible that some symbol layers (or properties) do not expose an API or are not known to the ArcGIS Maps API. In these cases the symbol will be handled as follows:

    • If a symbol can be rendered, but there is no public API, the base class for the appropriate symbol layer is returned in the layer collection.
    • The multilayer symbology specification for an existing symbol layer type may have been updated to include properties that are not recognized by this API. The symbol layer is created and rendered using the recognized properties. Any properties that cannot be identified are ignored.
    • In the event that a new (unrecognized) symbol layer is encountered, the symbol is ignored and is not added to the symbol layer collection.

    Member Function Documentation

    [override virtual] SymbolLayer::~SymbolLayer()


    [since Esri::ArcGISRuntime 200.1] Esri::ArcGISRuntime::SymbolLayer *SymbolLayer::clone(QObject *parent = nullptr) const

    Clones the SymbolLayer to a new instance.

    • parent - The optional parent QObject.

    Returns a new instance of the current SymbolLayer.

    This function was introduced in Esri::ArcGISRuntime 200.1.

    bool SymbolLayer::isColorLocked() const

    Returns if the symbol layer is color locked.

    Any symbol layer that is color locked will not change color when the symbol color is changed. However, changing the color of the symbol layer directly would change the color of the symbol layer irrespective of the property value.

    bool SymbolLayer::isEnabled() const

    Returns if the symbol layer is enabled.

    A symbol layer will only be rendered if it is enabled.

    void SymbolLayer::setColorLocked(bool colorLocked)

    Sets the color locked status to colorLocked

    See also isColorLocked().

    void SymbolLayer::setEnabled(bool enabled)

    Sets the enabled status to enabled.

    See also isEnabled().

    Esri::ArcGISRuntime::SymbolLayerType SymbolLayer::symbolLayerType() const

    Returns the symbol layer type.

    [since Esri::ArcGISRuntime 200.2] bool SymbolLayer::operator!=(Esri::ArcGISRuntime::SymbolLayer *other) const

    Inequality operator. Returns true if this object and other are not equal.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    See also SymbolLayer::operator==.

    bool SymbolLayer::operator==(Esri::ArcGISRuntime::SymbolLayer *other) const

    Equivalency operator.

    Returns whether this object and other are equal.

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