Connect live analysis journey to map workflow
This commit is contained in:
@@ -8,6 +8,7 @@ import { useTemporalComparison } from '../../hooks/useTemporalComparison'
|
||||
import { getDatasetDisplayName, getDatasetSourceDisplayName } from '../../lib/datasetDisplay'
|
||||
import { TemporalTrendChart } from './TemporalTrendChart'
|
||||
import { MunicipalitySearch } from './MunicipalitySearch'
|
||||
import { LiveAnalysisJourney } from './LiveAnalysisJourney'
|
||||
import { terrainImageUrl } from '../../lib/terrainImage'
|
||||
import { floodHazardImageUrl } from '../../lib/floodHazardImage'
|
||||
import { thematicRasterImageUrl, walousRasterImageUrl } from '../../lib/thematicRaster'
|
||||
@@ -1310,6 +1311,39 @@ export function MapWorkspace({
|
||||
: onDemandProductMap.get(activeTheme.id) ?? null
|
||||
const activeThemeMapStyle = DATA_THEME_MAP_STYLES[activeTheme.id]
|
||||
const analysisOverlayActive = mapContentMode === 'analysis' && analysisLayerAvailable && Boolean(mapFeatureCollection)
|
||||
const liveJourneyError = mapSelectionError
|
||||
?? themeResultsError
|
||||
?? temporalComparisonError
|
||||
?? orthophotoAnalysisError
|
||||
?? coverageError
|
||||
?? workspaceError
|
||||
const liveJourneyHasResult = Boolean(
|
||||
mapSelectionResult
|
||||
|| themeInsights.length > 0
|
||||
|| temporalComparison
|
||||
|| orthophotoResult
|
||||
|| analysisOverlayActive,
|
||||
)
|
||||
const liveJourneyVerified = Boolean(mapSelectionQaResult || orthophotoAnalysisQuality)
|
||||
const liveJourneyProcessing = Boolean(
|
||||
mapSelectionLoading
|
||||
|| themeResultsLoading
|
||||
|| temporalComparisonLoading
|
||||
|| orthophotoAnalysisRunning,
|
||||
)
|
||||
const liveJourneyValidating = Boolean(
|
||||
mapSelectionQaRunning || orthophotoAnalysisStage === 'validating',
|
||||
)
|
||||
const liveJourneyStatus = orthophotoAnalysisStatus
|
||||
|| (temporalComparisonLoading ? 'Officiële meetmomenten vergelijken…' : '')
|
||||
|| (themeResultsLoading ? 'Begrensde bronnen verwerken…' : '')
|
||||
|| (mapSelectionLoading ? 'Objecten binnen de selectie ophalen…' : '')
|
||||
|| (liveJourneyHasResult ? 'Resultaat op de kaart beschikbaar' : 'Klaar om de selectie te verwerken')
|
||||
const liveJourneyResultLabel = liveJourneyVerified
|
||||
? 'Kwaliteitsbewijs beschikbaar'
|
||||
: latestMapSelectionQualityCheckId
|
||||
? 'Bewaard kwaliteitsbewijs beschikbaar'
|
||||
: 'Controleerbaar resultaat'
|
||||
const selectedOrthophotoProduct = orthophotoProducts.find((item) => item.key === selectedOrthophotoProductKey) ?? null
|
||||
const orthophotoImageOverlay = useMemo(
|
||||
() => orthophotoResult && orthophotoImageUrl && orthophotoResult.bbox_epsg4326.length === 4
|
||||
@@ -2609,6 +2643,21 @@ export function MapWorkspace({
|
||||
onMapBboxSelect={handleMapBboxSelect}
|
||||
onViewportChange={onMapViewportChange}
|
||||
/>
|
||||
<LiveAnalysisJourney
|
||||
selectionMode={bboxSelectionMode}
|
||||
hasSelection={Boolean(mapSelectionBbox)}
|
||||
sourceLoading={workspaceLoading || coverageLoading || officialMapProductsLoading}
|
||||
sourceReady={activeThemeAvailable && !workspaceLoading && !coverageLoading}
|
||||
processing={liveJourneyProcessing}
|
||||
validating={liveJourneyValidating}
|
||||
hasResult={liveJourneyHasResult}
|
||||
verified={liveJourneyVerified}
|
||||
error={liveJourneyError}
|
||||
selectionLabel={mapSelectionBbox ? 'Begrensde kaartselectie' : selectedMapArea?.name ?? 'Nog geen gebied geselecteerd'}
|
||||
sourceLabel={activeThemeAvailable ? activeTheme.shortLabel : 'Dekking wordt gecontroleerd'}
|
||||
statusMessage={liveJourneyStatus}
|
||||
resultLabel={liveJourneyResultLabel}
|
||||
/>
|
||||
<div className="geo-map-legend" aria-label="Kaartlegende">
|
||||
<span><i className="geo-legend-area" /> Werkgebied</span>
|
||||
{thematicRasterImageOverlays.length > 0 || walousRasterImageOverlays.length > 0 ? (
|
||||
|
||||
Reference in New Issue
Block a user