fix: localize primary map delivery status
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
- Added a provenance-gated full-Area query path for official pre-clipped datasets, avoiding redundant intersection of every feature against the same detailed municipal/regional boundary while preserving exact rectangle selection behavior.
|
- Added a provenance-gated full-Area query path for official pre-clipped datasets, avoiding redundant intersection of every feature against the same detailed municipal/regional boundary while preserving exact rectangle selection behavior.
|
||||||
- Reduced a live complete-Kempen population/forest analysis from roughly 92 seconds to 2.8 seconds of API work while retaining the exact official totals.
|
- Reduced a live complete-Kempen population/forest analysis from roughly 92 seconds to 2.8 seconds of API work while retaining the exact official totals.
|
||||||
- Grouped dated population and forest snapshots into one current source plus an optional historical disclosure, translated remaining user-facing status/download/model-evaluation text and made municipality selection explicitly optional.
|
- Grouped dated population and forest snapshots into one current source plus an optional historical disclosure, translated remaining user-facing status/download/model-evaluation text and made municipality selection explicitly optional.
|
||||||
|
- Replaced the last primary-map `features`/`PostGIS` delivery message with a plain Dutch zoom instruction and user-facing object counts.
|
||||||
- Added focused scope filtering, command construction, boundary resolution, multi-NIS provenance, full-Area correctness, temporal-language and frontend-label tests; the full readiness gate now passes with 571 tests.
|
- Added focused scope filtering, command construction, boundary resolution, multi-NIS provenance, full-Area correctness, temporal-language and frontend-label tests; the full readiness gate now passes with 571 tests.
|
||||||
|
|
||||||
## Sprint 193 End-user regional workbench simplification (2026-07-14)
|
## Sprint 193 End-user regional workbench simplification (2026-07-14)
|
||||||
|
|||||||
@@ -44,5 +44,5 @@ def test_map_reports_viewport_and_does_not_refit_each_slice() -> None:
|
|||||||
assert "map.on('moveend', emitViewport)" in geo_map
|
assert "map.on('moveend', emitViewport)" in geo_map
|
||||||
assert "fitDataOnChange" in geo_map
|
assert "fitDataOnChange" in geo_map
|
||||||
assert "onViewportChange" in geo_map
|
assert "onViewportChange" in geo_map
|
||||||
assert "Zoom in to level" in (ROOT / "frontend" / "src" / "hooks" / "useViewportVectorLayer.ts").read_text(encoding="utf-8")
|
assert "Zoom verder in" in (ROOT / "frontend" / "src" / "hooks" / "useViewportVectorLayer.ts").read_text(encoding="utf-8")
|
||||||
assert "viewport-vector-status" in workspace
|
assert "viewport-vector-status" in workspace
|
||||||
|
|||||||
@@ -668,7 +668,7 @@ function App(): JSX.Element {
|
|||||||
const areaContextLabel = selectedArea?.name ?? (areas.length > 0 ? 'Kies een gebied' : 'Geen gebied')
|
const areaContextLabel = selectedArea?.name ?? (areas.length > 0 ? 'Kies een gebied' : 'Geen gebied')
|
||||||
const datasetContextLabel = selectedDataset ? getDatasetDisplayName(selectedDataset) : datasets.length > 0 ? 'Kies een bron' : 'Geen bron'
|
const datasetContextLabel = selectedDataset ? getDatasetDisplayName(selectedDataset) : datasets.length > 0 ? 'Kies een bron' : 'Geen bron'
|
||||||
const layerContextLabel = mapFeatureCollection
|
const layerContextLabel = mapFeatureCollection
|
||||||
? `${mapFeatureCount} features`
|
? `${mapFeatureCount.toLocaleString('nl-BE')} objecten`
|
||||||
: viewportVectorLayerActive
|
: viewportVectorLayerActive
|
||||||
? 'Kaartlaag gekozen'
|
? 'Kaartlaag gekozen'
|
||||||
: 'Geen actieve laag'
|
: 'Geen actieve laag'
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import {
|
|||||||
VECTOR_VIEWPORT_MIN_ZOOM,
|
VECTOR_VIEWPORT_MIN_ZOOM,
|
||||||
} from '../config/vectorDelivery'
|
} from '../config/vectorDelivery'
|
||||||
import { formatError } from '../lib/formatError'
|
import { formatError } from '../lib/formatError'
|
||||||
|
import { getDatasetDisplayName } from '../lib/datasetDisplay'
|
||||||
import { datasetsApi } from '../services/api/datasets'
|
import { datasetsApi } from '../services/api/datasets'
|
||||||
import type { DatasetCreateResponse, MapViewportState } from '../types'
|
import type { DatasetCreateResponse, MapViewportState } from '../types'
|
||||||
|
|
||||||
@@ -38,7 +39,7 @@ export function useViewportVectorLayer({
|
|||||||
)
|
)
|
||||||
const zoom = viewport?.zoom ?? null
|
const zoom = viewport?.zoom ?? null
|
||||||
const zoomRequired = enabled && (zoom === null || zoom < VECTOR_VIEWPORT_MIN_ZOOM)
|
const zoomRequired = enabled && (zoom === null || zoom < VECTOR_VIEWPORT_MIN_ZOOM)
|
||||||
const layerLabel = selectedDataset?.reference_layer_name?.trim() || 'features'
|
const layerLabel = selectedDataset ? getDatasetDisplayName(selectedDataset) : 'de kaartlaag'
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
requestSequence.current += 1
|
requestSequence.current += 1
|
||||||
@@ -86,7 +87,7 @@ export function useViewportVectorLayer({
|
|||||||
setData(null)
|
setData(null)
|
||||||
setLoadedFeatureCount(0)
|
setLoadedFeatureCount(0)
|
||||||
setTruncated(false)
|
setTruncated(false)
|
||||||
setError(formatError(requestError, 'Unable to load visible vector features'))
|
setError(formatError(requestError, 'De zichtbare kaartobjecten konden niet worden geladen'))
|
||||||
} finally {
|
} finally {
|
||||||
if (requestSequence.current === sequence) {
|
if (requestSequence.current === sequence) {
|
||||||
setLoading(false)
|
setLoading(false)
|
||||||
@@ -104,18 +105,18 @@ export function useViewportVectorLayer({
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
if (zoomRequired) {
|
if (zoomRequired) {
|
||||||
return `Zoom in to level ${VECTOR_VIEWPORT_MIN_ZOOM} to load ${layerLabel} from PostGIS.`
|
return `Zoom verder in (tot niveau ${VECTOR_VIEWPORT_MIN_ZOOM}) om ${layerLabel} op de kaart te tonen.`
|
||||||
}
|
}
|
||||||
if (loading) {
|
if (loading) {
|
||||||
return 'Loading visible features from PostGIS...'
|
return 'Zichtbare kaartobjecten laden...'
|
||||||
}
|
}
|
||||||
if (error) {
|
if (error) {
|
||||||
return error
|
return error
|
||||||
}
|
}
|
||||||
if (truncated) {
|
if (truncated) {
|
||||||
return `${loadedFeatureCount.toLocaleString()} visible features loaded; zoom in further because this view exceeds the ${VECTOR_VIEWPORT_FEATURE_LIMIT.toLocaleString()} feature limit.`
|
return `${loadedFeatureCount.toLocaleString('nl-BE')} kaartobjecten getoond. Zoom verder in om meer detail te zien.`
|
||||||
}
|
}
|
||||||
return `${loadedFeatureCount.toLocaleString()} visible of ${(featureCount ?? 0).toLocaleString()} total features loaded from PostGIS.`
|
return `${loadedFeatureCount.toLocaleString('nl-BE')} van ${(featureCount ?? 0).toLocaleString('nl-BE')} kaartobjecten zichtbaar.`
|
||||||
}, [enabled, error, featureCount, layerLabel, loadedFeatureCount, loading, truncated, zoomRequired])
|
}, [enabled, error, featureCount, layerLabel, loadedFeatureCount, loading, truncated, zoomRequired])
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user