mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-23 21:33:19 +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:
@@ -46,5 +46,6 @@ const map: TranslationStrings = {
|
||||
'Aquest navegador no ofereix WebGL2, que necessiten els mapes GL, així que els mapes es mostren amb Leaflet.',
|
||||
'map.webgl2.terrain': 'El 3D necessita WebGL2, que aquest navegador no ofereix. El mapa es queda en 2D.',
|
||||
'map.offlineBasemap': 'Mapa fora de línia',
|
||||
'map.offlineShowStored': 'Mostra el mapa fora de línia',
|
||||
};
|
||||
export default map;
|
||||
|
||||
@@ -677,6 +677,9 @@ const settings: TranslationStrings = {
|
||||
'settings.apiKeys.modal.done': 'Fet',
|
||||
'settings.mcp.deprecated': 'Obsolet',
|
||||
'settings.offline.cache.dateRange': 'del {start} al {end}',
|
||||
'settings.offline.tileStore.title': 'Tessel·les de mapa vistes',
|
||||
'settings.offline.tileStore.usage': '{used} de {limit} en aquest dispositiu, es guarden fins a 30 dies',
|
||||
'settings.offline.tileStore.clear': 'Buida',
|
||||
};
|
||||
|
||||
export default settings;
|
||||
|
||||
Reference in New Issue
Block a user