diff --git a/lib/torque/leaflet/torque.js b/lib/torque/leaflet/torque.js index 1439e16..23310ff 100644 --- a/lib/torque/leaflet/torque.js +++ b/lib/torque/leaflet/torque.js @@ -343,7 +343,7 @@ L.TorqueLayer = L.CanvasLayer.extend({ pos = this.getTilePos(tile.coord); xx = x - pos.x; yy = y - pos.y; - if (xx >= 0 && yy >= 0 && xx <= 256 && yy <= 256) { + if (xx >= 0 && yy >= 0 && xx < this.renderer.TILE_SIZE && yy <= this.renderer.TILE_SIZE) { value = this.renderer.getValueFor(tile, step, xx, yy); } if (value !== null) {