Work with sources that have a max zoom
This commit is contained in:
@@ -174,9 +174,9 @@ class CanvasTileLayerRenderer extends CanvasLayerRenderer {
|
|||||||
let width = Math.round(frameState.size[0] * tilePixelRatio);
|
let width = Math.round(frameState.size[0] * tilePixelRatio);
|
||||||
let height = Math.round(frameState.size[1] * tilePixelRatio);
|
let height = Math.round(frameState.size[1] * tilePixelRatio);
|
||||||
if (tileResolution < viewResolution) {
|
if (tileResolution < viewResolution) {
|
||||||
const scale = tileResolution / tileGrid.getResolution(z + 1);
|
// scale canvas so it covers the viewport until new tiles come it
|
||||||
width *= scale;
|
width *= 1.5;
|
||||||
height *= scale;
|
height *= 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rotation) {
|
if (rotation) {
|
||||||
|
|||||||
Reference in New Issue
Block a user