mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-22 13:10:29 +00:00
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:
@@ -44,5 +44,6 @@ const map: TranslationStrings = {
|
||||
'このブラウザーは GL マップに必要な WebGL2 に対応していないため、地図は Leaflet で表示されます。',
|
||||
'map.webgl2.terrain': '3D には WebGL2 が必要ですが、このブラウザーは対応していません。地図は 2D のままです。',
|
||||
'map.offlineBasemap': 'オフライン地図',
|
||||
'map.offlineShowStored': 'オフライン地図を表示',
|
||||
};
|
||||
export default map;
|
||||
|
||||
@@ -636,6 +636,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': 'この端末で {limit} 中 {used}、最長30日間保存',
|
||||
'settings.offline.tileStore.clear': '消去',
|
||||
};
|
||||
|
||||
export default settings;
|
||||
|
||||
Reference in New Issue
Block a user