Show / Hide Table of Contents

Method PopulateFromServiceAsync

PopulateFromServiceAsync(QueryParameters, Boolean, IEnumerable<String>)

Asynchronously populates the OGC API - Features feature collection table with the results of a query.

Declaration
public Task<FeatureQueryResult> PopulateFromServiceAsync(QueryParameters parameters, bool clearCache, IEnumerable<string> outFields)
Parameters
Type Name Description
QueryParameters parameters

The QueryParameters used to filter feature results.

System.Boolean clearCache

A value indicating whether to clear existing table data before loading new results. If true, clears existing table data before populating it with features returned from the service.

System.Collections.Generic.IEnumerable<System.String> outFields

The optional list of attribute fields to include in the result.

Returns
Type Description
System.Threading.Tasks.Task<FeatureQueryResult>

A System.Threading.Tasks.Task that represents the asynchronous populate from service operation. The value of the task result is a FeatureQueryResult object.

Remarks

Use the default (empty) QueryParameters to get all features from a service. Specifying null or an empty enumerable for outFields will result in the default set of outfields being used. Spatial queries (those that set Geometry) must use Intersects.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.10 - 200.8
.NET100.13 - 200.8
.NET Windows100.13 - 200.8
.NET Android200.2 - 200.8
.NET iOS200.0 - 200.8
.NET Framework100.10 - 200.8
Xamarin.Android100.10 - 100.14
Xamarin.iOS100.10 - 100.15
UWP100.10 - 200.8

PopulateFromServiceAsync(QueryParameters, Boolean, IEnumerable<String>, CancellationToken)

Asynchronously populates the table using a query.

Declaration
public async Task<FeatureQueryResult> PopulateFromServiceAsync(QueryParameters parameters, bool clearCache, IEnumerable<string> outFields, CancellationToken cancellationToken)
Parameters
Type Name Description
QueryParameters parameters

The QueryParameters used to filter feature results.

System.Boolean clearCache

A value indicating whether to clear existing table data before loading new results.

System.Collections.Generic.IEnumerable<System.String> outFields

The optional list of attribute fields to include in the 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 System.Threading.Tasks.Task that represents the asynchronous populate from service operation. The value of the task result is a FeatureQueryResult object.

Remarks

Use the default (empty) QueryParameters to get all features from a service. Specifying null or an empty enumerable for outFields will result in the default set of outfields being used. Spatial queries (those that set Geometry) must use Intersects.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.10 - 200.8
.NET100.13 - 200.8
.NET Windows100.13 - 200.8
.NET Android200.2 - 200.8
.NET iOS200.0 - 200.8
.NET Framework100.10 - 200.8
Xamarin.Android100.10 - 100.14
Xamarin.iOS100.10 - 100.15
UWP100.10 - 200.8

PopulateFromServiceAsync(QueryParameters, Boolean, IEnumerable<String>, String, CancellationToken)

Populate the OGC API - Features feature collection table with the results of a query.

Declaration
public async Task<FeatureQueryResult> PopulateFromServiceAsync(QueryParameters parameters, bool clearCache, IEnumerable<string> outFields, string queryLanguage, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
QueryParameters parameters

Parameters that define how features are returned from the service.

System.Boolean clearCache

If true, clears existing table data before populating it with features returned from the service.

System.Collections.Generic.IEnumerable<System.String> outFields

An optional list of attribute fields to include in the result.

System.String queryLanguage

The query language that the WhereClause is written in.

System.Threading.CancellationToken cancellationToken

An optional 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 System.Threading.Tasks.Task that represents the asynchronous populate from service operation. The value of the task result is a FeatureQueryResult object.

Remarks

Populates the OgcFeatureCollectionTable with features from the service that match the query parameters. Use the default (empty) QueryParameters to get all features from the service. Specifying null or an empty enumerable for outFields will result in the default set of outfields being used. Spatial queries (those that specify geometries) must use the Intersects spatial relationship.

Some OGC feature sources allow for query expressions to be written in different languages. The queryLanguage parameter allows you to explicitly specify the language of the WhereClause for the OGC feature query. The value of this parameter may be 'CQL2-TEXT', 'CQL2-JSON', or any other language supported by the target server. For OGC feature services the default language is CQL2-TEXT. For more information, refer to the OGC specification OGC API - Features - Part3. The default value is an empty string, indicating that the WhereClause uses the default language for the source.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0200.6 - 200.8
.NET200.6 - 200.8
.NET Windows200.6 - 200.8
.NET Android200.6 - 200.8
.NET iOS200.6 - 200.8
.NET Framework200.6 - 200.8
UWP200.6 - 200.8
In This Article
Back to top Copyright © 2022 Esri.