Display an OGC API feature collection and query features while navigating the map view.
When panning the map view, it may be necessary to query the OGC API feature table for additional features within the new visible extent.
Pan the map and observe how new features are loaded from the OGC API feature service.
- Create an
OgcFeatureCollectionTable
object using a URL to an OGC API feature service and a collection ID. - Set the feature table's
FeatureRequestMode
property toFeatureRequestMode.ManualCache
. - Call
OgcFeatureCollectionTable.LoadAsync()
- Create a
FeatureLayer
using the feature table and add it to the map view. - Every time the map view navigation completes:
- Create
QueryParameters
. - Set the parameter's
Geometry
to the current extent of the map view. - Set the parameter's
SpatialRelationship
property toSpatialRelationship.Intersects
. - Set the
MaxFeatures
property to 5000 (some services have a low default value for maximum features). - Call
OgcFeatureCollectionTable.PopulateFromServiceAsync()
using the query parameters from the previous steps.
- Create
- OgcFeatureCollectionTable
- QueryParameters
The Daraa, Syria test data is OpenStreetMap data converted to the Topographic Data Store schema of NGA.
See the OGC API website for more information on the OGC API family of standards.
feature, feature layer, feature table, OGC, OGC API, service, table, web