From 33190c1b2091f93553b92c5ce4da4f5d1182298b Mon Sep 17 00:00:00 2001 From: Benjamin Gerber Date: Tue, 13 Mar 2018 09:27:24 +0100 Subject: [PATCH] Better parsing of wfs attributes (= better filters) GEO-1054 --- src/ol-ext/format/wfsattribute.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/ol-ext/format/wfsattribute.js b/src/ol-ext/format/wfsattribute.js index 775a3f29862e..d12829804569 100644 --- a/src/ol-ext/format/wfsattribute.js +++ b/src/ol-ext/format/wfsattribute.js @@ -41,10 +41,20 @@ ngeo.format.WFSAttribute = class { const type = goog.asserts.assertString(object['type']); if (!ngeo.Attribute.setGeometryType(attribute, type)) { - if (type === 'gml:TimeInstantType') { + if (type === 'gml:TimeInstantType' || type === 'dateTime') { attribute.type = ngeo.AttributeType.DATETIME; - } else if (type === 'double') { + } else if (type === 'date') { + attribute.type = ngeo.AttributeType.DATE; + } else if (type === 'time') { + attribute.type = ngeo.AttributeType.TIME; + } else if (type === 'decimal' || type === 'double') { attribute.type = ngeo.AttributeType.NUMBER; + attribute.numType = ngeo.NumberType.FLOAT; + } else if (type === 'integer' || type === 'long') { + attribute.type = ngeo.AttributeType.NUMBER; + attribute.numType = ngeo.NumberType.INTEGER; + } else if (type === 'boolean') { + attribute.type = ngeo.AttributeType.BOOLEAN; } else { attribute.type = ngeo.AttributeType.TEXT; }