LocalTileLayer not visible
See original GitHub issueThe following shows open street map but no additional layers:
import ipyleaflet
m = ipyleaflet.Map(center=(10, 36),zoom=5)
m.add_layer(ipyleaflet.LocalTileLayer(url="./tileset/{z}/{x}/{y}.png"))
m
No errors or anything in the jupyter lab console log.
I created the tileset with gdal2tiles, which conveniently creates a “leaflet.html” file within “./tileset”. When I use the jupter lab file browser to open that html file in a new browser window, I get a lot of 403’s saying “blocking request with no referer”. But I don’t see anything like that in the javascript console with they ipyleaflet chunk above, so possibly not relevant.
Some version info:
$ pip list | grep ipy
ipykernel 5.1.2
ipyleaflet 0.11.2
ipython 7.6.1
ipython-genutils 0.2.0
ipywidgets 7.5.1
scipy 1.2.1
$ pip list | grep jupyter
jupyter 1.0.0
jupyter-client 5.3.1
jupyter-console 6.0.0
jupyter-core 4.5.0
jupyterlab 1.1.2
jupyterlab-git 0.8.1
jupyterlab-server 1.0.6
Issue Analytics
- State:
- Created 4 years ago
- Comments:18 (11 by maintainers)
Top Results From Across the Web
Defining and including local tileLayer in Leaflet
For information, a "Tile Layer" is used when you have a map made up of different zoom levels (usually 1 folder per zoom...
Read more >Use a local tile layer with leaflet
This project will run offline on a computer connected to nothing, so I need to have the tile layer stored on the same...
Read more >Local Tile Layer — ipyleaflet documentation
Custom tile layer using local tile files. Path to your local tiles. In the classic Jupyter Notebook, the path is relative to the...
Read more >Visualize Large Complex Data with Local Tile Layers in ...
Don't want to make the tiles available online for security reasons. Creating a local tile layer is not an easy task.
Read more >I'm new to this SDK and how do you read a tpk file...
If your TPK file is in the app's directory, however, it's pretty easy. ... layer from the local cache ArcGISTiledLayer localTileLayer = new ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can confirm it works in Jupyter Lab as you describe. Awesome!
This workaround should work for now, and then when a new release of ipyleaflet is out you will be able to get rid of your
CustomLocalLayer
class and directly use theLocalTileLayer
with the same arguments.