improve test with overlapping circles.

This commit is contained in:
VLCEK Martin
2022-05-05 13:47:46 +02:00
parent 9338286661
commit 9adfe7aca6

View File

@@ -27,8 +27,8 @@ sourceBlue.addFeatures([
text: 'top-blue', text: 'top-blue',
}), }),
]); ]);
// circles are always drawn, but serve as obstacles, // on-top blue circle.
// texts are decluttered against each other and the circles // shows that objects (red layer) will not serve as obstacles for layers on-top.
map.addLayer( map.addLayer(
new VectorLayer({ new VectorLayer({
zIndex: 4, zIndex: 4,
@@ -70,8 +70,10 @@ sourceRed.addFeatures([
text: 'e-red', text: 'e-red',
}), }),
]); ]);
// circles are always drawn, but serve as obstacles, // red circles are always drawn, but serve as obstacles.
// texts are decluttered against each other and the circles // however, they cannot serve as obstacles for layers on-top (blue layer).
// texts are decluttered against each other and the circles.
// circles are drawn on non-declutter executor, i.e. behind decluttered labels and objects.
map.addLayer( map.addLayer(
new VectorLayer({ new VectorLayer({
zIndex: 3, zIndex: 3,
@@ -113,8 +115,8 @@ sourceOrange.addFeatures([
text: 'e-orange', text: 'e-orange',
}), }),
]); ]);
// circles are always drawn, // orange circles are always drawn.
// texts are decluttered against each other and the layer 1 circles/texts // texts are decluttered against each other and the blue/red layer circles/texts.
map.addLayer( map.addLayer(
new VectorLayer({ new VectorLayer({
zIndex: 2, zIndex: 2,
@@ -156,10 +158,10 @@ sourceCyan.addFeatures([
text: 'e-cyan', text: 'e-cyan',
}), }),
]); ]);
// circles are always drawn // cyan circles are always drawn.
// texts are decluttered against each others (and layers 1/2) // texts are decluttered against each others (and blue/red/orange layers).
// the circles of layer 2 and this layer are no obstactles for texts // the circles of the orange layer and this layer are no obstactles for texts.
// the texts are decluttered and thus above the circles of layer 2 // the texts are decluttered and thus above the circles of the orange layer.
map.addLayer( map.addLayer(
new VectorLayer({ new VectorLayer({
zIndex: 1, zIndex: 1,