Spatial data services, such as an OGC WFS service, typically support object filtering by bounding box.
When you are creating a Store for a protocol that supports bounding box queries, you can implement the spatialQuery
method of the Store
.
This method takes two parameters:
-
The bounding box for which to return features.
-
The query object, which is the same as the argument of the
query
method of theStore
.
If the Store implements the spatialQuery
method, a FeatureLayer
can use the LoadSpatially
data loading strategy.
Such a strategy limits the request for data to just the features within the current view bounds. This is a useful strategy to improve performance, because it downloads data in small batches each time the view extent changes.