Merge pull request #6483 from nearmap/tile-render-issue

Fix renderer.canvas.TileLayer to calculate correct canvas height for drawing.
This commit is contained in:
Andreas Hocevar
2017-02-14 21:49:34 +01:00
committed by GitHub
8 changed files with 42 additions and 22 deletions

View File

@@ -180,7 +180,7 @@ ol.renderer.canvas.TileLayer.prototype.prepareFrame = function(frameState, layer
var tilePixelSize = tileSource.getTilePixelSize(z, pixelRatio, projection);
var width = Math.round(tileRange.getWidth() * tilePixelSize[0] / oversampling);
var height = Math.round(tileRange.getHeight() * tilePixelSize[0] / oversampling);
var height = Math.round(tileRange.getHeight() * tilePixelSize[1] / oversampling);
var context = this.context;
var canvas = context.canvas;
var opaque = tileSource.getOpaque(projection);