Karte: Auto-Retry nach 20s wenn 0 Marker — SW by-v407
Wenn der erste Scan 0 OSM-Marker liefert (Cache leer, Hintergrund-Fetch läuft), automatisch nach 20 Sekunden nochmal scannen. User muss die Karte nicht manuell verschieben um Marker zu sehen.
This commit is contained in:
parent
c96283fa87
commit
66af669653
3 changed files with 8 additions and 3 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
Router, State-Management, Navigation, Initialisierung.
|
Router, State-Management, Navigation, Initialisierung.
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
|
||||||
const APP_VER = '386'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
const APP_VER = '387'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||||
|
|
||||||
const App = (() => {
|
const App = (() => {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -697,12 +697,17 @@ window.Page_map = (() => {
|
||||||
await Promise.all(freshTasks);
|
await Promise.all(freshTasks);
|
||||||
_overpassActive = false;
|
_overpassActive = false;
|
||||||
|
|
||||||
// Hinweis wenn Marker vorhanden aber alle Layer deaktiviert
|
|
||||||
const totalLoaded = Object.values(_layers).flat().filter(m => !m._ownPlace).length;
|
const totalLoaded = Object.values(_layers).flat().filter(m => !m._ownPlace).length;
|
||||||
const allHidden = Object.keys(OSM_LAYER_MAP).every(k => _visible[k] === false);
|
const allHidden = Object.keys(OSM_LAYER_MAP).every(k => _visible[k] === false);
|
||||||
if (totalLoaded > 0 && allHidden) {
|
if (totalLoaded > 0 && allHidden) {
|
||||||
_setOsmStatus('Layer deaktiviert — Liste antippen', 100);
|
_setOsmStatus('Layer deaktiviert — Liste antippen', 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Wenn 0 OSM-Marker: Hintergrund-Fetch läuft noch — automatisch nochmal scannen
|
||||||
|
if (totalLoaded === 0 && zoom >= 14) {
|
||||||
|
_setOsmStatus('Lade…');
|
||||||
|
setTimeout(() => { if (!_overpassActive) _scheduleOsmLoad(); }, 20000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------
|
// ----------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
Offline-Cache + Push Notifications + Tile-Cache
|
Offline-Cache + Push Notifications + Tile-Cache
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
|
||||||
const CACHE_VERSION = 'by-v406';
|
const CACHE_VERSION = 'by-v407';
|
||||||
const CACHE_STATIC = `${CACHE_VERSION}-static`;
|
const CACHE_STATIC = `${CACHE_VERSION}-static`;
|
||||||
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
|
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue