From d3fdda6efc562c3d14e4059084ed1addfad4a47f Mon Sep 17 00:00:00 2001 From: ThomasG77 Date: Thu, 25 Oct 2018 05:46:49 +0200 Subject: [PATCH] Add condition for viewParams and TypeScript related option --- src/ol/format/WFS.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ol/format/WFS.js b/src/ol/format/WFS.js index d1dab0d619..aa36383f58 100644 --- a/src/ol/format/WFS.js +++ b/src/ol/format/WFS.js @@ -99,6 +99,7 @@ const TRANSACTION_SERIALIZERS = { * @property {number} [maxFeatures] Maximum number of features to fetch. * @property {string} [geometryName] Geometry name to use in a BBOX filter. * @property {Array} [propertyNames] Optional list of property names to serialize. + * @property {string} [viewParams] viewParams GeoServer vendor parameter. * @property {number} [startIndex] Start index to use for WFS paging. This is a * WFS 2.0 feature backported to WFS 1.1.0 by some Web Feature Services. * @property {number} [count] Number of features to retrieve when paging. This is a @@ -406,6 +407,9 @@ class WFS extends XMLFeature { if (options.count !== undefined) { node.setAttribute('count', String(options.count)); } + if (options.viewParams !== undefined) { + node.setAttribute('viewParams ', options.viewParams); + } filter = options.filter; if (options.bbox) { assert(options.geometryName,