feat(native): an iOS map tile store, so viewed maps keep working offline

WKWebView runs no service worker for a self-hosted server, so on iOS nothing
kept a map tile once it scrolled away. Binaries with the tileCache feature
answer a trek-tile:// scheme from a store on disk: a tile viewed once is
served from there for up to 30 days (Mapbox's limit for a device cache,
applied to every provider), then fetched anew; the store keeps under 250 MB,
dropping the least recently used tiles first, sends a unique app User-Agent,
and never prefetches. Mapbox's own resources (style, tiles, glyphs, sprites)
and Leaflet's raster tiles go through it, telemetry never does.

Offline, a Mapbox map in such an app now stays Mapbox where it was viewed,
and the pill offers the stored trip region instead. The offline settings
show what the store takes against its limit, with a way to empty it.
This commit is contained in:
Maurice
2026-11-06 13:17:25 +01:00
parent d859e23879
commit dec6babe1d
69 changed files with 652 additions and 15 deletions
+1
View File
@@ -46,6 +46,7 @@ const map: TranslationStrings = {
'map.webgl2.fallback': 'הדפדפן הזה לא תומך ב-WebGL2, שמפות GL צריכות, ולכן המפות מוצגות עם Leaflet.',
'map.webgl2.terrain': 'תלת-ממד דורש WebGL2, והדפדפן הזה לא תומך בו. המפה נשארת בדו-ממד.',
'map.offlineBasemap': 'מפה לא מקוונת',
'map.offlineShowStored': 'הצגת מפה לא מקוונת',
};
export default map;
+3
View File
@@ -644,6 +644,9 @@ const settings: TranslationStrings = {
'settings.apiKeys.modal.done': 'סיום',
'settings.mcp.deprecated': 'מיושן',
'settings.offline.cache.dateRange': '{start} עד {end}',
'settings.offline.tileStore.title': 'אריחי מפה שנצפו',
'settings.offline.tileStore.usage': '{used} מתוך {limit} במכשיר הזה, נשמרים עד 30 יום',
'settings.offline.tileStore.clear': 'ניקוי',
};
export default settings;