LabelAngle Class

  • LabelAngle
  • class Esri::ArcGISRuntime::LabelAngle

    Specifies how to calculate the angular position and layout direction for labels on or around point feature symbols. More...

    Header: #include <LabelAngle.h>
    Since: Esri::ArcGISRuntime 100.11
    Inherits: Esri::ArcGISRuntime::Object and Esri::ArcGISRuntime::JsonSerializable

    Public Functions

    LabelAngle(Esri::ArcGISRuntime::ArcadeExpression *arcadeExpression, QObject *parent = nullptr)
    LabelAngle(Esri::ArcGISRuntime::ArcadeExpression *arcadeExpression, Esri::ArcGISRuntime::LabelAngleRotationType rotationType, QObject *parent = nullptr)
    virtual ~LabelAngle() override
    Esri::ArcGISRuntime::ArcadeExpression *angleExpression() const
    Esri::ArcGISRuntime::LabelAngle *clone(QObject *parent = nullptr) const
    Esri::ArcGISRuntime::LabelAngleRotationType rotationType() const
    void setAngleExpression(Esri::ArcGISRuntime::ArcadeExpression *angleExpression)
    void setRotationType(Esri::ArcGISRuntime::LabelAngleRotationType rotationType)

    Reimplemented Public Functions

    virtual QString toJson() const override
    virtual QJsonObject unknownJson() const override
    virtual QJsonObject unsupportedJson() const override

    Static Public Members

    Esri::ArcGISRuntime::LabelAngle *fromJson(const QString &json, QObject *parent = nullptr)

    Detailed Description

    The angular position may be different for each feature (driven by one or more feature attributes) or constant for all features (specified by a fixed number).

    Member Function Documentation

    [explicit] LabelAngle::LabelAngle(Esri::ArcGISRuntime::ArcadeExpression *arcadeExpression, QObject *parent = nullptr)

    Creates a LabelAngle with the specified ArcadeExpression.

    • arcadeExpression - The Arcade expression script. The expression is expected to be a complete, self-contained Arcade expression that calculates an angle in degrees.
    • parent - The optional parent QObject.

    The rotationType will be defaulted to LabelAngleRotationType::Automatic.

    LabelAngle::LabelAngle(Esri::ArcGISRuntime::ArcadeExpression *arcadeExpression, Esri::ArcGISRuntime::LabelAngleRotationType rotationType, QObject *parent = nullptr)

    Creates a LabelAngle with the specified ArcadeExpression and LabelAngleRotationType.

    • arcadeExpression - The Arcade expression script. The expression is expected to be a complete, self-contained Arcade expression that calculates an angle in degrees.
    • rotationType - Whether the angle should be interpreted as arithmetic or geographic.
    • parent - The optional parent QObject.

    [override virtual] LabelAngle::~LabelAngle()

    Destructor.

    Esri::ArcGISRuntime::ArcadeExpression *LabelAngle::angleExpression() const

    Return specifies how the angle (in degrees) is calculated from the feature attributes, using an Arcade expression.

    The calculation may use attributes, fixed numbers, or a combination of both. The default value is an ArcadeExpression containing an empty expression string, which will produce a zero angle when evaluated.

    Note: If the expression attempts to use attributes which don't exist then no label will be produced. This is distinct from the attribute existing but having a null or empty value, which will be interpreted as a zero angle.

    See also setAngleExpression().

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

    Clones the LabelAngle to a new instance with an optional parent.

    Returns a new instance of the current LabelAngle.

    This function was introduced in Esri::ArcGISRuntime 200.1.

    [static] Esri::ArcGISRuntime::LabelAngle *LabelAngle::fromJson(const QString &json, QObject *parent = nullptr)

    Creates a new LabelAngle from json with an optional parent.

    See also JsonSerializable.

    Esri::ArcGISRuntime::LabelAngleRotationType LabelAngle::rotationType() const

    Returns the rotation type angle (arithmetic or geographic).

    The default value is LabelAngleRotationType::Automatic (which will be interpreted as LabelAngleRotationType::Arithmetic).

    See also setRotationType().

    void LabelAngle::setAngleExpression(Esri::ArcGISRuntime::ArcadeExpression *angleExpression)

    Sets the angleExpression to angleExpression.

    See also angleExpression.

    void LabelAngle::setRotationType(Esri::ArcGISRuntime::LabelAngleRotationType rotationType)

    Sets the rotationType to rotationType.

    See also rotationType.

    [override virtual] QString LabelAngle::toJson() const

    Reimplements: JsonSerializable::toJson() const.

    Gets the json string representation of this object.

    See also JsonSerializable.

    [override virtual] QJsonObject LabelAngle::unknownJson() const

    Reimplements: JsonSerializable::unknownJson() const.

    Gets the unknown JSON of this object.

    See also JsonSerializable.

    [override virtual] QJsonObject LabelAngle::unsupportedJson() const

    Reimplements: JsonSerializable::unsupportedJson() const.

    Gets the unsupported JSON data of this object.

    See also JsonSerializable.

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