Outline a raised polygon's holes as well as its outer ring

The Cesium draw port drew an unclamped polygon's outline as one closed
polyline around its outer ring. Each ring now gets its own, with the same
width, colour and pick id, as the entity polygons the GeoJSON loader made
outlined their holes. The local GeoJSON layers and submarine cables draw
their raised polygons this way.
This commit is contained in:
Sameh Khamis committed 2026-11-07 23:47:04 -08:00
1 parent 85d4f4840c
commit 0584707436
2 files changed
+75 -10

No files matched your search

+12 -10
View File
@@ -2228,7 +2228,8 @@ export function createCesiumDraw({
extrudedHeight,
perPositionHeight: g.perPositionHeight,
}),
ring: outer,
// Its holes are outlined too, as the entities' polygons outline them.
rings: [outer, ...holes],
};
}
case 'ellipse': {
@@ -2662,15 +2663,16 @@ export function createCesiumDraw({
asynchronous: false,
}),
);
} else if (item.outline && shape.ring)
outlines.add({
positions: [...shape.ring, shape.ring[0]],
width: item.outlineWidth ?? 1,
material: Cesium.Material.fromType('Color', {
color: toColor(item.outline),
}),
id,
});
} else if (item.outline && shape.rings)
for (const ring of shape.rings)
outlines.add({
positions: [...ring, ring[0]],
width: item.outlineWidth ?? 1,
material: Cesium.Material.fromType('Color', {
color: toColor(item.outline),
}),
id,
});
}
host.add(outlines);
const ground = groundFills(record, clamped);