ArcGIS Developers
Dashboard

LabelAngle Class

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>
Since: Esri::ArcGISRuntime 100.11
Inherits: Esri::ArcGISRuntime::Object and Esri::ArcGISRuntime::JsonSerializable

This class was introduced in Esri::ArcGISRuntime 100.11.

Public Functions

LabelAngle(Esri::ArcGISRuntime::ArcadeExpression *arcadeExpression, Esri::ArcGISRuntime::LabelAngleRotationType rotationType, QObject *parent = nullptr)
LabelAngle(Esri::ArcGISRuntime::ArcadeExpression *arcadeExpression, QObject *parent = nullptr)
virtual ~LabelAngle() override
Esri::ArcGISRuntime::ArcadeExpression *angleExpression() 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

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.
  • rotationType - Whether the angle should be interpreted as arithmetic or geographic.
  • parent - The optional parent QObject.

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

Creates a LabelAngle with the specified ArcadeExpression.

  • arcadeExpression - The Arcade expression script.
  • parent - The optional parent QObject.

The rotationType will be defaulted to LabelAngleRotationType::Automatic.

[override virtual] LabelAngle::~LabelAngle()

Destructor.

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

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

See also setAngleExpression().

[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 whether the angle should be interpreted as 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.


Feedback on this topic?