Offline regions for the whole world: the region list comes from Geofabrik's index (bin/geofabrik-regions-sync.mjs → geofabrik_regions.geojson, 193 countries plus subregions like the US states), keeping the European ISO codes; the picker folds it by continent with a search box and subregions under their country, flags for all of them
CI / check (push) Successful in 19s
CI / deploy (push) Successful in 17s

This commit is contained in:
randy committed 2026-11-19 10:03:47 +01:00
1 parent df69886220
commit ff5924faf1
155 files changed
+5465 -113

No files matched your search

+14 -6
View File
@@ -160,12 +160,20 @@ build.
A logged-in user can also generate both files above from the app
itself, no local tooling needed — the sidebar's "Offline data" icon
(Offline hub group) shows a checklist of European countries
(`lib/maptool/data/europe_countries.geojson`, Natural Earth 110m
admin-0, public domain) plus each file's status (size, last updated).
Ticking countries and clicking "Apply changes" saves the selection
(`data/offline_regions.json`, an array of ISO A2 codes) and rebuilds
both files to cover it.
(Offline hub group) shows a checklist of the whole world's countries,
folded by continent with a search box, a country's subregions (US
states, German Länder, ...) folded under it — selectable one by one, so
e.g. Utah alone doesn't mean downloading the 10+ GB United States
extract — plus each file's status (size, last updated). The list is
`lib/maptool/data/geofabrik_regions.geojson`, generated from Geofabrik's
own index (`download.geofabrik.de/index-v1.json`) by
`node bin/geofabrik-regions-sync.mjs` — rerun it to pick up Geofabrik
changes. Ticking regions and clicking "Apply changes" saves the selection
(`data/offline_regions.json`, an array of region codes: a country's ISO
3166-1 alpha-2, a subregion's ISO 3166-2 or `<country>-<geofabrik id>`)
and rebuilds both files to cover it. Picking a country *and* one of its
subregions just downloads the overlap twice; osmium's merge de-duplicates
it.
There's no standalone per-country *built* file — `offline.pmtiles`/
`terrain.pmtiles` are always one combined extract for the *whole