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:
Bilawal Sidhuandmanjunath22466 authored and GitHub committed 2026-09-22 20:34:11 -05:00
1 parent 25491f7e33
commit 082074a006
50 files changed
+13169 -440

No files matched your search

+29
View File
@@ -138,6 +138,35 @@ test('visual parameters, explicit empty layers, and panel state are v2-only', ()
assert.equal(legacy.panelState, null);
});
// The panel chrome shares every rail panel, so the link registry must know
// each one: a collapsed Recent Imagery panel used to restore expanded because
// the encoder had no token for it.
test('a collapsed Recent Imagery panel survives the share-link round trip beside the older panels', () => {
const manager = makeManager();
manager.setPanelStateProvider(() => ({ specs: [
{ id: 'cctv-panel', collapsed: false },
{ id: 'recent-imagery-panel', collapsed: true },
{ id: 'global-context-panel', collapsed: true },
] }));
clearTimeout(manager._debounceTimer);
manager._updateHash();
const params = new URLSearchParams(window.location.hash.slice(1));
assert.equal(params.get('ui'), 'v.c.0_i.c.1_g.c.1');
const restored = makeManager(`#v=2&lat=10&lon=20&ui=${params.get('ui')}`)
.parseInitialHash();
assert.deepEqual(restored.panelState, { specs: [
{ id: 'cctv-panel', collapsed: false, pinned: null },
{ id: 'recent-imagery-panel', collapsed: true, pinned: null },
{ id: 'global-context-panel', collapsed: true, pinned: null },
] });
// A link written before the token existed decodes exactly as it did.
const older = makeManager('#v=2&lat=10&lon=20&ui=v.c.1_g.c.0').parseInitialHash();
assert.deepEqual(older.panelState, { specs: [
{ id: 'cctv-panel', collapsed: true, pinned: null },
{ id: 'global-context-panel', collapsed: false, pinned: null },
] });
});
test('camera-only, partial, and malformed panel shares remain valid incoming state', () => {
const cameraOnly = makeManager('#lat=10&lon=20').parseInitialHash();
assert.ok(cameraOnly);