mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 02:14:01 +00:00
31 lines
1.1 KiB
JavaScript
31 lines
1.1 KiB
JavaScript
import { createSurfaceServices } from '../app/surfaceServices.js';
|
|
import { createApplicationRequestServices } from '../services/requests.js';
|
|
import { createApplicationCatalog } from '../app/constructCatalog.js';
|
|
import { createStandaloneLayerSources } from './layerSources.js';
|
|
export { createStandaloneReferenceSources } from './layerSources.js';
|
|
|
|
/** Create fresh layer instances using the existing standalone source choices. */
|
|
export function createStandaloneCatalog({
|
|
signal = new AbortController().signal,
|
|
surface = createSurfaceServices({
|
|
terrainSource: createApplicationRequestServices().terrain,
|
|
signal,
|
|
}),
|
|
} = {}) {
|
|
return createApplicationCatalog({
|
|
surface,
|
|
sources: createStandaloneLayerSources(),
|
|
signal,
|
|
vesselOptions: {
|
|
maxRows: import.meta.env?.VITE_AIS_LIVE_MAX_ROWS,
|
|
maxLabels: import.meta.env?.VITE_AIS_LIVE_LABEL_MAX_ROWS,
|
|
},
|
|
});
|
|
}
|
|
|
|
// Direct compatibility callers share one catalog; application startup supplies its own.
|
|
let compatibilityCatalog;
|
|
export function getStandaloneCatalog() {
|
|
return (compatibilityCatalog ||= createStandaloneCatalog());
|
|
}
|