Go to file
2025-12-02 09:09:22 +01:00
map_manager primo commit del modulo map_manager 2025-12-02 09:09:22 +01:00
tests primo commit del modulo map_manager 2025-12-02 09:09:22 +01:00
.gitignore primo commit del modulo map_manager 2025-12-02 09:09:22 +01:00
debug_tool.py primo commit del modulo map_manager 2025-12-02 09:09:22 +01:00
engine.py primo commit del modulo map_manager 2025-12-02 09:09:22 +01:00
INTEGRATION.md primo commit del modulo map_manager 2025-12-02 09:09:22 +01:00
README.md primo commit del modulo map_manager 2025-12-02 09:09:22 +01:00
requirements.txt primo commit del modulo map_manager 2025-12-02 09:09:22 +01:00
visualizer.py primo commit del modulo map_manager 2025-12-02 09:09:22 +01:00

python-map-manager (local copy)

Minimal local copy of the python-map-manager package for development and testing.

Usage:

  1. Install dependencies (recommended in a virtualenv):
python -m pip install -r requirements.txt
  1. 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 far
  • total: total number of tiles to process
  • last_tile_duration: seconds spent fetching/reading the last tile
  • from_cache: True if the tile was already present in cache before retrieval
  • tile_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).