mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
feat(layers): Recent Imagery — open satellite imagery for a selected box (#716)
Select a box on the world and browse the last 30 days of open satellite imagery over it, keyless: NASA GIBS Harmonized Landsat Sentinel-2 (30 m) and the VIIRS daily overview (250 m), with a day strip, IMAGE / VS BASEMAP / A / B modes with a swipe divider, PNG export and share links. The before/after swipe from the Nepal scene moves into shared modules so both use it. Co-authored-by: manjunath22466 <[email protected]>
This commit is contained in:
1 parent
25491f7e33
commit
082074a006
50 files changed
+13169
-440
No files matched your search
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Where draped imagery can go on the current map stack. A globe stack drapes
|
||||
* on `viewer.imageryLayers`; a 3D-tiles stack hides the globe, and Cesium
|
||||
* 1.138 drapes imagery onto the tileset's own `imageryLayers` instead. When
|
||||
* neither exists there is nowhere to drape and the caller says so.
|
||||
*/
|
||||
|
||||
/** Guidance shown when the active map stack cannot host draped imagery. */
|
||||
export const NO_IMAGERY_HOST = 'Hidden by this map source · choose a globe map';
|
||||
|
||||
/**
|
||||
* Resolve the imagery layer collection for the active map stack.
|
||||
* @param {{ viewer?: object, tileset?: object }} scene
|
||||
* @returns {{ collection: object | null, kind: 'globe' | 'tileset' | 'none' }}
|
||||
*/
|
||||
export function resolveImageryHost({ viewer, tileset } = {}) {
|
||||
if (viewer?.scene?.globe?.show === true && viewer.imageryLayers) {
|
||||
return { collection: viewer.imageryLayers, kind: 'globe' };
|
||||
}
|
||||
if (tileset?.imageryLayers && !tileset.isDestroyed?.()) {
|
||||
return { collection: tileset.imageryLayers, kind: 'tileset' };
|
||||
}
|
||||
return { collection: null, kind: 'none' };
|
||||
}
|
||||
Reference in new issue
Block a user