Do not accept null coordinates in Point constructor

This commit is contained in:
ahocevar
2018-07-07 14:48:46 +02:00
parent da0838dde2
commit c0d04ea077
8 changed files with 31 additions and 44 deletions

View File

@@ -291,9 +291,7 @@ GMLBase.prototype.readFeatureElement = function(node, objectStack) {
GMLBase.prototype.readPoint = function(node, objectStack) {
const flatCoordinates = this.readFlatCoordinatesFromNode_(node, objectStack);
if (flatCoordinates) {
const point = new Point(null);
point.setFlatCoordinates(GeometryLayout.XYZ, flatCoordinates);
return point;
return new Point(flatCoordinates, GeometryLayout.XYZ);
}
};