Fix rendered.canvas.TileLayer to calculate correct canvas height for drawing.

This commit is contained in:
Jan Klaas Kollhof
2017-02-13 13:50:09 +11:00
parent 0c159cf0f7
commit b152f06973

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);