MarkerSymbolLayer Class

  • MarkerSymbolLayer
  • class Esri::ArcGISRuntime::MarkerSymbolLayer

    A base class for marker symbol layers, representing a symbol layer used to display a marker. More...

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

    Esri::ArcGISRuntime::PictureMarkerSymbolLayer and Esri::ArcGISRuntime::VectorMarkerSymbolLayer

    This class was introduced in Esri::ArcGISRuntime 100.5.

    Public Functions

    virtual ~MarkerSymbolLayer() override
    Esri::ArcGISRuntime::SymbolAnchor anchor() const
    double heading() const
    double offsetX() const
    double offsetY() const
    void setAnchor(const Esri::ArcGISRuntime::SymbolAnchor &symbolAnchor)
    void setHeading(double heading)
    void setOffsetX(double offsetX)
    void setOffsetY(double offsetY)
    void setSize(double size)
    double size() const

    Detailed Description

    MarkerSymbolLayer draws a shape or picture at a specific location relative to point geometry. A marker symbol layer is most often used in point symbols, but they can also be included in polyline and polygon symbols to draw a symbol at locations along lines and outlines, or within areas (the center of a polygon, for example).

    ArcGIS Runtime includes the following types of marker symbol layers:

    The MarkerSymbolLayer has methods affecting both 2D and 3D markers. Some properties apply only to 3D markers, such as angleX, or offsetZ. These properties have no effect on markers in 2D. Properties on 2D markers, such as offsetX, affect the marker's position in screen space, not world space. This means that the x-axis for a 2D marker runs from negative-x on the West edge of the screen to positive-x on the East edge of the screen. Negative-y to positive-y runs from the South edge of the screen to the North edge of the screen.

    Properties that apply only to 3D markers affect the marker's position in world space, rather than screen space. This means that the x, y, and z-axes to which the class methods are the axes of the world, with the following layout: from negative to positive, the x-axis spans from world West to world East, the y-axis from world South to world North, and the z-axis from directly into the surface to the sky.

    While a simple text symbol (TextSymbol) can be used to display a character as a marker, proper display is dependent on the referenced font being available on the machine or device running the app. If the exact font is not found, which is likely to occur on many mobile devices, a fallback mechanism is used to find the best available font to use. A character marker symbol authored from ArcGIS Pro, however, is represented by a vector marker symbol. This symbol stores the geometry that represents the character, is not dependent on the font to render the shape of the marker, and displays as expected on all devices.

    Member Function Documentation

    [override virtual] MarkerSymbolLayer::~MarkerSymbolLayer()

    Destructor.

    Esri::ArcGISRuntime::SymbolAnchor MarkerSymbolLayer::anchor() const

    Returns the anchor object of a marker symbol layer.

    The SymbolAnchor determines how the MarkerSymbolLayer is anchored. SymbolAnchor specifies the marker's anchor point and anchor placement mode. The default symbol anchor is at XYZ(0, 0, 0) and uses 'relative' mode.

    See also setAnchor() and SymbolAnchor.

    double MarkerSymbolLayer::heading() const

    Returns the marker symbol layer's heading: the angle of rotation about the anchor point, in degrees.

    See also setHeading.

    double MarkerSymbolLayer::offsetX() const

    Returns the x component of the marker symbol layer offset, in DIPs.

    The return value may be any real number (default is 0). This property affects markers in both Maps and Scenes.

    See also setOffsetX().

    double MarkerSymbolLayer::offsetY() const

    Returns the y component of the marker symbol layer offset, in DIPs.

    The return value may be any real number (default is 0). This property affects markers in both Maps and Scenes.

    See also setOffsetY().

    void MarkerSymbolLayer::setAnchor(const Esri::ArcGISRuntime::SymbolAnchor &symbolAnchor)

    Sets the anchor object of a marker symbol layer to symbolAnchor.

    The SymbolAnchor determines how the MarkerSymbolLayer is anchored. SymbolAnchor specifies the marker's anchor point and anchor placement mode. The default symbol anchor is at XYZ(0, 0, 0) and uses 'relative' mode.

    See also anchor() and SymbolAnchor.

    void MarkerSymbolLayer::setHeading(double heading)

    Sets the marker symbol layer's heading: the angle of rotation about the anchor point to in degrees.

    The input value can be any real number. The default value is 0. This property affects markers in both Maps and Scenes. Positive angles rotate the marker counterclockwise. In 2D, the rotation applies around the anchor point of the 2D marker. For 3D markers, the rotation applies around the z-axis.

    Angle for MarkerSymbolLayer is measured in degrees counterclockwise from 0 to 360. Marker symbol layers can have a separate heading value defined (which is also 0 by default). Setting a heading for a marker symbol layer does not affect the angle of the point symbol. When an angle value is set for the point symbol, however, that value is applied cumulatively to all the marker symbol layers it contains. The heading for individual symbol layers must be re-fetched in order to see the updated value. In 2D, the rotation applies around the anchor point of the 2D marker. For 3D markers, the rotation applies around the z-axis.

    Angle for multilayer point symbols and marker symbol layers is measured in degrees counterclockwise from the east, from 0 to 360. The angle for a multilayer point symbol defaults to 0. Marker symbol layers can have their own angle value defined (which is also 0 by default). Setting an angle for a marker symbol layer does not affect the angle of the point symbol. When an angle value is set for the point symbol, however, that value is applied cumulatively to all the marker symbol layers it contains. Clients use the angle provided for the symbol layers when rendering the multilayer symbol.

    See also heading().

    void MarkerSymbolLayer::setOffsetX(double offsetX)

    Sets the x component of the marker symbol layer offset to offsetX, in DIPs.

    The input value can be any real number. The default value is 0. This property affects markers in both Maps and Scenes. The x-offset is a delta applied to the marker in the direction corresponding to the given value. For example, a positive x-offset moves the marker in the positive-x direction.

    See also offsetX().

    void MarkerSymbolLayer::setOffsetY(double offsetY)

    Sets the y component of the marker symbol layer offset to offsetY, in DIPs.

    The input value can be any real number. The default value is 0. This property affects markers in both Maps and Scenes. The y-offset is a delta applied to the marker in the direction corresponding to the given value. For example, a positive y-offset moves the marker in the positive-y direction.

    See also offsetY().

    void MarkerSymbolLayer::setSize(double size)

    Sets the size of the marker symbol layer to size, in DIPs.

    The input value can be any positive number. The default value is 13.333 DIPs (10 points). A larger size means a larger marker.

    When getting the size from a multilayer point symbol, the value reported is the largest size of all the symbol layers it contains. The symbol size is updated when its symbol layer sizes change (if there is a new largest layer size). When setting a new size at the point symbol level, the size 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 size without affecting the other layers.

    See also size().

    double MarkerSymbolLayer::size() const

    Returns the size of the marker symbol layer, in DIPs.

    The return value may be any real number. The default value is 13.333 DIPs (10 points).

    See also setSize.

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