Fix handling of VectorTile renderBuffer

This commit is contained in:
Andreas Hocevar
2021-01-10 17:46:04 +01:00
parent b05db5cca6
commit 1cc9fdb6ec
5 changed files with 70 additions and 19 deletions

View File

@@ -30,8 +30,8 @@ const ORDER = [
class ExecutorGroup {
/**
* @param {import("../../extent.js").Extent} maxExtent Max extent for clipping. When a
* `maxExtent` was set on the Buillder for this executor group, the same `maxExtent`
* should be set here, unless the target context does not exceet that extent (which
* `maxExtent` was set on the Builder for this executor group, the same `maxExtent`
* should be set here, unless the target context does not exceed that extent (which
* can be the case when rendering to tiles).
* @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio.
@@ -126,15 +126,13 @@ class ExecutorGroup {
this.executorsByZIndex_[zIndex] = executors;
}
const instructionByZindex = allInstructions[zIndex];
const renderBuffer = [this.renderBuffer_ || 0, this.renderBuffer_ || 0];
for (const builderType in instructionByZindex) {
const instructions = instructionByZindex[builderType];
executors[builderType] = new Executor(
this.resolution_,
this.pixelRatio_,
this.overlaps_,
instructions,
renderBuffer
instructions
);
}
}