aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/cobrands/bristol/assets.js2
-rw-r--r--web/cobrands/fixmystreet/assets.js6
2 files changed, 6 insertions, 2 deletions
diff --git a/web/cobrands/bristol/assets.js b/web/cobrands/bristol/assets.js
index 1b32379dc..b886c1f2b 100644
--- a/web/cobrands/bristol/assets.js
+++ b/web/cobrands/bristol/assets.js
@@ -14,7 +14,7 @@ var options = {
min_resolution: 0.00001,
asset_id_field: 'COD_ASSET_ID',
asset_type: 'spot',
- propertyNames: [ 'COD_ASSET_ID', 'COD_USRN' ],
+ propertyNames: [ 'COD_ASSET_ID', 'COD_USRN', 'COD_ASSET_TYPE' ],
attributes: {
asset_id: 'COD_ASSET_ID',
usrn: 'COD_USRN'
diff --git a/web/cobrands/fixmystreet/assets.js b/web/cobrands/fixmystreet/assets.js
index c27d19211..c653fe908 100644
--- a/web/cobrands/fixmystreet/assets.js
+++ b/web/cobrands/fixmystreet/assets.js
@@ -522,6 +522,8 @@ fixmystreet.assets = {
layer_options.projection = new OpenLayers.Projection(fixmystreet.wmts_config.map_projection);
}
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).
if (OpenLayers.Util.isArray(options.filter_value)) {
layer_options.filter = new OpenLayers.Filter.FeatureId({
type: OpenLayers.Filter.Function,
@@ -540,8 +542,10 @@ fixmystreet.assets = {
property: options.filter_key,
value: options.filter_value
});
- layer_options.strategies.push(new OpenLayers.Strategy.Filter({filter: layer_options.filter}));
}
+ // 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}));
}