Parse distance as a number

This commit is contained in:
Tim Schaub
2013-08-14 09:33:47 -04:00
parent a3ec0d776c
commit 824c950824
2 changed files with 23 additions and 1 deletions
+2 -1
View File
@@ -234,7 +234,8 @@ ol.parser.ogc.Filter_v1 = function() {
ol.expr.functions.DWITHIN);
},
'Distance': function(node, obj) {
obj.distance = new ol.expr.Literal(this.getChildValue(node));
var value = goog.string.toNumber(this.getChildValue(node));
obj.distance = new ol.expr.Literal(value);
obj.distanceUnits = new ol.expr.Literal(node.getAttribute('units'));
}
}