mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Keep Contacts, active layer intents and mapped sites across globe switches
This commit is contained in:
1 parent
81bcae907f
commit
87bbe14748
35 files changed
+465
-118
No files matched your search
@@ -140,10 +140,12 @@ export function createApplicationCatalog({
|
||||
),
|
||||
);
|
||||
const installations = once(() =>
|
||||
createApplicationInstallations({
|
||||
surface,
|
||||
source: sources.installations,
|
||||
}),
|
||||
sessionModel('military-installations', () =>
|
||||
createApplicationInstallations({
|
||||
surface,
|
||||
source: sources.installations,
|
||||
}),
|
||||
),
|
||||
);
|
||||
const satellites = once(() =>
|
||||
createApplicationSatellites({
|
||||
@@ -261,13 +263,14 @@ export function createApplicationCatalog({
|
||||
['military-installations', installations],
|
||||
[
|
||||
'military-awareness',
|
||||
() =>
|
||||
() => sessionModel('military-awareness', () =>
|
||||
createApplicationAwareness({
|
||||
flights: flights(),
|
||||
military: military(),
|
||||
vessels: vessels(),
|
||||
installations: installations(),
|
||||
}),
|
||||
),
|
||||
],
|
||||
[
|
||||
'wind',
|
||||
|
||||
Vendored
+2
@@ -21,6 +21,7 @@ export function createApplicationControls({
|
||||
initialShareCode = null,
|
||||
localePicker = true,
|
||||
engineSwitch = false,
|
||||
layerSession,
|
||||
}) {
|
||||
// Initialize the style manager (post-processing, HUD, locations, share links)
|
||||
const styleManager = new Controls(viewer, {
|
||||
@@ -42,6 +43,7 @@ export function createApplicationControls({
|
||||
// A share code to open at start-up instead of the page's address.
|
||||
initialShareCode,
|
||||
engineSwitch,
|
||||
layerSession,
|
||||
localePicker,
|
||||
});
|
||||
defer(() => styleManager.orbitController.stop());
|
||||
|
||||
+3
-2
@@ -45,7 +45,7 @@ export function createApplicationData({
|
||||
onData?.(dataManager);
|
||||
if (!catalog?.layers || !catalog?.metadata)
|
||||
throw new TypeError('An application layer catalog is required');
|
||||
dataManager.bindCatalog(viewer, engine, catalog);
|
||||
const attached = dataManager.bindCatalog(viewer, engine, catalog);
|
||||
for (const layer of catalog.layers) layer.attachDataManager?.(dataManager);
|
||||
for (const layer of catalog.layers)
|
||||
layer.attachMapStackController?.(mapStackController);
|
||||
@@ -75,5 +75,6 @@ export function createApplicationData({
|
||||
// The sonar scene draws on the viewer; the Navara engine has none.
|
||||
if (viewer) defer(createCyberSonarScene(viewer, dataManager));
|
||||
|
||||
return { dataManager, catalog, presentation };
|
||||
const data = { dataManager, catalog, presentation };
|
||||
return attached ? attached.then(() => data) : data;
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
import { rendererFor } from './renderers.js';
|
||||
import { createAwarenessLayer } from '../../layers/awareness/index.js';
|
||||
import * as navigation from '../../navigationPolicy.js';
|
||||
import * as geometry from '../../celestialRing.js';
|
||||
@@ -17,6 +18,7 @@ export function createApplicationAwareness({
|
||||
installations,
|
||||
navigation,
|
||||
geometry,
|
||||
renderer: (engine) => rendererFor('military-awareness', engine),
|
||||
render,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -60,6 +60,7 @@ test('the Navara mode registers migrated renderers once', async () => {
|
||||
'recent-imagery',
|
||||
'ais-live-vessels',
|
||||
'military-installations',
|
||||
'military-awareness',
|
||||
'local-firms',
|
||||
],
|
||||
);
|
||||
|
||||
@@ -106,6 +106,8 @@ export async function registerNavaraLayerRenderers() {
|
||||
bikeshare: async () =>
|
||||
(await import('../layers/bikeshare/render/navara.js'))
|
||||
.createBikeshareNavaraRenderer,
|
||||
'military-awareness': async () =>
|
||||
(await import('../layers/awareness/render/navara.js')).createAwarenessNavaraRenderer,
|
||||
'military-installations': async () => {
|
||||
const { createInstallationsNavaraRenderer } =
|
||||
await import('../layers/installations/render/navara.js');
|
||||
|
||||
Reference in new issue
Block a user