mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-15 15:52:21 +00:00
Keep traffic vehicles and road flow across globe switches
This commit is contained in:
1 parent
4e09559337
commit
75df3389f3
20 files changed
+586
-109
No files matched your search
@@ -24,6 +24,7 @@ window.addEventListener('pagehide', (event) => {
|
||||
|
||||
async function start(next, engineSwitch = false, cockpit = null) {
|
||||
kind = next;
|
||||
layerSession.restoringView = engineSwitch;
|
||||
application = createStandaloneApplication({
|
||||
googleApiKey: import.meta.env.GOOGLE_MAPS_API_KEY,
|
||||
cesiumToken: import.meta.env.CESIUM_ION_TOKEN,
|
||||
@@ -37,6 +38,8 @@ async function start(next, engineSwitch = false, cockpit = null) {
|
||||
if (engineSwitch) {
|
||||
const style = controls.styleManager;
|
||||
await style.initialRestorePromise;
|
||||
layerSession.restoringView = false;
|
||||
for (const {module} of layerSession.manager.layers.values()) module.resumeViewport?.();
|
||||
if (layerSession.handoffLayers) layerSession.manager.layers.get('directions')?.module.resumeCamera?.();
|
||||
// Only resume the aircraft that actually survived the handoff. A history
|
||||
// entry may select a different subject, and a stale track may disappear.
|
||||
|
||||
Reference in new issue
Block a user