Display an OGC API feature collection and query features while navigating the map view.

Use case
When panning the map view, it may be necessary to query the OGC API feature table for additional features within the new visible extent.
How to use the sample
Pan the map and see how new features are loaded from the OGC API feature service.
How it works
- Create an
OGCFeatureCollectionTableobject using a URL to an OGC API feature service and a collection ID. - Set the feature table’s
featureRequestModeproperty tomanualCache. - Create a
FeatureLayerusing the feature table and add it to the map view. - Create a default
QueryParametersobject.- Set the parameter’s
spatialRelationshipproperty tointersects. - Set the
maxFeaturesproperty to5_000(some services have a low default value for maximum features).
- Set the parameter’s
- Every time the map view navigation completes:
- Set the parameter’s
geometryto the current extent of the map view. - Call
OGCFeatureCollectionTable.populateFromService(using:clearCache:outFields:queryLanguage:)using the query parameters.
- Set the parameter’s
Relevant API
- OGCFeatureCollectionTable
- QueryParameters
About the data
The Daraa, Syria test data is OpenStreetMap data converted to the Topographic Data Store schema of NGA.
Additional information
See the OGC API website for more information on the OGC API family of standards.
Tags
feature, feature layer, feature table, OGC, OGC API, service, table, web