Merge pull request #9704 from ahocevar/vectortile-reuse-issue
Handle container reuse properly when layers are added/removed
This commit is contained in:
@@ -129,12 +129,9 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer {
|
|||||||
}
|
}
|
||||||
const containerReused = this.containerReused;
|
const containerReused = this.containerReused;
|
||||||
super.useContainer(target, transform, opacity);
|
super.useContainer(target, transform, opacity);
|
||||||
if (containerReused && !this.containerReused && !overlayContext) {
|
if (containerReused) {
|
||||||
this.overlayContext_ = null;
|
this.overlayContext_ = overlayContext || null;
|
||||||
this.overlayContextUid_ = undefined;
|
this.overlayContextUid_ = overlayContext ? getUid(overlayContext) : undefined;
|
||||||
}
|
|
||||||
if (this.containerReused && overlayContext) {
|
|
||||||
this.overlayContext_ = overlayContext;
|
|
||||||
}
|
}
|
||||||
if (!this.overlayContext_) {
|
if (!this.overlayContext_) {
|
||||||
const overlayContext = createCanvasContext2D();
|
const overlayContext = createCanvasContext2D();
|
||||||
|
|||||||
Reference in New Issue
Block a user