fix(geoportal): show UAT name in search results + fix map snap-back
Search results now JOIN GisUat to display UAT name prominently instead of just SIRUTA codes. Map flyTo uses imperative handle instead of stateful props that re-triggered on re-renders. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -845,12 +845,6 @@ export const MapViewer = forwardRef<MapViewerHandle, MapViewerProps>(
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [resolvedMartinUrl, basemap]);
|
||||
|
||||
/* ---- Sync center/zoom prop changes (from search flyTo) ---- */
|
||||
useEffect(() => {
|
||||
if (!mapReady || !mapRef.current || !center) return;
|
||||
mapRef.current.flyTo({ center, zoom: zoom ?? mapRef.current.getZoom(), duration: 1500 });
|
||||
}, [center, zoom, mapReady]);
|
||||
|
||||
/* ---- Disable interactions when in drawing modes ---- */
|
||||
useEffect(() => {
|
||||
const map = mapRef.current;
|
||||
|
||||
Reference in New Issue
Block a user