mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Retain the TeleGeography dataset and render cables and landings on Navara
This commit is contained in:
1 parent
2b4955c817
commit
5cea3e8cbb
13 files changed
+593
-12
No files matched your search
@@ -315,7 +315,7 @@ export function createApplicationCatalog({
|
||||
],
|
||||
[
|
||||
'telegeography-submarine-cables',
|
||||
() => createApplicationCables({ source: sources.cables }),
|
||||
() => sessionModel('telegeography-submarine-cables', () => createApplicationCables({ source: sources.cables, session: true })),
|
||||
],
|
||||
[
|
||||
'local-firms',
|
||||
|
||||
@@ -1,13 +1,22 @@
|
||||
import * as Cesium from 'cesium';
|
||||
import { createSubmarineCableLayer } from '../../layers/submarineCables/index.js';
|
||||
import { createCableSessionLayer } from '../../layers/submarineCables/session.js';
|
||||
import { rendererFor } from './renderers.js';
|
||||
import { overlayHost } from './overlayHost.js';
|
||||
/** Wire cable source geometry to the application overlay host. */
|
||||
export function createApplicationCables(options) {
|
||||
return createSubmarineCableLayer({
|
||||
export function createApplicationCables({ session = false, ...options }) {
|
||||
const createCesium = (source) => createSubmarineCableLayer({
|
||||
overlayHost,
|
||||
screenSpaceEventHandlerFactory: (canvas) =>
|
||||
new Cesium.ScreenSpaceEventHandler(canvas),
|
||||
mapStackEventTarget: typeof window !== 'undefined' ? window : null,
|
||||
...options,
|
||||
source,
|
||||
});
|
||||
if (!session) return createCesium(options.source);
|
||||
return createCableSessionLayer({
|
||||
source: options.source,
|
||||
createCesium,
|
||||
createNavara: (engine) => rendererFor('telegeography-submarine-cables', engine, { overlayHost }),
|
||||
});
|
||||
}
|
||||
@@ -69,6 +69,7 @@ test('the Navara mode registers migrated renderers once', async () => {
|
||||
'weather-cyclones',
|
||||
'local-datacenters',
|
||||
'local-dams',
|
||||
'telegeography-submarine-cables',
|
||||
'local-firms',
|
||||
],
|
||||
);
|
||||
|
||||
@@ -59,6 +59,7 @@ const NAVARA_CREDIT_KEYS = new Set([
|
||||
'eccc-aqhi',
|
||||
'wfigs',
|
||||
's2-ghostmaps',
|
||||
'telegeography',
|
||||
'wind-gfs',
|
||||
'ecmwf-ifs',
|
||||
'weather-noaa',
|
||||
@@ -119,6 +120,10 @@ export async function registerNavaraLayerRenderers() {
|
||||
return (engine, options) => createWeatherNavaraRenderer(engine, navaraViews.get(engine), options);
|
||||
},
|
||||
])),
|
||||
'telegeography-submarine-cables': async () => {
|
||||
const { createNavaraCables } = await import('../layers/submarineCables/render/navara.js');
|
||||
return (engine, { overlayHost }) => createNavaraCables(engine, navaraViews.get(engine), overlayHost);
|
||||
},
|
||||
wind: async () => {
|
||||
const { createWindNavaraRenderer } = await import('../layers/wind/render/navara.js');
|
||||
return (engine) => createWindNavaraRenderer(engine, navaraViews.get(engine));
|
||||
|
||||
Reference in new issue
Block a user