mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-05 02:14:05 +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:
@@ -45,5 +45,6 @@ const map: TranslationStrings = {
|
||||
'map.webgl2.fallback': 'Trình duyệt này không hỗ trợ WebGL2 mà bản đồ GL cần, nên bản đồ được hiển thị bằng Leaflet.',
|
||||
'map.webgl2.terrain': 'Chế độ 3D cần WebGL2, nhưng trình duyệt này không hỗ trợ. Bản đồ vẫn ở dạng 2D.',
|
||||
'map.offlineBasemap': 'Bản đồ ngoại tuyến',
|
||||
'map.offlineShowStored': 'Hiện bản đồ ngoại tuyến',
|
||||
};
|
||||
export default map;
|
||||
|
||||
@@ -665,6 +665,9 @@ const settings: TranslationStrings = {
|
||||
'settings.apiKeys.modal.done': 'Xong',
|
||||
'settings.mcp.deprecated': 'Không còn được khuyến nghị',
|
||||
'settings.offline.cache.dateRange': '{start} đến {end}',
|
||||
'settings.offline.tileStore.title': 'Ô bản đồ đã xem',
|
||||
'settings.offline.tileStore.usage': '{used} trên {limit} trên thiết bị này, lưu tối đa 30 ngày',
|
||||
'settings.offline.tileStore.clear': 'Xóa',
|
||||
};
|
||||
|
||||
export default settings;
|
||||
|
||||
Reference in New Issue
Block a user