queryFeatures

suspend fun queryFeatures(parameters: QueryParameters, queryFeatureFields: QueryFeatureFields): Result<FeatureQueryResult>

Queries features from this table's cache and/or from the feature service used to create this table. If the request mode of the table is FeatureRequestMode.ManualCache, then the query is always performed on the local table.

If the mode is FeatureRequestMode.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 FeatureRequestMode.OnInteractionNoCache, the query is always performed on the server.

QueryFeatureFields controls which fields will be included with the returned features. The options are:

  • If the service feature table FeatureRequestMode is onInteractionCache or onInteractionNoCache, the table will initially contains features with a minimum set of attribute required for rendering. To access all the feature's attributes you must load the features QueryFeatureFields.LoadAll automatically loads the returned features into the local table and makes all attributes available.

  • If the service feature table FeatureRequestMode is manualCache, the table will contain the fields that you specified when calling ServiceFeatureTable.populateFromService

Note that you can query any attribute defined by the feature service's table. If the attribute is not in the set of attributes in your local table, the query will be performed on the server.

Return

A Result that returns a FeatureQueryResult type.

Since

200.1.0

Parameters

parameters

Options for controlling the operation.

queryFeatureFields

Options for controlling what fields are in the features of the query result.

See also

FeatureServiceSessionType