Class ServiceFeatureTable
A table of features that typically represent real-world objects created from an ArcGIS feature service.
Implements
Namespace: Esri.ArcGISRuntime.Data
Assembly: Esri.ArcGISRuntime.dll
Syntax
public sealed class ServiceFeatureTable : ArcGISFeatureTable, INotifyPropertyChanged, ILoadable, IFeatureFormSource, IApiKeyResource
Remarks
A service feature table has a FeatureRequestMode, which controls (1) whether features are cached locally (for quicker access by map and scene layers) and (2) whether queries are performed on the local cache or on the server. You can retrieve or modify a table's feature request mode using FeatureRequestMode.
If the table's mode is OnInteractionCache, features are requested from the server in response to user or developer interaction (pan or zoom) and are cached locally. Queries are executed on the cache or (if requested features are not resident in the cache) on the server. This mode is the default.
If the table's mode is OnInteractionNoCache, features are always requested from the server. Features are not cached, and all queries are executed on the server.
If the table's mode is ManualCache, you must call PopulateFromServiceAsync(QueryParameters, Boolean, IEnumerable<String>), which populates the local table with the features specified by QueryParameters and containing the attributes specified by System.Collections.Generic.IEnumerable<T>. Features are cached for the duration of the session and queries are executed against the cache.
If the table's feature request mode is OnInteractionCache or OnInteractionNoCache, ArcGIS features in the table initially contain a minimum set of attributes and geometry that omits any m-values. This is an optimization for faster rendering. To access all attributes (and geometry with m-values) in features you get from a query, do one of the following:
- Call LoadAsync() on each returned feature individually.
- Call the query method and pass the constant LoadAll, which performs the query and returns features fully loaded (with all attributes and any m-values defined by the service). See QueryFeaturesAsync(QueryParameters, QueryFeatureFields) and QueryRelatedFeaturesAsync(ArcGISFeature, RelatedQueryParameters, QueryFeatureFields).
- Call LoadOrRefreshFeaturesAsync(IEnumerable<Feature>) and pass a mutable array of features to be loaded.
When used to create a FeatureLayer in a MapView, features are requested from the services in the correct spatial reference to match the spatial reference of the map. Use ServiceCurveGeometryMode to change how curve geometries are returned from the service.
You can use a service feature table to access non-spatial tables from feature services where HasGeometry is false. The feature request mode of the table must be ManualCache, and you must call PopulateFromServiceAsync(QueryParameters, Boolean, IEnumerable<String>).
The parent class definition allows a service feature table to have editable attribute fields, feature templates, feature types, and editing capabilities defined in Capabilities. See FeatureTemplate and FeatureType.
A service feature table might require authentication to access the service.
Constructors
Name | Description |
---|---|
ServiceFeatureTable(ServiceFeatureTable, RelationshipInfo) | Initializes a new instance of the ServiceFeatureTable class. |
ServiceFeatureTable(Item) | Initializes a new instance of the ServiceFeatureTable class from a feature service or feature layer portal item. |
ServiceFeatureTable(Item, Int64) | Initializes a new instance of the ServiceFeatureTable class from a feature service portal item. |
ServiceFeatureTable(Uri) | Initializes a new instance of the ServiceFeatureTable class. |
Properties
Name | Description |
---|---|
ApiKey | Gets or sets the API key that allows your app to access ArcGIS location services and private portal items. |
BufferFactor | Gets or sets the factor used to calculate a buffered extent around the current visible area when requesting new features from the service. |
DefinitionExpression | Gets or sets the expression which is a SQL statement WHERE clause to filter out the features to be queried. |
FeatureRequestMode | Gets or sets the mode defining when features are requested from the service. |
GeodatabaseVersion | Gets or sets the geodatabase version. |
Item | Gets the ArcGIS Item |
ServiceGeodatabase | Gets the ServiceGeodatabase this service feature table is part of. |
Source | Gets or sets the ArcGIS REST service endpoint. |
Methods
Name | Description |
---|---|
ApplyEditsAsync() | Asynchronously uploads any changes to the local table to the feature service. |
ApplyEditsAsync(CancellationToken) | Asynchronously uploads any changes to the local table to the feature service. |
ClearCache(Boolean) | Clears cached data. |
LoadOrRefreshFeaturesAsync(IEnumerable<Feature>) | Loads all attributes and geometries for not loaded features, and re-fetches attributes and geometries for previously loaded features. All features loaded or refreshed by this method will have m-values if defined by the service. Note that an m-value might be NaN. |
PopulateFromServiceAsync(QueryParameters, Boolean, IEnumerable<String>) | Queries the feature service and places the resulting features in the local table, which is cached for the duration of the session. The ServiceFeatureTable must have its FeatureRequestMode set to ManualCache. |
PopulateFromServiceAsync(QueryParameters, Boolean, IEnumerable<String>, CancellationToken) | Asynchronously performs manual query of data from the service and imports feature results into the table. |
QueryFeaturesAsync(QueryParameters, QueryFeatureFields) | Queries features from this table's cache and/or from the feature service used to create this table. |
QueryFeaturesAsync(QueryParameters, QueryFeatureFields, CancellationToken) | Asynchronously submits a query against the table. |
QueryRelatedFeaturesAsync(ArcGISFeature, RelatedQueryParameters, QueryFeatureFields) | Asynchronously queries for related features in this service feature table using the provided parameters and query feature fields. See QueryFeaturesAsync(QueryParameters, QueryFeatureFields) for more details. |
UndoLocalEditsAsync() | Undoes all of the local edits since the last server acknowledgment. |
Applies to
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.6 |
.NET | 100.13 - 200.6 |
.NET Windows | 100.13 - 200.6 |
.NET Android | 200.0 - 200.6 |
.NET iOS | 200.0 - 200.6 |
.NET Framework | 100.0 - 200.6 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.6 |