aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-10-27 12:55:32 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-11-11 07:44:44 +0000
commitcab0360bdbe587abe68a9e5921bd19200714ff39 (patch)
tree3c7162bb55c85577de5d803daf563eb4109b683a
parent8168f6ae5d8499a6dde9466d17a3ae88cb038c21 (diff)
Add option of only requesting some WFS attributes.
-rw-r--r--web/cobrands/bristol/js.js1
-rw-r--r--web/cobrands/fixmystreet/assets.js3
2 files changed, 4 insertions, 0 deletions
diff --git a/web/cobrands/bristol/js.js b/web/cobrands/bristol/js.js
index f47df6777..129037d23 100644
--- a/web/cobrands/bristol/js.js
+++ b/web/cobrands/bristol/js.js
@@ -7,6 +7,7 @@ var options = {
min_resolution: 0.00001,
asset_id_field: 'COD_ASSET_ID',
asset_type: 'spot',
+ propertyNames: [ 'COD_ASSET_ID', 'COD_USRN' ],
attributes: {
asset_id: 'COD_ASSET_ID',
usrn: 'COD_USRN'
diff --git a/web/cobrands/fixmystreet/assets.js b/web/cobrands/fixmystreet/assets.js
index 630cebccb..dd76a8e8f 100644
--- a/web/cobrands/fixmystreet/assets.js
+++ b/web/cobrands/fixmystreet/assets.js
@@ -267,6 +267,9 @@ fixmystreet.add_assets = function(options) {
if (fixmystreet.wmts_config) {
protocol_options.srsName = fixmystreet.wmts_config.map_projection;
}
+ if (options.propertyNames) {
+ protocol_options.propertyNames = options.propertyNames;
+ }
var protocol = new OpenLayers.Protocol.WFS(protocol_options);
var layer_options = {
fixmystreet: options,