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

@@ -302,8 +302,7 @@ describe('ol.rendering.style.Text', function() {
it('renders text along a MultiPolygon', function(done) {
createMap('canvas');
let geom = new Polygon(polygon, 'XY', [polygon.length]);
const multiPolygon = new MultiPolygon(null);
multiPolygon.appendPolygon(geom);
const multiPolygon = new MultiPolygon([geom]);
geom = geom.clone();
geom.translate(0, 30);
multiPolygon.appendPolygon(geom);