Support declutter mode for image styles

Allows to specify for each image style, whether the image
should be decluttered, always drawn but still serving as
obstacle, or drawn without being an obstacle for other
images/texts.

The layer must still have declutter = true set for this
property to have any effect.
This commit is contained in:
VLCEK Martin
2022-04-11 16:36:43 +02:00
parent c2639f89f2
commit e1593ce59d
11 changed files with 330 additions and 63 deletions

View File

@@ -320,7 +320,7 @@ describe('ol.render.canvas.TextBuilder', function () {
builder.drawText(feature.getGeometry(), feature);
expect(builder.coordinates).to.have.length(2);
expect(builder.instructions).to.have.length(3);
const geometryWidths = builder.instructions[1][24];
const geometryWidths = builder.instructions[1][25];
expect(geometryWidths).to.have.length(1);
expect(geometryWidths[0]).to.be(120);
});