aparshin / leaflet-boundary-canvas

Leaflet plugin to draw raster layers with arbitrary boundary
MIT License
170 stars 41 forks source link

Fix bug with zoomOffset option #24

Closed Kawaizombi closed 5 years ago

Kawaizombi commented 5 years ago

take in account zoomOffset option for calculation of tile geometries, now it will not load tiles in given boundary

how to reproduce:

const layer = new L.TileLayer(url, { zoomOffset: -1, tileSize: 512 })
const bLayer = L.TileLayer.BoundaryCanvas.createFromLayer(layer, { boundary: 'some geojson' })