From 16a09930fb39d81de777a4ecfd9364933d83fec1 Mon Sep 17 00:00:00 2001 From: Bart van den Eijnden Date: Tue, 4 Mar 2014 16:20:23 +0100 Subject: [PATCH] Use ol.format.XSD.readNonNegativeIntegerString instead of parseInt --- src/ol/format/gmlformat.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ol/format/gmlformat.js b/src/ol/format/gmlformat.js index e3ebc9c84a..ab422f6352 100644 --- a/src/ol/format/gmlformat.js +++ b/src/ol/format/gmlformat.js @@ -727,11 +727,13 @@ ol.format.GML.readFlatPosList_ = function(node, objectStack) { // The "dimension" attribute is from the GML 3.0.1 spec. var dim = 2; if (!goog.isNull(node.getAttribute('srsDimension'))) { - dim = parseInt(node.getAttribute('srsDimension'), 10); + dim = ol.format.XSD.readNonNegativeIntegerString( + node.getAttribute('srsDimension')); } else if (!goog.isNull(node.getAttribute('dimension'))) { - dim = parseInt(node.getAttribute('dimension'), 10); + dim = ol.format.XSD.readNonNegativeIntegerString( + node.getAttribute('dimension')); } else if (!goog.isNull(containerDimension)) { - dim = parseInt(containerDimension, 10); + dim = ol.format.XSD.readNonNegativeIntegerString(containerDimension); } var x, y, z; var flatCoordinates = [];