Merge pull request #5731 from Benjaki2/master
Added a pixelRatio adjust to the canvasTileLayer 'forEachLayerAtPixel…
This commit is contained in:
@@ -198,8 +198,9 @@ ol.renderer.canvas.TileLayer.prototype.forEachLayerAtPixel = function(
|
|||||||
pixel, frameState, callback, thisArg) {
|
pixel, frameState, callback, thisArg) {
|
||||||
var canvas = this.context.canvas;
|
var canvas = this.context.canvas;
|
||||||
var size = frameState.size;
|
var size = frameState.size;
|
||||||
canvas.width = size[0];
|
var pixelRatio = frameState.pixelRatio;
|
||||||
canvas.height = size[1];
|
canvas.width = size[0] * pixelRatio;
|
||||||
|
canvas.height = size[1] * pixelRatio;
|
||||||
this.composeFrame(frameState, this.getLayer().getLayerState(), this.context);
|
this.composeFrame(frameState, this.getLayer().getLayerState(), this.context);
|
||||||
|
|
||||||
var imageData = this.context.getImageData(
|
var imageData = this.context.getImageData(
|
||||||
|
|||||||
Reference in New Issue
Block a user