mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-01 20:36:21 -05:00
Key changes:
- Add MapLibre GL JS viewer with light/dark themes, terrain layer, and embedded static map page for coordinate sharing - Add map pin support with persistent map_pins.yaml config - Add map region subscriptions and downloader with progress tracking, sourcing pre-extracted PMTiles from a cold CDN - Add map export to PNG and GPS coordinate copy via context menu - Add MapViewer React component alongside reworked Map page - Add map catalog and region-building script (build_map_regions.py) - Remove OSM import/render scripts, leaflet files, Apache configs, renderd service, and osm-map-dumper Docker container - Update Caddyfile to serve PMTiles and map static assets - Update build/install/repair scripts for Protomaps dependencies - Drop map_file table, add/drop map_subscription table (alembic) - Adding button to skip primary drive mounting during onboarding.
This commit is contained in:
parent
0a5fe7eebe
commit
b8a532c8d9
102 changed files with 5033 additions and 2712 deletions
|
|
@ -1,28 +1,2 @@
|
|||
from sqlalchemy import Column, Integer, Boolean, BigInteger
|
||||
|
||||
from modules.map import lib
|
||||
from wrolpi import dates
|
||||
from wrolpi.common import Base, ModelHelper
|
||||
from wrolpi.media_path import MediaPathType
|
||||
|
||||
|
||||
class MapFile(Base, ModelHelper):
|
||||
__tablename__ = 'map_file'
|
||||
id = Column(Integer, primary_key=True)
|
||||
|
||||
path = Column(MediaPathType, nullable=False)
|
||||
imported = Column(Boolean, default=False)
|
||||
size = Column(BigInteger)
|
||||
|
||||
def __repr__(self):
|
||||
return f'<MapFile {self.path} imported={self.imported}>'
|
||||
|
||||
def __json__(self) -> dict:
|
||||
return dict(
|
||||
id=self.id,
|
||||
imported=self.imported,
|
||||
path=self.path,
|
||||
seconds_to_import=(seconds := lib.seconds_to_import(self.size)),
|
||||
size=self.size,
|
||||
time_to_import=dates.seconds_to_timestamp(seconds),
|
||||
)
|
||||
# MapSubscription model has been removed.
|
||||
# Map subscriptions are managed via settings.regions on a single Download record.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue