question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add tms and zoomOffset options to TileLayer

See original GitHub issue

I’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.

screen shot 2016-06-06 at 13 32 08

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. screen shot 2016-06-06 at 13 32 28

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:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ned2commented, Jul 16, 2022

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!

1reaction
martinRenoucommented, Oct 16, 2020

The tms parameter has been added, we could add the zoomOffset and close this issue, see https://leafletjs.com/reference-1.7.1.html#tilelayer-zoomoffset

Read more comments on GitHub >

github_iconTop Results From Across the Web

L.TileLayer - WRLD3D
Instantiates a tile layer object given a URL template and optionally an options object. Options. Option, Type, Default, Description. minZoom, Number ...
Read more >
L.TileLayer
Option Type Default minZoom Number 0 maxZoom Number 18 maxNativeZoom Number null
Read more >
TileLayer class - flutter_map.plugin_api library - Dart API
A tile is an image bound to a specific geographical position. You should read up about the options by exploring each one, or...
Read more >
tileOptions: Extra options for map elements and layers
tileOptions( minZoom = 0, maxZoom = 18, maxNativeZoom = NULL, tileSize = 256, subdomains = "abc", errorTileUrl = "", tms = FALSE, noWrap...
Read more >
Documentation - a JavaScript library for interactive maps
Returns true if the given layer is currently added to the map ... L.tilelayer(<String> urlTemplate, <TileLayer options> options?) Instantiates a tile layer ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found