ArcGISFeature class final
An ArcGIS specific feature stored in an ArcGISFeatureTable.
ArcGIS features are stored in ArcGIS specific data sources such as a GeodatabaseFeatureTable or ServiceFeatureTable. Since ArcGISFeature is a subclass of Feature, it contains a geometry that defines its location and shape, and a set of attributes that describe the real-world entity it represents.
In addition, ArcGISFeature objects can also contain:
- Feature attachments such as images or documents, that can be edited, updated or deleted.
- Feature subtypes that define different default values or domains for fields.
- The ability to relate this feature to another ArcGISFeature.
- Geometry that has m-values, which are typically used for linear referencing.
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 ArcGISFeature objects in a minimum state returns 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:
- Call Loadable.load on each feature.
- Call ServiceFeatureTable.loadOrRefreshFeatures and pass a mutable array of the features to be loaded.
- Call ServiceFeatureTable.queryFeaturesWithFieldOptions with the constant QueryFeatureFields.loadAll, which returns all features in a fully loaded state.
For more information, see the class description for ServiceFeatureTable.
Properties
-
attributes
→ Map<
String, dynamic> -
The attributes of the GeoElement as a collection of name/value pairs.
no setterinherited
- canEditAttachments → bool
-
True if attachments on this feature can be edited, otherwise false.
no setter
- canUpdateGeometry → bool
-
True if the geometry of this feature can be edited, otherwise false.
no setter
- featureTable → FeatureTable?
-
The FeatureTable that this feature belongs to.
no setterinherited
- geometry ↔ Geometry?
-
The geometry defines the shape and location of the GeoElement.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- loadError → ArcGISException?
-
The load error.
no setterinherited
- loadStatus → LoadStatus
-
The load status.
no setterinherited
-
onLoadStatusChanged
→ Stream<
LoadStatus> -
A stream that reports changes to the
LoadStatus
.no setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addAttachment(
{required String name, required String contentType, required Uint8List data}) → Future< Attachment> - Adds a new attachment to this feature.
-
cancelLoad(
) → void -
Cancels loading metadata for the object.
inherited
-
deleteAttachment(
Attachment attachment) → Future< void> - Deletes the given attachment from this feature.
-
deleteAttachments(
List< Attachment> attachments) → Future<void> - Deletes the given attachments from this feature.
-
fetchAttachments(
) → Future< List< Attachment> > - Gets a collection of attachments on this feature. Attachments are returned in descending order based on their id.
-
getFeatureSubtype(
) → FeatureSubtype? - Gets the corresponding FeatureSubtype for this feature.
-
load(
) → Future< void> -
Loads the metadata for the object asynchronously.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refresh(
) → bool -
Resets the attributes and geometry to the values in the data source.
inherited
-
relateFeature(
ArcGISFeature feature, {RelationshipInfo? relationshipInfo}) → void - Sets up a relationship between this feature and the provided feature based on the given relationshipInfo. See RelationshipInfo for more details.
-
retryLoad(
) → Future< void> -
Loads or retries loading metadata for the object asynchronously.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
unrelateFeature(
ArcGISFeature feature) → void - Removes the relationship between this feature and the provided feature.
-
updateAttachment(
Attachment attachmentInfo, {required String name, required String contentType, required Uint8List data}) → Future< void> - Updates the given attachment of this feature.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited