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

+14 -4
View File
@@ -7,10 +7,11 @@ import { findPickOwner, resolvePickId } from './pickRegistry.js';
* layer, which record, and its display label.
*
* Two lanes, in order:
* 1. Context-store carriers. Entity-backed layers (infrastructure GeoJSON,
* selected vessels, fires, installations) write a `contextId` into the
* picked object's entity record, and the store record already carries the label and
* position voice uses everywhere else.
* 1. Context-store carriers. Entity-backed layers (selected vessels, fires,
* installations) write a `contextId` into the picked object's entity
* record, and layers drawing through the draw port (infrastructure
* GeoJSON) into a draw item's `meta`; the store record already carries
* the label and position voice uses everywhere else.
* 2. Pick owners. Primitive-backed layers (aircraft, satellites, vessels)
* register an ownership predicate in `pickRegistry`; the owning layer's
* `findByQuery` turns the pick id into a live descriptor.
@@ -46,12 +47,21 @@ export function pickedKindForLayer(layerId) {
return KIND_BY_LAYER[layerId] || 'feature';
}
/** A pick of a draw-set item (its id is `{set, id, meta}`): the item's `meta`. */
function drawItemMeta(picked) {
const id = picked?.id;
return id && typeof id.set === 'string' && typeof id.id === 'string'
? id.meta
: undefined;
}
function contextCarrierRecord(picked, dataManager) {
const store = getContextStore();
for (const carrier of [
picked?.id,
picked?.primitive?.id,
picked?.primitive,
drawItemMeta(picked),
]) {
const contextId = readEntityRecord(carrier)?.contextId;
if (!contextId) continue;