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 렌더링 (육지 지역 경계선) */}