Files
Oxicloud/static/basemaps/README.md
T
Claude bb3d73926a chore(places): vendor MapLibre GL JS + pmtiles.js for the photo map
Vendored for the self-hosted Places map (Approach A: client-side PMTiles
decoding, basemap served as a static file via the existing Range-capable
ServeDir):
- maplibre-gl 5.24.0 (BSD-3) + its CSS
- pmtiles 4.4.1

Also adds static/basemaps/ with a .gitignore (*.pmtiles is operator-provided,
never committed) and a README explaining how to drop in a basemap.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JW6ghFMDtnRYuYNzZhb47M
2026-06-19 11:10:58 +00:00

1.6 KiB
Raw Blame History

Places basemap (optional)

The Places photo map renders your geotagged photos as clusters. It works out of the box without a basemap (clusters on a plain background). To get a real street/terrain backdrop, drop a self-hosted vector basemap here — no third-party tile API, fully offline.

How it works (Approach "A")

OxiCloud already serves static/ through tower-http's ServeDir, which honours HTTP Range requests. A PMTiles basemap is a single file read directly by the browser via Range — so the basemap is just a static file the app already knows how to serve. No extra backend, no tile server, no API keys.

Enabling it

  1. Get a Protomaps .pmtiles basemap (vector, ODbL OpenStreetMap data):
    • Whole planet z0–15 (~120 GB) or a smaller global z0-6 (~60 MB), or
    • A regional extract (recommended — only the area you need, a few MB):
      # one-time, downloads only your bounding box from the remote planet
      pmtiles extract https://build.protomaps.com/<DATE>.pmtiles basemap.pmtiles \
        --bbox=<west>,<south>,<east>,<north>
      
      See https://docs.protomaps.com/basemaps/downloads
  2. Place it here as static/basemaps/basemap.pmtiles (this path is git-ignored on purpose — see .gitignore).
  3. Reload the Places view. The map will pick it up automatically.

The bundled style is label-light (water / land / roads / buildings, no text) so it needs no glyph/sprite assets. Attribution “© OpenStreetMap” (ODbL) is shown automatically when a basemap is present.