Do not use fractional pixel ratio for rendering vector tiles
This commit is contained in:
@@ -796,7 +796,9 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer {
|
||||
const context = tile.getContext(layer);
|
||||
|
||||
// Increase tile size when overzooming for low pixel ratio, to avoid blurry tiles
|
||||
pixelRatio = Math.max(pixelRatio, renderPixelRatio / pixelRatio);
|
||||
pixelRatio = Math.round(
|
||||
Math.max(pixelRatio, renderPixelRatio / pixelRatio)
|
||||
);
|
||||
const size = source.getTilePixelSize(z, pixelRatio, projection);
|
||||
context.canvas.width = size[0];
|
||||
context.canvas.height = size[1];
|
||||
|
||||
Reference in New Issue
Block a user