Skip to content

Commit

Permalink
Better parsing of wfs attributes (= better filters)
Browse files Browse the repository at this point in the history
  • Loading branch information
ger-benjamin committed Mar 13, 2018
1 parent 5ad6ec9 commit 33190c1
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/ol-ext/format/wfsattribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 33190c1

Please sign in to comment.