FeatureTable QML Type

  • Esri.ArcGISRuntime
  • FeatureTable
  • Base type for types that represent a table of features. More...

    Import Statement: import Esri.ArcGISRuntime
    Since: Esri.ArcGISRuntime 100.0
    Inherits:

    Object

    Inherited By:

    ArcGISFeatureTable, FeatureCollectionTable, GeoPackageFeatureTable, OgcFeatureCollectionTable, ShapefileFeatureTable, and WfsFeatureTable

    Properties

    Signals

    Methods

    Detailed Description

    Note: You cannot declare or create a component of this type in QML code.

    A FeatureTable defines a set of Fields, a GeometryType and a SpatialReference. A FeatureTable can also represent non-spatial data that has no GeometryType or SpatialReference. FeatureTables have a fixed schema.

    You can query the FeatureTable using attribute or spatial criteria, and if permitted, edit the data. If the dataset contains geographic features you can display them on a map using a FeatureLayer. To do so, create the FeatureLayer from the FeatureTable and add it to a Map.

    In a MVC architecture, the FeatureLayer is the view, while the FeatureTable is the model. Use the FeatureLayer to manipulate how the data displays on the map. For example, you can manipulate the opacity of the layer, turn labels on or off, and set a different Renderer through the FeatureLayer. The FeatureTable contains the data, and can be used for querying or editing the data.

    onMouseClicked: mouse => {  // mouseClicked came from the MapView
        // create attributes json for the new feature
        const featureAttributes = {"typdamage" : "Minor", "primcause" : "Earthquake"};
    
        // create a new feature using the mouse's map point
        const feature = featureTable.createFeatureWithAttributes(featureAttributes, mouse.mapPoint);
    
        // add the new feature to the feature table
        featureTable.addFeature(feature);
    }

    This QML type supports the following default properties. A default property may be declared inside another declared object without being assigned explicitly to a property.

    TypeDefault Property
    PopupDefinitionpopupDefinition (since Esri.ArcGISRuntime 100.1)

    See also Loadable, Cancelable, and PopupSource.

    Property Documentation

    [read-only] addFeatureStatus : Enums.TaskStatus

    Returns the status of the latest asynchronous task to add a feature (read-only).

    The task is started using addFeature.

    See also Enums.TaskStatus.


    [read-only] addFeaturesStatus : Enums.TaskStatus

    Returns the status of the latest asynchronous task to add a list of features (read-only).

    The task is started using addFeatures.

    See also Enums.TaskStatus.


    [read-only] deleteFeatureStatus : Enums.TaskStatus

    Returns the status of the latest asynchronous task to delete a feature (read-only).

    The task is started using deleteFeature.

    See also Enums.TaskStatus.


    [read-only] deleteFeaturesStatus : Enums.TaskStatus

    Returns the status of the latest asynchronous task to delete a list of features (read-only).

    The task is started using deleteFeatures.

    See also Enums.TaskStatus.


    [since Esri.ArcGISRuntime 100.3] displayName : string

    Returns a user-friendly name that can be displayed in the UI (for example, in a Table of Contents).

    If the table is displayed with a FeatureLayer, the displayName is used as the FeatureLayer::name.

    This property was introduced in Esri.ArcGISRuntime 100.3.


    [read-only] editable : bool

    Returns whether the dataset can be edited (read-only).


    [read-only] extent : Envelope

    Returns the extent of the dataset (read-only).

    For ServiceFeatureTable if the feature request mode is FeatureRequestMode::OnInteractionCache or FeatureRequestMode::OnInteractionNoCache this property returns the services extent. If the mode is FeatureRequestMode::ManualCache or for GeodatabaseFeatureTable this property will return the extent of the cached table.


    [read-only] featureTableType : Enums.FeatureTableType

    Returns the type of feature table (read-only).

    See also Enums.FeatureTableType.


    [read-only] fields : list<Field>

    The list of Field objects representing the fields of the feature table (read-only).


    [read-only] geometryType : Enums.GeometryType

    Returns the type of geometry used by geographic features (read-only).

    All geometries in each feature table share the same geometry type.

    Only valid if hasGeometry is true.

    See also Enums.GeometryType.


    [read-only] hasGeometry : bool

    Returns whether the dataset contains a geometry field (read-only).


    [read-only, since Esri.ArcGISRuntime 100.2] hasM : bool

    Returns whether the dataset contains m-values. (read-only).

    This property was introduced in Esri.ArcGISRuntime 100.2.


    [read-only, since Esri.ArcGISRuntime 100.2] hasZ : bool

    Returns whether the dataset contains z-values. (read-only).

    This property was introduced in Esri.ArcGISRuntime 100.2.


    [read-only, since Esri.ArcGISRuntime 100.7] layer : Layer

    Returns the layer this table is associated with or created from, if any (read-only).

    This property can be an AnnotationLayer, a FeatureLayer, or null if this table is not associated with any layer. This property is populated when the layer is created from the FeatureTable.

    This property was introduced in Esri.ArcGISRuntime 100.7.


    [read-only] loadError : Error

    Returns the load error (read-only).

    Note: load errors are also reported on the error property and emit the errorChanged signal.

    See also Loadable.


    [read-only] loadStatus : Enums.LoadStatus

    Returns the load status code of this Loadable object (read-only).

    See also Enums.LoadStatus and Loadable.


    maxQueryFeaturesResultsToStore : int

    Returns the maximum number of results from the queryFeatures method to store.

    The default value is 10. The minimum value is 1 and there is no maximum.

    This value does not affect queryFeaturesResult, which always stores the last queryFeatures result.


    [read-only] numberOfFeatures : string

    Returns the total number of features or records in the dataset, as a numeric string (read-only).

    Note: The underlying property is represented as a 64-bit integer type. See Accessing 64-bit integer properties from QML.

    See also numberOfFeaturesAsInt.


    [read-only, since Esri.ArcGISRuntime 100.3] numberOfFeaturesAsInt : int

    The same as numberOfFeatures but represented as an integer type (read-only).

    Note: The underlying property is represented as a 64-bit integer type. See Accessing 64-bit integer properties from QML.

    This property was introduced in Esri.ArcGISRuntime 100.3.


    [since Esri.ArcGISRuntime 100.1] popupDefinition : PopupDefinition

    This property was introduced in Esri.ArcGISRuntime 100.1.

    See also PopupSource.


    [since Esri.ArcGISRuntime 100.1] popupEnabled : bool

    This property was introduced in Esri.ArcGISRuntime 100.1.

    See also PopupSource.


    [read-only, since Esri.ArcGISRuntime 100.2] queryExtentResult : Envelope

    Returns the Envelope result from a queryExtent operation (read-only).

    Obtain the Envelope result once the queryExtentStatusChanged signal emits, and the queryExtentStatus is complete.

    This property was introduced in Esri.ArcGISRuntime 100.2.


    [read-only, since Esri.ArcGISRuntime 100.2] queryExtentStatus : Enums.TaskStatus

    Returns the status of the latest asynchronous task to query for extent (read-only).

    The task is started using queryExtent.

    This property was introduced in Esri.ArcGISRuntime 100.2.

    See also Enums.TaskStatus.


    [read-only, since Esri.ArcGISRuntime 100.2] queryFeatureCountResult : int

    Returns the feature count result from a queryFeatureCount operation (read-only).

    Obtain the feature count result once the queryFeatureCountStatusChanged signal emits, and the queryFeatureCountStatus is complete.

    This property was introduced in Esri.ArcGISRuntime 100.2.


    [read-only, since Esri.ArcGISRuntime 100.2] queryFeatureCountStatus : Enums.TaskStatus

    Returns the status of the latest asynchronous task to query for feature count (read-only).

    The task is started using queryFeatureCount.

    This property was introduced in Esri.ArcGISRuntime 100.2.

    See also Enums.TaskStatus.


    [read-only] queryFeaturesResult : FeatureQueryResult

    Returns the results of the latest query for features (read-only).

    The task is started using queryFeatures. The results are available when queryFeaturesStatus is Enums.TaskStatusCompleted or as tasks are completed if multiple tasks are being run.

    See also Enums.TaskStatus.


    [read-only] queryFeaturesResults : jsobject

    A dictionary of task IDs to FeatureQueryResult objects.

    The results are available as tasks are completed if multiple tasks are being run.

    The maximum number of stored results is controlled by the maxQueryFeaturesResultsToStore property. Older results are removed as newer ones become available with respect to the current value of maxQueryFeaturesResultsToStore.

    See also maxQueryFeaturesResultsToStore.


    [read-only] queryFeaturesStatus : Enums.TaskStatus

    Returns the status of the latest asynchronous task to query for features (read-only).

    The task is started using queryFeatures.

    See also Enums.TaskStatus.


    [read-only, since Esri.ArcGISRuntime 100.2] queryStatisticsResult : StatisticsQueryResult

    Returns the statistics result from a queryStatistics operation (read-only).

    Obtain the statistics result once the queryStatisticsStatusChanged signal emits, and the queryStatisticsStatus is complete.

    This property was introduced in Esri.ArcGISRuntime 100.2.


    [read-only, since Esri.ArcGISRuntime 100.2] queryStatisticsStatus : Enums.TaskStatus

    Returns the status of the latest asynchronous task to query for statistics (read-only).

    The task is started using queryStatistics.

    This property was introduced in Esri.ArcGISRuntime 100.2.

    See also Enums.TaskStatus.


    [read-only] spatialReference : SpatialReference

    Returns the spatial reference of the table (read-only).

    A spatial reference defines how the coordinates of a feature's Geometry correspond to locations in the real world. For more information see the SpatialReference class or the Spatial references documentation.


    [read-only] tableName : string

    Returns the name of the dataset (read-only).


    [read-only] updateFeatureStatus : Enums.TaskStatus

    Returns the status of the latest asynchronous task to update a feature (read-only).

    The task is started using updateFeature.

    See also Enums.TaskStatus.


    [read-only] updateFeaturesStatus : Enums.TaskStatus

    Returns the status of the latest asynchronous task to update a list of features (read-only).

    The task is started using updateFeatures.

    See also Enums.TaskStatus.


    Signal Documentation

    addFeatureStatusChanged()

    Emitted when the addFeatureStatus property changes.

    Note: The corresponding handler is onAddFeatureStatusChanged.


    addFeaturesStatusChanged()

    Emitted when the addFeaturesStatus property changes.

    Note: The corresponding handler is onAddFeaturesStatusChanged.


    deleteFeatureStatusChanged()

    Emitted when the deleteFeatureStatus property changes.

    Note: The corresponding handler is onDeleteFeatureStatusChanged.


    deleteFeaturesStatusChanged()

    Emitted when the deleteFeaturesStatus property changes.

    Note: The corresponding handler is onDeleteFeaturesStatusChanged.


    [since Esri.ArcGISRuntime 100.3] displayNameChanged()

    Emitted when the displayName property changes.

    Note: The corresponding handler is onDisplayNameChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.3.


    [since Esri.ArcGISRuntime 100.2] hasMChanged()

    Emitted when the hasM property changes.

    Note: The corresponding handler is onHasMChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.2.


    [since Esri.ArcGISRuntime 100.2] hasZChanged()

    Emitted when the hasZ property changes.

    Note: The corresponding handler is onHasZChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.2.


    loadErrorChanged()

    Emitted when the loadError property changes.

    Note: load errors are also reported on the error property and emit the errorChanged signal.

    Note: The corresponding handler is onLoadErrorChanged.

    See also Loadable and Object.


    loadStatusChanged()

    Emitted when the loadStatus property changes.

    Note: The corresponding handler is onLoadStatusChanged.

    See also Loadable.


    maxQueryFeaturesResultsToStoreChanged()

    Emitted when the maxQueryFeaturesResultsToStore property changes.

    Note: The corresponding handler is onMaxQueryFeaturesResultsToStoreChanged.


    [since Esri.ArcGISRuntime 100.1] popupDefinitionChanged()

    Emitted when the popupDefinition property changes.

    Note: The corresponding handler is onPopupDefinitionChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.1.


    [since Esri.ArcGISRuntime 100.1] popupEnabledChanged()

    Emitted when the popupEnabled property changes.

    Note: The corresponding handler is onPopupEnabledChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.1.


    [since Esri.ArcGISRuntime 100.2] queryExtentStatusChanged()

    Emitted when the queryExtentStatus property changes.

    Note: The corresponding handler is onQueryExtentStatusChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.2.


    [since Esri.ArcGISRuntime 100.2] queryFeatureCountStatusChanged()

    Emitted when the queryFeatureCountStatus property changes.

    Note: The corresponding handler is onQueryFeatureCountStatusChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.2.


    queryFeaturesResultChanged()

    Emitted when the queryFeaturesResult property changes.

    Note: The corresponding handler is onQueryFeaturesResultChanged.


    queryFeaturesResultsChanged()

    Emitted when the queryFeaturesResults property changes.

    Note: The corresponding handler is onQueryFeaturesResultsChanged.


    queryFeaturesStatusChanged()

    Emitted when the queryFeaturesStatus property changes.

    Note: The corresponding handler is onQueryFeaturesStatusChanged.


    [since Esri.ArcGISRuntime 100.2] queryStatisticsStatusChanged()

    Emitted when the queryStatisticsStatus property changes.

    Note: The corresponding handler is onQueryStatisticsStatusChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.2.


    updateFeatureStatusChanged()

    Emitted when the updateFeatureStatus property changes.

    Note: The corresponding handler is onUpdateFeatureStatusChanged.


    updateFeaturesStatusChanged()

    Emitted when the updateFeaturesStatus property changes.

    Note: The corresponding handler is onUpdateFeaturesStatusChanged.


    Method Documentation

    string addFeature(Feature feature)

    Adds a new feature to the feature table using an asynchronous task.

    Adding a feature that contains a Geometry causes the geometry to become simplified. This may change a single part geometry to a multipart geometry, or round off x, y, z, and m coordinate values that are above the resolution set by the SpatialReference.

    Adding a feature to a GeodatabaseFeatureTable in a stand-alone mobile geodatabase created with ArcGIS Pro is not supported when the table participates in a controller dataset, such as a utility network or parcel fabric. Use canAdd to determine if this operation is allowed.

    Returns a string representing the task ID of the asynchronous task.

    See also Enums.FeatureServiceSessionType.


    string addFeatures(list<Feature> features)

    Adds a list of new features to the feature table using an asynchronous task.

    Before adding features, check the addFeaturesStatus property to see whether an addFeatures task is already in progress. If so, then this method cannot start a new addFeatures task.

    Returns a task ID that can be used to cancel the addFeatures task.


    bool canAdd()

    Returns a bool that determines whether you can add new features to the table.

    The result of this method accounts for the table's attachment and geometry capabilites, and ownership-based access control.

    Although this method may state that the table allows new features to be added, the application may not be licensed to permit this. For example, a user cannot add features to a secured feature table if the application is licensed at the Lite level.


    bool canDelete(Feature feature)

    Returns a bool that determines whether you can delete the feature from the table.

    • feature - The feature.

    The result of this method accounts for the table's attachment and geometry capabilites, and ownership-based access control.

    Although this method may state that the table allows the feature to be deleted, the application may not be licensed to permit this. For example, a user cannot delete features from a secured feature table if the application is licensed at the Lite level.


    bool canEditGeometry()

    Returns a bool that determines whether you can edit the geometry field in a table.

    The result of this method accounts for the table's ownership-based access control.

    Although this method may state that the table allows geometry fields to be edited, the application may not be licensed to permit this. For example, a user cannot update geometry in a secured feature table if the application is licensed at the Lite level.


    bool canUpdate(Feature feature)

    Returns a bool that determines whether you can update the feature in the table.

    • feature - The feature.

    The result of this method accounts for the table's attachment and geometry capabilites, and ownership-based access control.

    Although this method may state that the table allows the feature to be updated, the application may not be licensed to permit this. For example, a user cannot update features in a secured feature table if the application is licensed at the Lite level.


    void cancelLoad()

    See also Loadable.


    bool cancelTask(string taskId)

    Cancel the task with the ID taskId.

    Returns false if the task cannot be canceled or there is no task with the specified id taskId.

    See also Cancelable.


    Feature createFeature()

    Creates and returns a new, empty feature.

    Creates a feature object in memory without adding it to the dataset. Use addFeature or addFeatures to add the new feature to the dataset.

    See also addFeature and addFeatures.


    Feature createFeatureWithAttributes(jsobject attributes, Geometry geometry)

    Creates and returns a new feature with the provided attributes and geometry.

    Creates a feature object in memory without adding it to the dataset. Use addFeature or addFeatures to add the new feature to the dataset.

    See also addFeature().


    string deleteFeature(Feature feature)

    Deletes a feature from the feature table using an asynchronous task.

    Deleting a feature from a GeodatabaseFeatureTable in a stand-alone mobile geodatabase created with ArcGIS Pro is not supported when the table participates in a controller dataset, such as a utility network or parcel fabric. Use FeatureTable::canDelete to determine if this operation is allowed.

    Before deleting a feature, check the deleteFeatureStatus property to see whether an deleteFeature task is already in progress. If so, then this method cannot start a new deleteFeature task.

    Returns a task ID that can be used to cancel the deleteFeature task.

    See also Cancelable.


    string deleteFeatures(list<Feature> features)

    Deletes a list of features from the feature table using an asynchronous task.

    Before deleting features, check the deleteFeaturesStatus property to see whether an deleteFeatures task is already in progress. If so, then this method cannot start a new deleteFeatures task.

    Returns a task ID that can be used to cancel the deleteFeatures task.

    See also Cancelable.


    Field field(string fieldName)

    Returns a Field object describing the field corresponding to the provided fieldName.


    void load()

    See also Loadable.


    [since Esri.ArcGISRuntime 100.2] string queryExtent(QueryParameters parameters)

    Determines the minimum bounding envelope that contains features satisfying the provided query parameters.

    A task that represents the asynchronous query of feature extent. The value of the task result contains a Envelope object.

    The queryExtentStatusChanged signal emits when the operation is complete. Check the queryExtentStatus property to make sure the operation completed successfully. The results are then available through queryExtentResult.

    This method was introduced in Esri.ArcGISRuntime 100.2.

    See also Cancelable.


    [since Esri.ArcGISRuntime 100.2] string queryFeatureCount(QueryParameters parameters)

    Determines the count of features that satisfy the provided query parameters.

    A task that represents the asynchronous query of feature count. The value of the task result contains a string.

    The queryFeatureCountStatusChanged signal emits when the operation is complete. Check the queryFeatureCountStatus property to make sure the operation completed successfully. The results are then available through queryFeatureCountResult.

    This method was introduced in Esri.ArcGISRuntime 100.2.

    See also Cancelable.


    string queryFeatures(QueryParameters parameters)

    Queries for features in this FeatureTable using the provided parameters and an asynchronous task.

    The queryFeatures function may be run concurrently. The last result will always be stored in the queryFeaturesResult property. To keep track of concurrent tasks, the queryFeaturesResults property can be used to sort multiple results, mapped to the task ID of each task.

    Returns a task ID that can be used to cancel the queryFeatures task. The task ID is also used to locate the specific result in queryFeaturesResults for this task.

    See also Cancelable.


    [since Esri.ArcGISRuntime 100.2] string queryStatistics(StatisticsQueryParameters parameters)

    Queries for statistics in this FeatureTable using the provided parameters and an asynchronous task.

    A task that represents the asynchronous query statistics operation. The value of the task result contains a StatisticsQueryResult object.

    The queryStatisticsStatusChanged signal emits when the operation is complete. Check the queryStatisticsStatus property to make sure the operation completed successfully. The results are then available through queryStatisticsResult.

    This method was introduced in Esri.ArcGISRuntime 100.2.

    See also Cancelable.


    void retryLoad()

    See also Loadable.


    string updateFeature(Feature feature)

    Updates a feature in the feature table using an asynchronous task.

    Updating a feature that contains a Geometry causes the geometry to become simplified. This may change a single-part geometry to a multipart geometry, or round off x, y, z, and m-coordinate values that are above the resolution set by the SpatialReference.

    Updating a feature from a GeodatabaseFeatureTable in a stand-alone mobile geodatabase created with ArcGIS Pro is not supported when the table participates in a controller dataset, such as a utility network or parcel fabric. Use FeatureTable::canUpdate to determine if this operation is allowed.

    Before updating a feature, check the updateFeatureStatus property to see whether an updateFeature task is already in progress. If so, then this method cannot start a new updateFeature task.

    Returns a task ID that can be used to cancel the updateFeature task.

    See also Cancelable.


    string updateFeatures(list<Feature> features)

    Updates a list of features in the feature table using an asynchronous task.

    Before updating features, check the updateFeaturesStatus property to see whether an updateFeatures task is already in progress. If so, then this method cannot start a new updateFeatures task.

    Returns a task ID that can be used to cancel the updateFeatures task.

    See also Cancelable.


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