From cab0360bdbe587abe68a9e5921bd19200714ff39 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Thu, 27 Oct 2016 12:55:32 +0100 Subject: Add option of only requesting some WFS attributes. --- web/cobrands/bristol/js.js | 1 + web/cobrands/fixmystreet/assets.js | 3 +++ 2 files changed, 4 insertions(+) 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, -- cgit v1.2.3