| map_manager | ||
| tests | ||
| .gitignore | ||
| debug_tool.py | ||
| engine.py | ||
| INTEGRATION.md | ||
| README.md | ||
| requirements.txt | ||
| visualizer.py | ||
python-map-manager (local copy)
Minimal local copy of the python-map-manager package for development and testing.
Usage:
- Install dependencies (recommended in a virtualenv):
python -m pip install -r requirements.txt
- Run the debug tool:
python debug_tool.py
This will try to download tiles from OpenStreetMap and show a small stitched image.
Progress callback
The library supports an optional progress callback that consumer applications can provide to receive per-tile progress updates while stitching. The callback signature is:
progress_callback(done: int, total: int, last_tile_duration: float, from_cache: bool, tile_coords: tuple)
done: number of tiles processed so fartotal: total number of tiles to processlast_tile_duration: seconds spent fetching/reading the last tilefrom_cache: True if the tile was already present in cache before retrievaltile_coords: a (z,x,y) tuple identifying the tile
The callback may be invoked from the thread that called into stitch_map_image,
so GUI applications should marshal updates onto their UI thread (for example
using root.after in Tkinter).