wrolpi/modules/map/schema.py
lrnselfreliance adb0adbd94
The map draws any PMTiles file as an overlay, in any sub-directory (#962)
Any PMTiles file under the map directory, at any depth, can be shown.  The API reads each file's header and metadata and says what it is (basemap, terrain, overlay, unreadable).  Overlays are offered in the layer control under the name the file gives itself, hidden until turned on, with a checkbox per vector layer, and are drawn generically.

Map files are named by their path within the map directory everywhere, and unfinished downloads are no longer listed.  A file can be ignored from the Manage page; ignored files are kept in a new maps.yaml config.

PMTiles metadata is not decompressed past its size limit, and the standalone viewer encodes map file paths.
2026-11-13 15:11:01 -07:00

27 lines
368 B
Python

from dataclasses import dataclass
@dataclass
class MapSubscribeRequest:
name: str
region: str
@dataclass
class MapFileVisibleRequest:
map_path: str
visible: bool
@dataclass
class MapPinRequest:
lat: float
lon: float
label: str
color: str = "red"
@dataclass
class MapPinUpdateRequest:
label: str = None
color: str = None