fix(korea): 작전가이드 선박 클릭 → 지도 이동 연결 (externalFlyTo prop)

This commit is contained in:
Nan Kyung Lee 2026-03-24 15:34:37 +09:00
부모 297d8aa56d
커밋 e4b6b1502b
2개의 변경된 파일12개의 추가작업 그리고 1개의 파일을 삭제

파일 보기

@ -686,6 +686,8 @@ function AuthenticatedApp({ user, onLogout }: AuthenticatedAppProps) {
dokdoWatchSuspects={koreaFiltersResult.dokdoWatchSuspects}
dokdoAlerts={koreaFiltersResult.dokdoAlerts}
vesselAnalysis={vesselAnalysis}
externalFlyTo={flyToTarget}
onExternalFlyToDone={() => setFlyToTarget(null)}
/>
<div className="map-overlay-left">
<LayerPanel

파일 보기

@ -60,6 +60,8 @@ interface Props {
dokdoWatchSuspects: Set<string>;
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<string, string> = {
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<MapRef>(null);
const [infra, setInfra] = useState<PowerFacility[]>([]);
@ -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]);