diff --git a/src/ol/format/WKT.js b/src/ol/format/WKT.js index be01fc0174..fb3f33fc8f 100644 --- a/src/ol/format/WKT.js +++ b/src/ol/format/WKT.js @@ -858,7 +858,14 @@ Parser.prototype.parseGeometry_ = function() { if (!parser || !ctor) { throw new Error('Invalid geometry type: ' + geomType); } - const coordinates = parser.call(this); + let coordinates = parser.call(this); + if (!coordinates) { + if (ctor === GeometryConstructor[GeometryType.POINT]) { + coordinates = [NaN, NaN]; + } else { + coordinates = []; + } + } return new ctor(coordinates, this.layout_); } }