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 #25

Open Kawaizombi opened 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' })