mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 02:14:01 +00:00
fix(maps): retry the real imagery and terrain provider after a fallback
In the keyless setup a single transient failure while loading the default map layers locked in the degraded fallback until reload. _getImageryProvider cached the construction-fallback resolution (OSM) under the Esri stack id, so every later "Esri Satellite" selection showed OSM. createKeylessTerrain turns any Re:Earth failure into a flat EllipsoidTerrainProvider; the controller cached it and set _terrainMode to 'keyless', so a boot-time network blip left the globe flat. Fallbacks are still cached and shown at once, and no switch waits on a retry. One controller timer now retries the real provider behind whichever fallback is on screen (Esri's OSM stand-in, or flat terrain on a shown globe), starting at 30 seconds and doubling to a 10-minute cap while it keeps failing. A failed retry leaves the cached fallback and the installed terrain untouched. A success replaces the cache entry and applies it live: terrain is installed in place with a render request (or, behind a 3D tileset, picked up by the next globe activation), and Esri is reselected automatically, after any in-flight switch settles. A switch that read the flat fallback re-reads the terrain cache before installing, and destroy() cancels the timer and releases a provider built after it.
This commit is contained in:
1 parent
d4492d8f8c
commit
d6c1ea0f4b
6 files changed
+393
-13
No files matched your search
+1
-1
@@ -59,6 +59,6 @@ export async function createKeylessTerrain() {
|
||||
'[MapStack] Re:Earth terrain unavailable, falling back to flat ellipsoid terrain:',
|
||||
error,
|
||||
);
|
||||
return { provider: new Cesium.EllipsoidTerrainProvider() };
|
||||
return { provider: new Cesium.EllipsoidTerrainProvider(), fallback: true };
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user