Demonstrates the use of a spatial filter in making GetFeature requests using the WFS protocol.
If a vector layer has a filter and the protocol supports server-side filtering, the filter will be serialized in requests for features. The WFS protocol can be used with a vector layer to serialize a filter using OGC Filter Encoding.
This example has a draw control that is always active. When you draw a polygon on the map, the filter for the main vector layer will be updated, and features that intersect your drawn polygon will be requested.
See the source for details on how this is done.