Accept flat coordinates in LineString constructor

This commit is contained in:
ahocevar
2018-07-07 16:04:43 +02:00
parent c0d04ea077
commit 160f1bc286
14 changed files with 57 additions and 67 deletions

View File

@@ -388,8 +388,7 @@ GMLBase.prototype.polygonMemberParser_ = function(node, objectStack) {
GMLBase.prototype.readLineString = function(node, objectStack) {
const flatCoordinates = this.readFlatCoordinatesFromNode_(node, objectStack);
if (flatCoordinates) {
const lineString = new LineString(null);
lineString.setFlatCoordinates(GeometryLayout.XYZ, flatCoordinates);
const lineString = new LineString(flatCoordinates, GeometryLayout.XYZ);
return lineString;
} else {
return undefined;