Current behavior
Layers created by the WFSCapabilitiesReader have the strategy OpenLayers.Strategy.Fixed. It is not possible to define custom ones (in WFSCapabilitiesStore) because the same object(s) would be used for each layers instead of creating new ones, which must not be the case (strategies must be binded to a unique layer).
Proposed fix
If OpenLayers could support text/hash option values instead of objects, that would be perfect. Since it's not currently the case, we could read the options we want to support having text/hash values directly in the widget.
Example :
var store = new GeoExt.data.WFSCapabilitiesStore( {
url: "/path/to/wfs",
layerOptions: {
visibility: false,
displayInLayerSwitcher: false,
strategies: [{"BBOX"}]
}
});
or with value equal to the hash of options to use when creating the object :
var store = new GeoExt.data.WFSCapabilitiesStore( {
url: "/path/to/wfs",
layerOptions: {
visibility: false,
displayInLayerSwitcher: false,
strategies: [{"BBOX": {ratio: 1}}]
}
});