aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--web/cobrands/bristol/assets.js3
-rw-r--r--web/cobrands/fixmystreet/assets.js13
2 files changed, 8 insertions, 8 deletions
diff --git a/web/cobrands/bristol/assets.js b/web/cobrands/bristol/assets.js
index 0e22e8f19..0e1ac603f 100644
--- a/web/cobrands/bristol/assets.js
+++ b/web/cobrands/bristol/assets.js
@@ -19,7 +19,7 @@ var options = {
wfs_url: "https://maps.bristol.gov.uk/arcgis/services/ext/FixMyStreetSupportData/MapServer/WFSServer",
wfs_feature: "COD_ASSETS_POINT",
asset_id_field: 'COD_ASSET_ID',
- propertyNames: [ 'COD_ASSET_ID', 'COD_USRN', 'COD_ASSET_TYPE', 'SHAPE' ],
+ propertyNames: [ 'COD_ASSET_ID', 'COD_USRN', 'SHAPE' ],
filter_key: 'COD_ASSET_TYPE',
attributes: {
asset_id: 'COD_ASSET_ID',
@@ -50,7 +50,6 @@ fixmystreet.assets.add(options, {
fixmystreet.assets.add(options, {
asset_category: "Flooding",
asset_item: 'flood risk structure',
- filter_key: 'COD_ASSET_TYPE',
filter_value: 'FRST'
});
diff --git a/web/cobrands/fixmystreet/assets.js b/web/cobrands/fixmystreet/assets.js
index ad832e67f..25c1ac08e 100644
--- a/web/cobrands/fixmystreet/assets.js
+++ b/web/cobrands/fixmystreet/assets.js
@@ -596,8 +596,8 @@ function construct_layer_options(options, protocol) {
}
if (options.filter_key) {
- // Add this filter to the layer, so it can potentially be used
- // in the request (though only Bristol currently does this).
+ // Add this filter to the layer, so it can potentially be
+ // used in the request if non-HTTP WFS
if (OpenLayers.Util.isArray(options.filter_value)) {
layer_options.filter = new OpenLayers.Filter.Logical({
type: OpenLayers.Filter.Logical.OR,
@@ -621,10 +621,11 @@ function construct_layer_options(options, protocol) {
value: options.filter_value
});
}
- // Add a strategy filter to the layer, to filter the incoming results
- // after they are received. Bristol does not need this, but has to ask
- // for the filter data in its response so it doesn't then disappear.
- layer_options.strategies.push(new OpenLayers.Strategy.Filter({filter: layer_options.filter}));
+ // If using HTTP WFS, add a strategy filter to the layer,
+ // to filter the incoming results after being received.
+ if (options.http_options) {
+ layer_options.strategies.push(new OpenLayers.Strategy.Filter({filter: layer_options.filter}));
+ }
}
return layer_options;