Center map on selected work area
This commit is contained in:
@@ -38,6 +38,9 @@
|
||||
the workbench, so national Statbel 2025 population data is no longer
|
||||
mislabeled as a 2019 thematic raster. Selection-bounded SPW/UrbIS results
|
||||
remain available through the exact on-demand acquisition path.
|
||||
- Made a changed work area take viewport priority over a complete national
|
||||
layer, so switching between Belgium, Wallonia, Brussels and the North Sea
|
||||
visibly centers the map on the selected geography.
|
||||
|
||||
## Autonomous Belgium and North Sea RC program (2026-07-17)
|
||||
|
||||
|
||||
@@ -48,6 +48,8 @@ def test_map_rectangle_drag_is_wired_to_automatic_analysis() -> None:
|
||||
assert "resizeObserver.observe(containerRef.current)" in geomap
|
||||
assert "fitDataOnChangeRef.current" in geomap
|
||||
assert "map.fitBounds(bounds, { padding: 40, duration: 0 })" in geomap
|
||||
assert "const areaChanged = lastFittedAreaRef.current !== areaData" in geomap
|
||||
assert "areaChanged && areaData" in geomap
|
||||
assert "resizeObserver.disconnect()" in geomap
|
||||
assert ".workbench-main .geo-map-canvas .map-container" in styles
|
||||
assert "position: absolute;" in styles
|
||||
|
||||
@@ -44,6 +44,9 @@
|
||||
on-demand placeholders. National Statbel 2025 population is now presented
|
||||
as the active source, while selection-bounded PICC/UrbIS acquisitions remain
|
||||
available only through an exact bounded request.
|
||||
- Live browser verification found that a changed work area was fitted together
|
||||
with the complete active national layer. Area changes now fit the selected
|
||||
geography first; subsequent layer changes retain the existing fit behavior.
|
||||
- Focused backend and frontend suites passed before full release validation;
|
||||
full local and Tower evidence follows in the final P5 gate.
|
||||
|
||||
|
||||
@@ -500,8 +500,13 @@ function GeoMap({
|
||||
)
|
||||
}
|
||||
|
||||
const activeCollection = fitDataOnChange ? mergeFeatureCollections([areaData, data]) : areaData
|
||||
const shouldFitArea = fitDataOnChange || lastFittedAreaRef.current !== areaData
|
||||
const areaChanged = lastFittedAreaRef.current !== areaData
|
||||
const activeCollection = areaChanged && areaData
|
||||
? areaData
|
||||
: fitDataOnChange
|
||||
? mergeFeatureCollections([areaData, data])
|
||||
: areaData
|
||||
const shouldFitArea = fitDataOnChange || areaChanged
|
||||
if (activeCollection && shouldFitArea) {
|
||||
const bounds = collectCoordinates(activeCollection)
|
||||
if (bounds) {
|
||||
|
||||
Reference in New Issue
Block a user