Align on-demand map context
GeoIntel CI / docs-smoke (push) Canceled after 0s
GeoIntel CI / contract-smoke (push) Canceled after 0s

This commit is contained in:
Codex
2026-07-17 21:45:57 +02:00
parent 8e38691251
commit 0718d0ebba
5 changed files with 41 additions and 13 deletions
@@ -543,6 +543,7 @@ interface MapWorkspaceProps {
selectedMapDatasetId: string
onSelectMapArea: (areaId: string) => void
onSetContextSourceLabel: (label: string | null) => void
onSetContextLayerLabel: (label: string | null) => void
onOpenDatasetInMap: (dataset: DatasetCreateResponse) => void
onSetAreaLayerVisible: (visible: boolean) => void
onSetAreaLayerOpacity: (opacity: number) => void
@@ -628,6 +629,7 @@ export function MapWorkspace({
selectedMapDatasetId,
onSelectMapArea,
onSetContextSourceLabel,
onSetContextLayerLabel,
onOpenDatasetInMap,
onSetAreaLayerVisible,
onSetAreaLayerOpacity,
@@ -1035,6 +1037,23 @@ export function MapWorkspace({
const activeResultDataset = activeThemeInsight?.dataset ?? activeThemeDataset
const activeSelectionResult = activeThemeInsight?.result
?? (!regionalPartitionedThemeActive && selectedMapDataset?.id === activeThemeDataset?.id ? mapSelectionResult : null)
useEffect(() => {
const contextLayerLabel = analysisMode === 'current' && activeOnDemandMapProduct
? activeSelectionResult
? `${(
activeSelectionResult.total_feature_count
?? activeSelectionResult.feature_count
).toLocaleString('nl-BE')} objecten gemeten`
: 'Op aanvraag'
: null
onSetContextLayerLabel(contextLayerLabel)
return () => onSetContextLayerLabel(null)
}, [
activeOnDemandMapProduct,
activeSelectionResult,
analysisMode,
onSetContextLayerLabel,
])
const explorerMapFeatureCollection = regionalBathymetryThemeActive
? null
: analysisMode === 'evolution' && temporalComparison?.geojson.features.length