include gutter in offsets

This commit is contained in:
mike-000
2022-03-29 12:58:04 +01:00
parent 14651563b4
commit 243ba189b7
2 changed files with 17 additions and 2 deletions

View File

@@ -397,8 +397,19 @@ class TileTexture extends EventTarget {
let data;
const image = this.tile.getImage();
const gutter = Math.round(this.tilePixelRatio_ * this.gutter_);
try {
pixelContext.drawImage(image, col, row, 1, 1, 0, 0, 1, 1);
pixelContext.drawImage(
image,
col + gutter,
row + gutter,
1,
1,
0,
0,
1,
1
);
data = pixelContext.getImageData(0, 0, 1, 1).data;
} catch (err) {
return null;