kopia lustrzana https://github.com/rastapasta/mapscii
fixed empty blocks at some zoom levels
rodzic
d85535e9ef
commit
ecda55a44a
|
@ -118,13 +118,14 @@ class Renderer {
|
||||||
}
|
}
|
||||||
|
|
||||||
const scale = layer.extent / utils.tilesizeAtZoom(zoom);
|
const scale = layer.extent / utils.tilesizeAtZoom(zoom);
|
||||||
|
const searchPadding = this.tilePadding * scale;
|
||||||
layers[layerId] = {
|
layers[layerId] = {
|
||||||
scale: scale,
|
scale: scale,
|
||||||
features: layer.tree.search({
|
features: layer.tree.search({
|
||||||
minX: -position.x * scale,
|
minX: (-position.x - searchPadding) * scale,
|
||||||
minY: -position.y * scale,
|
minY: (-position.y - searchPadding) * scale,
|
||||||
maxX: (this.width - position.x) * scale,
|
maxX: (this.width - position.x + searchPadding) * scale,
|
||||||
maxY: (this.height - position.y) * scale
|
maxY: (this.height - position.y + searchPadding) * scale
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue