Serve local tiles with notebook
See original GitHub issueToday 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:
- Created 5 years ago
- Comments:8 (8 by maintainers)
Top 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 >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
I think it would make sense to add it to ipyleaflet, as a new layer
LocalTilesLayer
? Or as a helper functionget_local_tiles_url(tiles_path)
? I guess some people would be happy to have it in ipyleafletI 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.