fix: render complex core above corner fills

This commit is contained in:
que01 committed 2026-09-11 13:20:19 +08:00
1 parent df39237829
commit f356e8e99c
1 file changed
+4 -2
+4 -2
View File
@@ -567,8 +567,9 @@ function buildComplexJunctionGeometry(model, cluster, helpers) {
const coreClosure = buildCoreClosure(topology, boundaryGraph, center);
const coreRing = coreClosure.status === 'supported' ? coreClosure.ring : null;
const features = [];
let coreFeature = null;
if (coreRing)
features.push({
coreFeature = {
type: 'Feature',
properties: {
native_id: `complex-junction:${cluster.id}:core`,
@@ -598,7 +599,7 @@ function buildComplexJunctionGeometry(model, cluster, helpers) {
provenance: 'native-road-complex-junction/v7-shared-entry-core',
},
geometry: { type: 'Polygon', coordinates: [coreRing, ...(coreClosure.holes || [])] },
});
};
if (coreRing && coreClosure.maxSharedSeamErrorMeters > 0.01) {
cornerDiagnostics.push(
helpers.diagnostic(
@@ -656,6 +657,7 @@ function buildComplexJunctionGeometry(model, cluster, helpers) {
// Corner fills come last so they overlay the rectangular carriageway ends
// they are smoothing; they never replace an OSM-derived road surface.
features.push(...cornerFills);
if (coreFeature) features.push(coreFeature);
// `coreRadiusMeters` is only consulted when there is no reference geometry.
// Under calibration the radius comes from the reference span, so a configured
// value that silently does nothing has to be reported, not swallowed.