{"id":23991,"library":"localtileserver","title":"localtileserver","description":"Locally serve geospatial raster tiles in the Slippy Map standard. Version 1.0.0, active development, monthly releases.","status":"active","version":"1.0.0","language":"python","source_language":"en","source_url":"https://github.com/giswqs/localtileserver","tags":["geospatial","tiles","raster","leaflet","ipyleaflet","slippy-map"],"install":[{"cmd":"pip install localtileserver","lang":"bash","label":"PyPI"}],"dependencies":[],"imports":[{"note":"Correct import path.","wrong":"","symbol":"TileClient","correct":"from localtileserver import TileClient"},{"note":"Wrong submodule; the function is re-exported at top level.","wrong":"from localtileserver.tileserver import get_leaflet_tile_layer","symbol":"get_leaflet_tile_layer","correct":"from localtileserver import get_leaflet_tile_layer"}],"quickstart":{"code":"from localtileserver import TileClient, get_leaflet_tile_layer\nfrom ipyleaflet import Map\n\nclient = TileClient('path/to/raster.tif')\ntile_layer = get_leaflet_tile_layer(client)\nm = Map(center=(40.7128, -74.0060), zoom=10)\nm.add_layer(tile_layer)\nm","lang":"python","description":"Serve a local GeoTIFF as slippy map tiles and display in a Jupyter notebook with ipyleaflet."},"warnings":[{"fix":"Use `port` parameter: `TileClient('file.tif', port=8080)`.","message":"The tile server runs in the background and uses a random port by default. If you have firewall or Docker issues, set the port explicitly with `TileClient('file.tif', port=5000)` to avoid conflicts.","severity":"gotcha","affected_versions":"all"},{"fix":"Use context manager: `with TileClient('file.tif') as client:` or call `client.close()` after use.","message":"TileClient's `__del__` method stops the server garbage collection may not run immediately in interactive sessions. Call `client.close()` explicitly to free the port, or use `with TileClient(...) as client:`.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install localtileserver` in the correct Python environment.","cause":"The package is not installed or installed in a different environment.","error":"ModuleNotFoundError: No module named 'localtileserver'"},{"fix":"Use `from localtileserver import get_leaflet_tile_layer`.","cause":"Trying to import a function that was renamed or moved. Prior to version 1.0.0, it was `get_leaflet_tile_layer`, now it's available at top level.","error":"ImportError: cannot import name 'get_leaflet_tile_layer' from 'localtileserver'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}