Add tms and zoomOffset options to TileLayer
See original GitHub issueI’m trying to use some tiles I generated with custom maps.
I already implemented a pure leaflet test Leaflet Map Test and I was really excited to get all this in notebooks!
The biggest problem is that the ipyleaflet.leaflet.TileLayer
cannot change all the parameter leaflet.tilelayer
(here) would accept.
In particular, the tms
and zoomOffset
are critical to my application , I manages to hack the parameter directly in the js code from jupyter-leaflet on my machine.
Would be hard to implement this in ipyleaflet? In the js code the parameter are there, but commented out. I haven’t enough knowledge of the jupyter widget mechanism and javascript to make this change.
Adding the tms=true
paramter to ipyleaflet.leaflet.TileLayer
inizialization doesn’t affect the instantiated object, I guess while the class TileLayer(RasterLayer)
in leaflet.py doesn’t have this parameter declared and cannot pass it further.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Heya @martinRenou, just submitted #1023 to add support for
zoomOffset
. Looks like it was just as simple as adding the param to both the Python and JS class. With this I was able to get Mapbox working with 512px tiles.I haven’t contributed to ipyleaflet before, so please lemme know if there’s anything else I need to do!
The
tms
parameter has been added, we could add thezoomOffset
and close this issue, see https://leafletjs.com/reference-1.7.1.html#tilelayer-zoomoffset