How to offset and scale a custom tile layer in Leaflet?

1.2k Views Asked by At

I would like to use this fork (updated to work with latest Leaflet version) of the Leaflet Zoomify plugin to display a custom map (huge texture ~30000x70000).

I need to work on the map with geo coordinates (to set markers) and wonder what's the best way to do it, since there is no way to set offset, scale or boundaries when initialising it through the plugin.

  • Initially I thought there should be a way in Leaflet to calibrate a TileLayer just like it's possible with ImageOverlay by setting the image bounds. But that doesn't seem to be the case.
  • Is this something the plugin should to take care of? In which case I would raise an issue in the repo.
  • I also saw the conversion methods in Leaflet. I'm wondering if the best way to go is to convert the geo coordinates to pixels using those methods?

I'm also open to switch to another file format and plugin.

Any advice is highly appreciated.
Thanks a lot!

1

There are 1 best solutions below

0
On

After all, I went on a totally different route without Zoomify, which I think makes more sense in my case.
I used QGIS to geo-reference my custom layer and export it as GeoTIFF following this tutorial. I uploaded it to Mapbox and baked it into a map style while mixing it with additional map features from Mapbox/OSM.