Offline-Karten Runde 2: adaptives Modell (Budget, Funkloch-Gedaechtnis, Korridor, Coverage)
Design Rene 2026-06-06: - Budget-Download: z14-Ringe um den Standort bis 5 MB gespeicherte Bytes (Stadt klein, Land gross — passend zur Funknetzdichte); client-seitig, Server-Region-Extract entfaellt - Funkloch-Gedaechtnis: Tile-Miss bei aktivem GPS-Recording -> Zone gemerkt (lokal, nie hochgeladen); Auto-Download offener Zonen sobald online - Routen-Korridor: 'Offline'-Button im Routen-Detail, Kacheln +-1km um den Track + Marker (Cap 50 MB) — fuer mehrtaegige Unternehmungen - Coverage-Layer: gespeicherte Bereiche als blauer Layer; Offline-Button oeffnet Verwaltungs-Modal (Stats, speichern, anzeigen, loeschen) - Flag-Logik zentral in boot.js BY.offlineTiles() (war 3x dupliziert) Bump v1226
This commit is contained in:
parent
45534aa8ee
commit
42a04ec405
12 changed files with 466 additions and 91 deletions
|
|
@ -24,13 +24,27 @@
|
|||
// MapLibre-GL-Karte (zentrale Karte) aus ?mapgl=1/0 — wird in pages/map.js _useGL() ausgewertet.
|
||||
var mg = new URLSearchParams(location.search).get('mapgl');
|
||||
if (mg !== null) localStorage.setItem('by_map_gl', mg === '0' ? '0' : '1');
|
||||
// Offline-Vektorkacheln (byt://) aus ?tilesoffline=1/0 — wird in map-gl-style.js
|
||||
// _offlineEnabled() ausgewertet (Staging-Default AN, localStorage übersteuert).
|
||||
// Offline-Vektorkacheln (byt://) aus ?tilesoffline=1/0 — ausgewertet via BY.offlineTiles().
|
||||
var to = new URLSearchParams(location.search).get('tilesoffline');
|
||||
if (to !== null) localStorage.setItem('by_offline_tiles', to === '0' ? '0' : '1');
|
||||
} catch (e) {}
|
||||
})();
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// Zentrale Feature-Flag-Helper (boot.js lädt vor allen Modulen)
|
||||
// ----------------------------------------------------------
|
||||
window.BY = window.BY || {};
|
||||
// Offline-Vektorkacheln (byt://): Staging-Default AN seit 2026-06-06, Production AUS
|
||||
// bis Freigabe; localStorage by_offline_tiles '1'/'0' bzw. ?tilesoffline übersteuert.
|
||||
window.BY.offlineTiles = function () {
|
||||
try {
|
||||
var flag = localStorage.getItem('by_offline_tiles');
|
||||
if (flag === '1') return true;
|
||||
if (flag === '0') return false;
|
||||
return location.hostname === 'staging.banyaro.app';
|
||||
} catch (e) { return false; }
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// Offline-Banner
|
||||
// ----------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue