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.

Serve local tiles with notebook

See original GitHub issue

Today it is not possible to set a path to local tiles, with something like:

l = {'url': 'file:///home/user/path/to/tiles/{z}/{x}/{y}.png'}
m.add_layer(l)

Instead, the directory of the tiles has to be served with e.g.:

python -m http.server --bind 127.0.0.1

And the URL has to be set to http://127.0.0.1:8000/{z}/{x}/{y}.png. Could it be done transparently with the notebook server?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
martinRenoucommented, Jan 7, 2019

I think it would make sense to add it to ipyleaflet, as a new layer LocalTilesLayer? Or as a helper function get_local_tiles_url(tiles_path)? I guess some people would be happy to have it in ipyleaflet

0reactions
martinRenoucommented, Jan 28, 2019

I opened a PR. I didn’t use your workaround, the reason is that if you are running multiple servers you can’t know which one you are currently using, I guess it could be an issue. So I retrieve the URL on the Javascript side.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Host Your Own Offline Mapping Server with Jupyter Notebook
A Step-by-Step Guide on deploying a basemap server on your local server — The entire project can be found at my GitHub ...
Read more >
Visualize Raster Tiles Locally using localtileserver 0.4.1 and ...
Testing Jupyter Notebook with Tile Visualization using localtileserver: import localtileserver ... First, create a tile server from local raster file
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 >
localtileserver - PyPI
Locally serve geospatial raster tiles in the Slippy Map standard. ... imagery to a viewer (see ipyleaflet and folium Jupyter notebook examples below)....
Read more >
32 local tile - leafmap
32 local tile. image. Using local raster datasets or remote Cloud Optimized GeoTIFFs (COG) with leafmap. Uncomment the following line to install leafmap...
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