Replace offline basemap pipeline with Planetiler, unify online/offline styling
Offline tiles were built from Protomaps' own basemap schema, needing a completely separate hand-tuned theme (protomaps-themes-base + OFFLINE_THEME) from the online Liberty style's ONLINE_STYLE_PATCH — the two could never be made to match exactly no matter how much either side got tuned (today's session found and fixed several mismatches: building opacity, park boundaries, road casings, road widths). Offline.pmtiles is now built with Planetiler's default OpenMapTiles profile against Geofabrik per-country OSM extracts (osmium-merged when more than one country is selected), the same vector schema Liberty already expects. offlineStyle() now clones the same Liberty JSON (vendored as a local snapshot for reliability with no internet) and applies the identical ONLINE_STYLE_PATCH, just repointed at local PMTiles/glyphs/sprite — one palette instead of two, correct on both sides by construction. Also vendors Liberty's icon sprite for the first time (offline had none before), adds Java/osmium-tool/planetiler.jar to the Docker image, and removes the now-unused protomaps-themes-base dependency and the theme-comparison debug page that found today's bugs.
This commit is contained in:
1 parent
0874e8f8ed
commit
d08ed41185
21 files changed
+4286
-512
No files matched your search
@@ -37,13 +37,13 @@ function flagIconUrl(code) {
|
||||
return `/vendor/flag-icons/1x1/${code.toLowerCase()}.svg`;
|
||||
}
|
||||
|
||||
// meta.source is a Protomaps build filename like "20260910.pmtiles" — the
|
||||
// leading 8 digits are its build date.
|
||||
// meta.sources is one entry per country the current build covers (see
|
||||
// lib/maptool/pmtiles_builder.rb) — listing the codes is more useful here
|
||||
// than a count, since they're exactly what RegionPicker's checklist above
|
||||
// already shows.
|
||||
function formatOfflineMeta(meta) {
|
||||
if (!meta) return "";
|
||||
const match = meta.source.match(/^(\d{4})(\d{2})(\d{2})/);
|
||||
const date = match ? `${match[1]}-${match[2]}-${match[3]}` : meta.source;
|
||||
return ` · Protomaps ${date}`;
|
||||
return ` · ${meta.sources.map((s) => s.code).join(", ")}`;
|
||||
}
|
||||
|
||||
function formatTerrainMeta(meta) {
|
||||
@@ -172,9 +172,9 @@ class DataFileRow {
|
||||
}
|
||||
|
||||
// Separate from _refreshStatus's own fetch (and only called once, right
|
||||
// after — not polled): this one reaches an external service (Protomaps'
|
||||
// build index or Mapterhorn's manifest, see
|
||||
// lib/maptool/pmtiles_builder.rb), so it's kept off the hot status path
|
||||
// after — not polled): this one reaches an external service (Geofabrik
|
||||
// or Mapterhorn's manifest, see lib/maptool/pmtiles_builder.rb), so it's
|
||||
// kept off the hot status path
|
||||
// and just silently skipped if it fails, same as everywhere else this
|
||||
// app degrades gracefully when an optional network check doesn't answer.
|
||||
async _checkUpdate() {
|
||||
|
||||
Reference in new issue
Block a user