From 1acbd76eb8dacb8e1519cf2a0ca48be8cfaacd00 Mon Sep 17 00:00:00 2001 From: dohyeons Date: Tue, 18 Nov 2025 17:46:32 +0900 Subject: [PATCH] =?UTF-8?q?=EC=95=84=EC=9D=B4=EC=BD=98=20=EC=A7=84?= =?UTF-8?q?=ED=96=89=EB=B0=A9=ED=96=A5=EC=97=90=20=EB=94=B0=EB=A5=B8=20?= =?UTF-8?q?=ED=9A=8C=EC=A0=84=20=EC=9E=AC=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dashboard/widgets/MapTestWidgetV2.tsx | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/frontend/components/dashboard/widgets/MapTestWidgetV2.tsx b/frontend/components/dashboard/widgets/MapTestWidgetV2.tsx index e23d32c1..694cba79 100644 --- a/frontend/components/dashboard/widgets/MapTestWidgetV2.tsx +++ b/frontend/components/dashboard/widgets/MapTestWidgetV2.tsx @@ -498,7 +498,10 @@ export default function MapTestWidgetV2({ element }: MapTestWidgetV2Props) { // 위도/경도가 있고 polygon 모드가 아니면 마커로 처리 if (lat !== undefined && lng !== undefined && (mapDisplayType as string) !== "polygon") { markers.push({ - id: `${sourceName}-marker-${index}-${row.code || row.id || Date.now()}`, // 고유 ID 생성 + // 진행 방향(heading) 계산을 위해 ID는 새로고침마다 바뀌지 않도록 고정값 사용 + // - row.id / row.code가 있으면 그 값을 사용 + // - 없으면 sourceName과 index 조합으로 고정 ID 생성 + id: row.id || row.code || `${sourceName}-marker-${index}`, lat: Number(lat), lng: Number(lng), latitude: Number(lat), @@ -987,7 +990,7 @@ export default function MapTestWidgetV2({ element }: MapTestWidgetV2Props) { markers.reduce((sum, m) => sum + m.lat, 0) / markers.length, markers.reduce((sum, m) => sum + m.lng, 0) / markers.length, ] - : [20, 0]; // 🌍 세계 지도 중심 (ISS 테스트용) + : [36.5, 127.5]; // 한국 중심 return (
@@ -1027,17 +1030,22 @@ export default function MapTestWidgetV2({ element }: MapTestWidgetV2Props) { - + {/* 폴리곤 렌더링 */} {/* GeoJSON 렌더링 (육지 지역 경계선) */}