ArcGIS Developers

ArcGISFeature Class

class Esri::ArcGISRuntime::ArcGISFeature

A Feature stored in an ArcGISFeatureTable. More...

Header: #include <ArcGISFeature>
Since: Esri::ArcGISRuntime 100.0
Inherits: Esri::ArcGISRuntime::Feature and Esri::ArcGISRuntime::Loadable

This class was introduced in Esri::ArcGISRuntime 100.0.

Public Functions

virtual ~ArcGISFeature() override
Esri::ArcGISRuntime::AttachmentListModel *attachments() const
bool canEditAttachments() const
bool canUpdateGeometry() const
Esri::ArcGISRuntime::FeatureSubtype featureSubtype() const
void relateFeature(Esri::ArcGISRuntime::ArcGISFeature *feature)
void relateFeature(Esri::ArcGISRuntime::ArcGISFeature *feature, const Esri::ArcGISRuntime::RelationshipInfo &relationshipInfo)
void unrelateFeature(Esri::ArcGISRuntime::ArcGISFeature *feature)

Reimplemented Public Functions

virtual void cancelLoad() override
virtual void load() override
virtual Esri::ArcGISRuntime::Error loadError() const override
virtual Esri::ArcGISRuntime::LoadStatus loadStatus() const override
virtual void retryLoad() override


void doneLoading(Esri::ArcGISRuntime::Error loadError)
void loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)

Detailed Description

An ArcGISFeature can contain:

  • A set of attributes that describe the real-world entity it represents.
  • A geometry that defines its location and shape. The geometry might contain m-values, which are typically used for linear referencing.
  • Zero or more feature attachments, such as images or documents.

A feature's attribute values can be changed, but attribute definitions cannot be added, deleted, or modified.

If you create a ServiceFeatureTable from the URL of a feature service, features in the table are initially in one of the following states:

  • A minimum set of attributes are available in the table, and m-values are omitted. This is an optimization for faster rendering.
  • All attributes defined by the service are available in the table, including m-values, which might be NaN.

The initial state of features is determined by the feature request mode of the table. For important details, see FeatureRequestMode.

By default, a query on ArcGISFeatures in a minimum state will return them in the same state. To access all attributes (or the m-values) of features returned by a query, you must load the features. You can do one of the following:

An ArcGISFeature is loadable. Depending on a ServiceFeatureTable's feature request mode, queries on the table can return ArcGISFeature objects which have the minimum set of attributes required for rendering and labeling (and geometries do not include m-values). See ServiceFeatureTable::queryFeatures(). Also see FeatureRequestMode::OnInteractionCache, and FeatureRequestMode::OnInteractionNoCache at FeatureRequestMode. To access all attributes in the returned ArcGISFeatures, call this method on each feature. For alternative ways to load all attributes in the returned features, see ServiceFeatureTable::loadOrRefreshFeatures() or ServiceFeatureTable::queryFeatures().

For more information, see the class description for ServiceFeatureTable.

See also Loadable.

Member Function Documentation

[signal] void ArcGISFeature::doneLoading(Esri::ArcGISRuntime::Error loadError)

Signal emitted when this object is done loading.

  • loadError - Details about any error that may have occurred.

Note: If there is a load error it will also be emitted on the errorOccurred signal.

See also Loadable and Object.

[signal] void ArcGISFeature::loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)

loadStatus See Loadable.

[override virtual] ArcGISFeature::~ArcGISFeature()


Esri::ArcGISRuntime::AttachmentListModel *ArcGISFeature::attachments() const

Returns the attachment list model used for querying and editing this feature's attachments.

bool ArcGISFeature::canEditAttachments() const

Returns true if the attachments of this feature are editable.

bool ArcGISFeature::canUpdateGeometry() const

Returns true if the geometry of this feature can be updated.

It takes into account the feature table properties, as well as ownership-based access control.

[override virtual] void ArcGISFeature::cancelLoad()

Reimplements: Loadable::cancelLoad().

See Loadable.

Esri::ArcGISRuntime::FeatureSubtype ArcGISFeature::featureSubtype() const

Returns the corresponding FeatureSubtype for this feature.

If this feature belongs to an ArcGISFeatureTable that defines a ArcGISFeatureTable::subtypeField, a FeatureSubtype that matches FeatureSubtype::code with this feature's attribute value for subtype field is returned; otherwise, this will return nullptr.

This function was introduced in Esri::ArcGISRuntime 100.9.

[override virtual] void ArcGISFeature::load()

Reimplements: Loadable::load().

See Loadable.

[override virtual] Esri::ArcGISRuntime::Error ArcGISFeature::loadError() const

Reimplements: Loadable::loadError() const.

See Loadable.

[override virtual] Esri::ArcGISRuntime::LoadStatus ArcGISFeature::loadStatus() const

Reimplements: Loadable::loadStatus() const.

See Loadable.

void ArcGISFeature::relateFeature(Esri::ArcGISRuntime::ArcGISFeature *feature)

Sets up a relationship between this feature and a given feature.

If this relationship is keyed on an Object ID or Global ID, and the origin feature in this call has been created locally, first you must call ServiceFeatureTable::applyEdits and refreshObjectId to obtain the new object ID and global ID generated by the service. If this is not done, then the destination feature will refer to an outdated ID and will not be considered related.

This function was introduced in Qt 100.1.

void ArcGISFeature::relateFeature(Esri::ArcGISRuntime::ArcGISFeature *feature, const Esri::ArcGISRuntime::RelationshipInfo &relationshipInfo)

Sets up a relationship between this feature and a given feature based on the relationshipInfo.

This function was introduced in Qt 100.1.

[override virtual] void ArcGISFeature::retryLoad()

Reimplements: Loadable::retryLoad().

See Loadable.

void ArcGISFeature::unrelateFeature(Esri::ArcGISRuntime::ArcGISFeature *feature)

Removes the relationship between this feature and a give feature.

If there is no existing relationship between the features, an errorOccurred is signaled.

This function was introduced in Qt 100.1.

Feedback on this topic?