feat(train): a route's map kept offline on request (ADR 0030, D45)

A saved route's page has Keep the map offline: the tiles within 2 km of
its way at zooms 10 to 16 (never above the source's own), shared between
routes, kept again as the route changes and let go with it. The style,
its sprites and the instance's map source are kept as last read, and
every map reads a kept tile before the network, so a map draws with no
network at all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-29 10:28:36 +01:00
commit a2997e87af
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64
5 changed files with 1611 additions and 65 deletions

View file

@ -405,6 +405,14 @@
"routeAscent": "{metres} m bergauf",
"routeDescent": "{metres} m bergab",
"routeSummary": "{distance} · {ascent}",
"routeOffline": "Karte offline behalten",
"routeOfflineOff": "Die Karte entlang des Wegs, 2 km zu beiden Seiten, auf diesem Gerät für unterwegs ohne Netz",
"routeOfflineLoading": "Karte wird gespeichert: {done} von {total} Kacheln",
"routeOfflineKept": "Auf diesem Gerät: {size} MB",
"routeOfflineMissing": "{missing} von {total} Kacheln kamen nicht an: sie werden beim nächsten Öffnen mit Netz erneut geladen",
"routeOfflineNoMap": "Die Karte ist gerade nicht erreichbar: versuch es mit Netz noch einmal",
"routeOfflineSaveFirst": "Speichere die Route, um ihre Karte offline zu behalten",
"routeKeptOffline": "Karte offline gespeichert",
"routeSurfaces": "Untergrund",
"surfacePaved": "Befestigt",
"surfaceCompacted": "Verdichtet",

View file

@ -513,6 +513,18 @@
"@routeDescent": {"placeholders": {"metres": {"type": "int"}}},
"routeSummary": "{distance} · {ascent}",
"@routeSummary": {"description": "A route in the list: its distance and climb.", "placeholders": {"distance": {"type": "String", "example": "12.3 km"}, "ascent": {"type": "String", "example": "120 m up"}}},
"routeOffline": "Keep the map offline",
"@routeOffline": {"description": "A switch on a saved route: its map kept on this device (ADR 0030, D45)."},
"routeOfflineOff": "Its map along the way, 2 km either side, on this device for when there's no network",
"routeOfflineLoading": "Keeping the map: {done} of {total} tiles",
"@routeOfflineLoading": {"placeholders": {"done": {"type": "int"}, "total": {"type": "int"}}},
"routeOfflineKept": "Kept on this device: {size} MB",
"@routeOfflineKept": {"placeholders": {"size": {"type": "String", "example": "12.4"}}},
"routeOfflineMissing": "{missing} of {total} tiles didn't come: asked for again when the app next opens online",
"@routeOfflineMissing": {"placeholders": {"missing": {"type": "int"}, "total": {"type": "int"}}},
"routeOfflineNoMap": "The map can't be reached now: try again online",
"routeOfflineSaveFirst": "Save the route to keep its map offline",
"routeKeptOffline": "Map kept offline",
"routeSurfaces": "Surfaces",
"surfacePaved": "Paved",
"surfaceCompacted": "Compacted",

View file

@ -2452,6 +2452,54 @@ abstract class AppLocalizations {
/// **'{distance} · {ascent}'**
String routeSummary(String distance, String ascent);
/// A switch on a saved route: its map kept on this device (ADR 0030, D45).
///
/// In en, this message translates to:
/// **'Keep the map offline'**
String get routeOffline;
/// No description provided for @routeOfflineOff.
///
/// In en, this message translates to:
/// **'Its map along the way, 2 km either side, on this device for when there\'s no network'**
String get routeOfflineOff;
/// No description provided for @routeOfflineLoading.
///
/// In en, this message translates to:
/// **'Keeping the map: {done} of {total} tiles'**
String routeOfflineLoading(int done, int total);
/// No description provided for @routeOfflineKept.
///
/// In en, this message translates to:
/// **'Kept on this device: {size} MB'**
String routeOfflineKept(String size);
/// No description provided for @routeOfflineMissing.
///
/// In en, this message translates to:
/// **'{missing} of {total} tiles didn\'t come: asked for again when the app next opens online'**
String routeOfflineMissing(int missing, int total);
/// No description provided for @routeOfflineNoMap.
///
/// In en, this message translates to:
/// **'The map can\'t be reached now: try again online'**
String get routeOfflineNoMap;
/// No description provided for @routeOfflineSaveFirst.
///
/// In en, this message translates to:
/// **'Save the route to keep its map offline'**
String get routeOfflineSaveFirst;
/// No description provided for @routeKeptOffline.
///
/// In en, this message translates to:
/// **'Map kept offline'**
String get routeKeptOffline;
/// No description provided for @routeSurfaces.
///
/// In en, this message translates to:

View file

@ -1464,6 +1464,39 @@ class AppLocalizationsDe extends AppLocalizations {
return '$distance · $ascent';
}
@override
String get routeOffline => 'Karte offline behalten';
@override
String get routeOfflineOff =>
'Die Karte entlang des Wegs, 2 km zu beiden Seiten, auf diesem Gerät für unterwegs ohne Netz';
@override
String routeOfflineLoading(int done, int total) {
return 'Karte wird gespeichert: $done von $total Kacheln';
}
@override
String routeOfflineKept(String size) {
return 'Auf diesem Gerät: $size MB';
}
@override
String routeOfflineMissing(int missing, int total) {
return '$missing von $total Kacheln kamen nicht an: sie werden beim nächsten Öffnen mit Netz erneut geladen';
}
@override
String get routeOfflineNoMap =>
'Die Karte ist gerade nicht erreichbar: versuch es mit Netz noch einmal';
@override
String get routeOfflineSaveFirst =>
'Speichere die Route, um ihre Karte offline zu behalten';
@override
String get routeKeptOffline => 'Karte offline gespeichert';
@override
String get routeSurfaces => 'Untergrund';

View file

@ -1456,6 +1456,38 @@ class AppLocalizationsEn extends AppLocalizations {
return '$distance · $ascent';
}
@override
String get routeOffline => 'Keep the map offline';
@override
String get routeOfflineOff =>
'Its map along the way, 2 km either side, on this device for when there\'s no network';
@override
String routeOfflineLoading(int done, int total) {
return 'Keeping the map: $done of $total tiles';
}
@override
String routeOfflineKept(String size) {
return 'Kept on this device: $size MB';
}
@override
String routeOfflineMissing(int missing, int total) {
return '$missing of $total tiles didn\'t come: asked for again when the app next opens online';
}
@override
String get routeOfflineNoMap =>
'The map can\'t be reached now: try again online';
@override
String get routeOfflineSaveFirst => 'Save the route to keep its map offline';
@override
String get routeKeptOffline => 'Map kept offline';
@override
String get routeSurfaces => 'Surfaces';