ArcGIS Developers

LabelDefinition Class

class Esri::ArcGISRuntime::LabelDefinition

Labeling information about a sublayer of a map service or feature service. More...

Header: #include <LabelDefinition>
Since: Esri::ArcGISRuntime 100.1
Inherits: Esri::ArcGISRuntime::Object and Esri::ArcGISRuntime::JsonSerializable

This class was introduced in Esri::ArcGISRuntime 100.1.

Public Functions

LabelDefinition(QObject *parent = nullptr)
virtual ~LabelDefinition() override

Reimplemented Public Functions

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

Static Public Members

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

Detailed Description

LabelDefinitions can only be created from JSON currently. The JSON required follows the ArcGIS REST API specification for the various labeling objects.

An example of JSON that can be used for setting a LabelDefinition is:


Member Function Documentation

LabelDefinition::LabelDefinition(QObject *parent = nullptr)

Constructor that creates an empty LabelDefinition.

  • parent - The parent object.

[override virtual] LabelDefinition::~LabelDefinition()


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

Creates this LabelDefinition from its JSON representation.

Returns a LabelDefinition created using the data in the json parameter and an optional parent.

See also JsonSerializable.

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

Reimplements: JsonSerializable::toJson() const.

Returns this LabelDefinition instance represented as a JSON String.

See also JsonSerializable.

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

Reimplements: JsonSerializable::unknownJson() const.

Gets the unknown JSON of this object.

See also JsonSerializable.

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

Reimplements: JsonSerializable::unsupportedJson() const.

Gets the unsupported JSON of this object.

See also JsonSerializable.

Feedback on this topic?