Draw the air quality stations through the renderer's draw port

The station discs are now one draw set of ground-clamped filled ellipses per
layer, with the same band colours, alpha and radius, and their readings as
item meta; they had no visible outline before either (Cesium turns outlines
off on clamped entity ellipses). The readout's in-view list reads the view
rectangle through the camera port. The layer no longer imports Cesium and
leaves the allow-list; a caller handing it a Cesium viewer of their own,
with no renderer bound, loads the ./render/cesium/unbound export once first.

Double-clicking a station no longer starts the viewer's entity follow, since
draw items are not entities.
This commit is contained in:
Sameh Khamis committed 2026-11-07 01:50:52 -08:00
1 parent 03ff8f291f
commit 2061f5647c
9 files changed
+186 -82

No files matched your search

+4 -1
View File
@@ -6,6 +6,7 @@ import { setLocale } from '../i18n/index.js';
import { createWeatherPanel } from './weatherPanel.js';
import { railDocumentFixture as railFixture } from './railTestFixture.mjs';
import { createAirQualityLayer } from '../layers/airQuality/index.js';
import { bindFakeDraw } from '../testSupport/fakeDrawPort.mjs';
const ticks = ['2026-09-22T01:00:00Z', '2026-09-22T01:05:00Z'];
const wind = {
id: 'wind',
@@ -725,7 +726,9 @@ test('air-quality readout renders its band legend, Canada coverage and worst-fir
},
overlayHost: { setEntries() {}, setVisible() {}, clearSource() {} },
});
layer.init({ dataSources: { add() {}, remove() {} } });
const viewer = {};
bindFakeDraw(viewer);
layer.init(viewer);
layer.enable();
await layer.update();
const f = fixture();