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
+4
-15
@@ -1,22 +1,11 @@
|
||||
import {
|
||||
createEarthquakesLayer as createLayer,
|
||||
createUsgsEarthquakeSource,
|
||||
} from '../layers/earthquakes/index.js';
|
||||
import {
|
||||
clearOverlaySource,
|
||||
setOverlayEntries,
|
||||
setOverlaySourceVisible,
|
||||
} from '../overlays/worldOverlay.js';
|
||||
import { createUsgsEarthquakeSource } from '../layers/earthquakes/index.js';
|
||||
import { createApplicationEarthquakes } from '../app/layers/earthquakes.js';
|
||||
export * from '../layers/earthquakes/index.js';
|
||||
/** Wire the standalone source and application overlay owner. */
|
||||
export function createEarthquakesLayer({
|
||||
source = createUsgsEarthquakeSource(),
|
||||
overlayHost = {
|
||||
setEntries: setOverlayEntries,
|
||||
setVisible: setOverlaySourceVisible,
|
||||
clearSource: clearOverlaySource,
|
||||
},
|
||||
...options
|
||||
} = {}) {
|
||||
return createLayer({ source, overlayHost });
|
||||
return createApplicationEarthquakes({ source, ...options });
|
||||
}
|
||||
export default createEarthquakesLayer();
|
||||
Reference in new issue
Block a user