Draw the local GeoJSON layers through the draw port and take them off the Cesium list

The data centre and dam layers (src/data/localGeojsonCore.js) no longer load
a Cesium GeoJSON data source. Each build is six draw sets: ground fills,
raised fills, draped lines, pins, stems and their tip dots. A walk changes
what moved or showed in place. Ground heights come from the heights query,
with the globe visibility getter deciding whether terrain is a floor. The
stems are sized from the camera pose, and clicks select and fly through the
input and camera ports. Point-and-ask reads a draw hit's meta as the
feature's context record (drawItemMeta in src/data/pickedContext.js).

The drawn parts keep the loader's ids and its reading of each feature:
simplestyle fill, stroke and marker colours, opacities, widths and marker
sizes; polygons with heights drawn at them and outlined; 3D points standing
their pin on the stem tip; ground edges along rhumb lines.

Differences: a marker-symbol draws the plain pin; named CSS colours fall
back to the layer colour; a raised polygon's outline is 1 px around its
outer ring only, and its fill is unlit; the layer no longer sets the
viewer's selectedEntity, so Cesium's stock double-click no longer follows
a feature; a caller's own Cesium viewer needs
gods-eye-view/render/cesium/unbound loaded first.
This commit is contained in:
Sameh Khamis committed 2026-11-07 21:49:15 -08:00
1 parent 333c9b39fe
commit b0ed9d7e90
14 files changed
+1547 -947

No files matched your search

+24
View File
@@ -64,6 +64,30 @@ test('an entity-backed feature resolves through the context store', () => {
});
});
test('a draw-set item resolves through the context record its meta carries', () => {
const carrier = { show: true };
registerEntityContext(carrier, {
id: 'local-datacenters:8',
layerId: 'local-datacenters',
label: 'Data Center 8',
latitude: 30.3,
longitude: -97.5,
});
// A Cesium pick of a draw-set item: its id is the item's pick id.
const picked = { id: { set: 'local-datacenters#1:fills', id: '8', meta: carrier }, primitive: {} };
assert.deepEqual(resolvePickedContext(picked, { dataManager: manager() }), {
layerId: 'local-datacenters',
id: 'local-datacenters:8',
label: 'Data Center 8',
kind: 'feature',
lat: 30.3,
lon: -97.5,
});
// Hidden, it is not what the user points at.
carrier.show = false;
assert.equal(resolvePickedContext(picked, { dataManager: manager() }), null);
});
test('disabled layers, trails and empty picks never resolve', () => {
registerPickOwner('military', (id) => id === 'm1');
assert.equal(resolvePickedContext({ id: 'm1' }, { dataManager: manager() }), null, 'military is disabled');