mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 19:04:02 +00:00
refactor: construct application layers from supplied sources
This commit is contained in:
1 parent
cd704d0e9b
commit
8160ac5fe4
53 files changed
+1152
-400
No files matched your search
@@ -0,0 +1,45 @@
|
||||
import {
|
||||
createOpenSkySource,
|
||||
createAdsbLolSource,
|
||||
createAisStreamSource,
|
||||
} from '../sources/live/standalone.js';
|
||||
import { createCctvSource } from '../layers/cctv/source.js';
|
||||
import { createRadioSource } from '../layers/radio/source.js';
|
||||
import { createTrafficSource } from '../layers/traffic/source.js';
|
||||
import { createBikeshareSource } from '../layers/bikeshare/source.js';
|
||||
import { createInstallationSource } from '../layers/installations/index.js';
|
||||
import { createSatelliteSource } from '../layers/satellites/index.js';
|
||||
import { createLaunchSource } from '../layers/launches/index.js';
|
||||
import { createOverpassAlprSource } from '../layers/alpr/index.js';
|
||||
import { createFirmsSource } from '../layers/firms/index.js';
|
||||
import { createUsgsEarthquakeSource } from '../layers/earthquakes/source.js';
|
||||
import { createBundledCableSource } from '../layers/submarineCables/bundledSource.js';
|
||||
|
||||
/** Existing reference feeds, usable independently of live source selection. */
|
||||
export function createStandaloneReferenceSources() {
|
||||
return {
|
||||
earthquakes: createUsgsEarthquakeSource(),
|
||||
cables: createBundledCableSource(),
|
||||
};
|
||||
}
|
||||
|
||||
/** Select standalone providers without starting their acquisition. */
|
||||
export function createStandaloneLayerSources() {
|
||||
return {
|
||||
...createStandaloneReferenceSources(),
|
||||
flights: createOpenSkySource(),
|
||||
military: createAdsbLolSource(),
|
||||
vessels: createAisStreamSource({
|
||||
apiUrl: import.meta.env?.VITE_AIS_LIVE_API_URL || '/api/ais-live',
|
||||
}),
|
||||
cctv: createCctvSource(),
|
||||
radio: createRadioSource(),
|
||||
traffic: createTrafficSource(),
|
||||
bikeshare: createBikeshareSource(),
|
||||
installations: createInstallationSource(),
|
||||
satellites: createSatelliteSource(),
|
||||
launches: createLaunchSource(),
|
||||
alpr: createOverpassAlprSource(),
|
||||
firms: createFirmsSource(),
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user