Work with sources that have a max zoom

This commit is contained in:
Tim Schaub
2018-11-14 21:04:04 +01:00
parent 9a4e665c3b
commit 8822690cf4

View File

@@ -174,9 +174,9 @@ class CanvasTileLayerRenderer extends CanvasLayerRenderer {
let width = Math.round(frameState.size[0] * tilePixelRatio);
let height = Math.round(frameState.size[1] * tilePixelRatio);
if (tileResolution < viewResolution) {
const scale = tileResolution / tileGrid.getResolution(z + 1);
width *= scale;
height *= scale;
// scale canvas so it covers the viewport until new tiles come it
width *= 1.5;
height *= 1.5;
}
if (rotation) {