Offline Basemap Theme Drift

"/home/yossef/notes/git/projects/maplibra/risks/Offline Basemap Theme Drift.md"

path: maplibra/risks/Offline Basemap Theme Drift.md

- **fileName**: Offline Basemap Theme Drift
- **Created on**: 2026-06-16 00:48:42

Offline Basemap Theme Drift

Migrated from: obs_vault

Parent: ./Theme Risk Index.md

Severity: medium-high.

Summary

The app has both dynamic offline style generation and static offline JSON files. The static files can drift from the dynamic builder and can ignore runtime choices such as light theme, full/campus mode, or custom PMTiles URLs.

Code Evidence

Trigger Conditions

Likely Symptoms

Why It Matters

Static offline JSON is easy to forget. If it becomes a second source of truth, offline behavior can diverge from browser behavior and from tests that only cover the JS builder.

Current Tests

Missing Tests

How To Make Better

Debug Steps

  1. Compare resolveMapStyle('light') result on Android host to browser host.
  2. Inspect the active style source URL for campus.pmtiles vs full.pmtiles.
  3. Inspect active paint colors for land, park, water, and roads after theme switch.
  4. Compare static JSON with createOfflineBasemapStyle({ pmtilesUrl: '/assets/tiles/campus.pmtiles', isLight: false }).

See Also