From e4b6b1502bfe4e1c281cce3cf97027a846f12ea3 Mon Sep 17 00:00:00 2001 From: Nan Kyung Lee Date: Tue, 24 Mar 2026 15:34:37 +0900 Subject: [PATCH] =?UTF-8?q?fix(korea):=20=EC=9E=91=EC=A0=84=EA=B0=80?= =?UTF-8?q?=EC=9D=B4=EB=93=9C=20=EC=84=A0=EB=B0=95=20=ED=81=B4=EB=A6=AD=20?= =?UTF-8?q?=E2=86=92=20=EC=A7=80=EB=8F=84=20=EC=9D=B4=EB=8F=99=20=EC=97=B0?= =?UTF-8?q?=EA=B2=B0=20(externalFlyTo=20prop)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/App.tsx | 2 ++ frontend/src/components/korea/KoreaMap.tsx | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 6e14fc3..cf63c90 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -686,6 +686,8 @@ function AuthenticatedApp({ user, onLogout }: AuthenticatedAppProps) { dokdoWatchSuspects={koreaFiltersResult.dokdoWatchSuspects} dokdoAlerts={koreaFiltersResult.dokdoAlerts} vesselAnalysis={vesselAnalysis} + externalFlyTo={flyToTarget} + onExternalFlyToDone={() => setFlyToTarget(null)} />
; dokdoAlerts: { mmsi: string; name: string; dist: number; time: number }[]; vesselAnalysis?: UseVesselAnalysisResult; + externalFlyTo?: { lat: number; lng: number; zoom: number } | null; + onExternalFlyToDone?: () => void; } // MarineTraffic-style: satellite + dark ocean + nautical overlay @@ -132,7 +134,7 @@ const FILTER_I18N_KEY: Record = { ferryWatch: 'filters.ferryWatchMonitor', }; -export function KoreaMap({ ships, allShips, aircraft, satellites, layers, osintFeed, currentTime, koreaFilters, transshipSuspects, cableWatchSuspects, dokdoWatchSuspects, dokdoAlerts, vesselAnalysis }: Props) { +export function KoreaMap({ ships, allShips, aircraft, satellites, layers, osintFeed, currentTime, koreaFilters, transshipSuspects, cableWatchSuspects, dokdoWatchSuspects, dokdoAlerts, vesselAnalysis, externalFlyTo, onExternalFlyToDone }: Props) { const { t } = useTranslation(); const mapRef = useRef(null); const [infra, setInfra] = useState([]); @@ -156,6 +158,13 @@ export function KoreaMap({ ships, allShips, aircraft, satellites, layers, osintF } }, [flyToTarget]); + useEffect(() => { + if (externalFlyTo && mapRef.current) { + mapRef.current.flyTo({ center: [externalFlyTo.lng, externalFlyTo.lat], zoom: externalFlyTo.zoom, duration: 1500 }); + onExternalFlyToDone?.(); + } + }, [externalFlyTo, onExternalFlyToDone]); + useEffect(() => { if (!selectedAnalysisMmsi) setTrackCoords(null); }, [selectedAnalysisMmsi]);