Method QueryFeaturesAsync
QueryFeaturesAsync(QueryParameters, QueryFeatureFields)
Queries features from this table's cache and/or from the feature service used to create this table.
Declaration
public Task<FeatureQueryResult> QueryFeaturesAsync(QueryParameters parameters, QueryFeatureFields queryFeatureFields)
Parameters
Type | Name | Description |
---|---|---|
QueryParameters | parameters | Options for controlling the operation. |
QueryFeatureFields | queryFeatureFields | Options for controlling what fields are in the features of the query result. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<FeatureQueryResult> | A task that represents the asynchronous query features operation. The value of the task result is a FeatureQueryResult object. |
Remarks
If the request mode of the table is ManualCache, then the query is always performed on the local table.
If the mode is OnInteractionCache, then the query is performed on the local cache, provided that the geometries of the features are within an extent that has been cached; otherwise, the query is performed on the server.
If the mode is OnInteractionNoCache, the query is always performed on the server.
The QueryFeatureFields constants control which fields will be included with the returned features.
- A table whose feature request mode is manualCache contains all fields that you specified when calling PopulateFromServiceAsync(QueryParameters, Boolean, IEnumerable<String>).
- A table whose feature request mode is onInteractionCache or onInteractionNoCache initially contains features with a minimum set of attribute required for rendering. You must load a feature to access all its attributes. The convenience constant LoadAll automatically loads the returned features into the local table, which makes all attributes available.
Note that you can query on any attribute defined by the feature service's table. If the attribute is not in the minimum set of attributes in your local table, the query will be performed on the server.
Applies to
Platforms and versions
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 |
Relevant samples
QueryFeaturesAsync(QueryParameters, QueryFeatureFields, CancellationToken)
Asynchronously submits a query against the table.
Declaration
public Task<FeatureQueryResult> QueryFeaturesAsync(QueryParameters parameters, QueryFeatureFields queryFeatureFields, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
QueryParameters | parameters | Options for controlling the operation. |
QueryFeatureFields | queryFeatureFields | Options for controlling what data is in the query result. |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<FeatureQueryResult> | A task that represents the asynchronous query features operation. The value of the task result is a FeatureQueryResult object. |
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.6 |
.NET | 100.13 - 200.6 |
.NET Windows | 100.13 - 200.6 |
.NET Android | 200.2 - 200.6 |
.NET iOS | 200.0 - 200.6 |
.NET Framework | 100.0 - 200.6 |
Xamarin.Android | 100.0 - 100.14 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.6 |