From fb9bc268a0ecfc51a1f977c5a3254601c611bf4b Mon Sep 17 00:00:00 2001 From: dohyeons Date: Mon, 17 Nov 2025 15:09:50 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A7=B5=20=EC=9C=84=EC=A0=AF=20=EC=97=90?= =?UTF-8?q?=EB=9F=AC=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/components/dashboard/widgets/MapTestWidgetV2.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/components/dashboard/widgets/MapTestWidgetV2.tsx b/frontend/components/dashboard/widgets/MapTestWidgetV2.tsx index afe213e1..50f203d5 100644 --- a/frontend/components/dashboard/widgets/MapTestWidgetV2.tsx +++ b/frontend/components/dashboard/widgets/MapTestWidgetV2.tsx @@ -462,7 +462,7 @@ export default function MapTestWidgetV2({ element }: MapTestWidgetV2Props) { const regionName = row.name || row.area || row.region || row.location || row.subRegion; if (regionName && MARITIME_ZONES[regionName] && mapDisplayType !== "marker") { polygons.push({ - id: `${sourceName}-polygon-${index}`, // 고유 ID 생성 (위치 추적을 위해 고정) + id: `${sourceName}-polygon-${index}-${row.code || row.id || Date.now()}`, // 고유 ID 생성 name: regionName, coordinates: MARITIME_ZONES[regionName] as [number, number][], status: row.status || row.level, @@ -508,7 +508,7 @@ export default function MapTestWidgetV2({ element }: MapTestWidgetV2Props) { if (regionName) { // console.log(` 🔷 강제 폴리곤 모드: ${regionName} → 폴리곤으로 추가 (GeoJSON 매칭)`); polygons.push({ - id: `${sourceName}-polygon-${index}`, // 고유 ID 생성 (위치 추적을 위해 고정) + id: `${sourceName}-polygon-${index}-${row.code || row.id || Date.now()}`, // 고유 ID 생성 name: regionName, coordinates: [], // GeoJSON에서 좌표를 가져올 것 status: row.status || row.level, @@ -525,7 +525,7 @@ export default function MapTestWidgetV2({ element }: MapTestWidgetV2Props) { // 위도/경도가 있고 polygon 모드가 아니면 마커로 처리 if (lat !== undefined && lng !== undefined && (mapDisplayType as string) !== "polygon") { markers.push({ - id: `${sourceName}-marker-${index}`, // 고유 ID 생성 (위치 추적을 위해 고정) + id: `${sourceName}-marker-${index}-${row.code || row.id || Date.now()}`, // 고유 ID 생성 lat: Number(lat), lng: Number(lng), latitude: Number(lat), @@ -542,7 +542,7 @@ export default function MapTestWidgetV2({ element }: MapTestWidgetV2Props) { if (regionName) { // console.log(` 📍 위도/경도 없지만 지역명 있음: ${regionName} → 폴리곤으로 추가 (GeoJSON 매칭)`); polygons.push({ - id: `${sourceName}-polygon-${index}`, // 고유 ID 생성 (위치 추적을 위해 고정) + id: `${sourceName}-polygon-${index}-${row.code || row.id || Date.now()}`, // 고유 ID 생성 name: regionName, coordinates: [], // GeoJSON에서 좌표를 가져올 것 status: row.status || row.level,