Accept polygons and flat coordinates in MultiPolygon constructor

This commit is contained in:
ahocevar
2018-07-07 17:31:35 +02:00
parent 0ec0491ef6
commit ce97cee6a6
7 changed files with 59 additions and 90 deletions

View File

@@ -122,11 +122,7 @@ GML3.prototype.readMultiSurface_ = function(node, objectStack) {
const polygons = pushParseAndPop([],
this.MULTISURFACE_PARSERS_, node, objectStack, this);
if (polygons) {
const multiPolygon = new MultiPolygon(null);
multiPolygon.setPolygons(polygons);
return multiPolygon;
} else {
return undefined;
return new MultiPolygon(polygons);
}
};