Merge pull request #2741 from bartvde/issue-2741

issue with reading scientific notation coordinates in ol.format.GML (r=@fredj)
This commit is contained in:
Bart van den Eijnden
2014-09-23 16:17:36 +02:00
2 changed files with 20 additions and 1 deletions

View File

@@ -699,7 +699,7 @@ ol.format.GML.readFlatCoordinatesFromNode_ = function(node, objectStack) {
*/
ol.format.GML.readFlatPos_ = function(node, objectStack) {
var s = ol.xml.getAllTextContent(node, false);
var re = /^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*/;
var re = /^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/;
/** @type {Array.<number>} */
var flatCoordinates = [];
var m;