Accept flat coordinates for MultiPoint constructor

This commit is contained in:
ahocevar
2018-07-07 16:26:24 +02:00
parent 160f1bc286
commit 3871f7785a
5 changed files with 22 additions and 35 deletions

View File

@@ -225,10 +225,7 @@ MultiPolygon.prototype.getFlatInteriorPoints = function() {
* @api
*/
MultiPolygon.prototype.getInteriorPoints = function() {
const interiorPoints = new MultiPoint(null);
interiorPoints.setFlatCoordinates(GeometryLayout.XYM,
this.getFlatInteriorPoints().slice());
return interiorPoints;
return new MultiPoint(this.getFlatInteriorPoints().slice(), GeometryLayout.XYM);
};