;

MarkerSymbol Class

  • MarkerSymbol
  • class Esri::ArcGISRuntime::MarkerSymbol

    Base class for marker symbols. More...

    Header: #include <MarkerSymbol>
    Since: Esri::ArcGISRuntime 100.0
    Inherits: Esri::ArcGISRuntime::Symbol
    Inherited By:

    Esri::ArcGISRuntime::PictureMarkerSymbol, Esri::ArcGISRuntime::SimpleMarkerSymbol, and Esri::ArcGISRuntime::TextSymbol

    This class was introduced in Esri::ArcGISRuntime 100.0.

    Public Functions

    virtual ~MarkerSymbol() override
    float angle() const
    Esri::ArcGISRuntime::SymbolAngleAlignment angleAlignment() const
    float leaderOffsetX() const
    float leaderOffsetY() const
    float offsetX() const
    float offsetY() const
    void setAngle(float angle)
    void setAngleAlignment(Esri::ArcGISRuntime::SymbolAngleAlignment angleAlignment)
    void setLeaderOffsetX(float offset)
    void setLeaderOffsetY(float offset)
    void setOffsetX(float offset)
    void setOffsetY(float offset)

    Protected Functions

    MarkerSymbol(QObject *parent = nullptr)

    Detailed Description

    Symbols describe how graphics and features look on a map. Different symbols are used with different geometry types. Marker symbols are used to display those graphics and features that are based on point or multipoint geometries. Subclasses of this class represent specific types of marker symbols.

    The following two types of offsets can be specified.

    • The offset of the visible symbol from the symbol's point geometry.
    • The offset of a callout's leader line from the symbol's point geometry.

    For each offset, you can specify an x-offset and a y-offset in device independent pixels (DIPs) using a Cartesian coordinate system for example, specifying an callout x-offset of -5.0 will offset the callout's leader left along the x-axis by five points.

    Consider a PictureMarkerSymbol using the image of a pushpin. By default, the center of the image will be used as the anchor to center the image at the map location. However, if you wanted the needle of the pushpin to end at the map location, you would need to offset the image appropriately to make the needle's end coincide with the map location.

    Member Function Documentation

    [protected] MarkerSymbol::MarkerSymbol(QObject *parent = nullptr)

    Default constructor with an optional parent.

    [override virtual] MarkerSymbol::~MarkerSymbol()

    Destructor.

    float MarkerSymbol::angle() const

    Returns the rotation angle (in degrees) of the symbol.

    See also setAngle().

    Esri::ArcGISRuntime::SymbolAngleAlignment MarkerSymbol::angleAlignment() const

    Returns whether the symbol should rotate with the map or stay at the same angle with regard to the screen.

    See also setAngleAlignment.

    float MarkerSymbol::leaderOffsetX() const

    Returns the x-offset position for a callout's leader in relation to the symbol.

    See also setLeaderOffsetX().

    float MarkerSymbol::leaderOffsetY() const

    Returns the y-offset position for a callout's leader in relation to the symbol.

    See also setLeaderOffsetY().

    float MarkerSymbol::offsetX() const

    Returns the x-offset position for the symbol in relation to the graphic or feature's point geometry.

    See also setOffsetX().

    float MarkerSymbol::offsetY() const

    Returns the y-offset position for the symbol in relation to the graphic or feature's point geometry.

    See also setOffsetY().

    void MarkerSymbol::setAngle(float angle)

    Sets the rotation angle (in degrees) for the symbol.

    A positive rotation will turn the symbol in a counter-clockwise direction

    Note: If the angle was set via the fromJson method, it will be inverted (e.g. an angle of 20 will become -20).

    See also angle().

    void MarkerSymbol::setAngleAlignment(Esri::ArcGISRuntime::SymbolAngleAlignment angleAlignment)

    Sets whether the symbol should rotate with the map or stay at the same angleAlignment with regards to the screen.

    Default is SymbolAngleAlignment::Map. Only supported for GraphicsOverlay using GraphicsRenderingMode::Dynamic.

    See also angleAlignment().

    void MarkerSymbol::setLeaderOffsetX(float offset)

    Sets the x-offset position for a callout's leader in relation to the symbol to offset device independent pixels.

    See also leaderOffsetX().

    void MarkerSymbol::setLeaderOffsetY(float offset)

    Sets the y-offset position for a callout's leader in relation to the symbol to offset device independent pixels.

    See also leaderOffsetY().

    void MarkerSymbol::setOffsetX(float offset)

    Sets the x-offset position for the symbol in relation to the graphic or feature's point geometry to offset device independent pixels.

    See also offsetX().

    void MarkerSymbol::setOffsetY(float offset)

    Sets the y-offset position for the symbol in relation to the graphic or feature's point geometry to offset device independent pixels.

    See also offsetY().

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