맵 위젯 에러 해결
This commit is contained in:
parent
542f2ccc96
commit
fb9bc268a0
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue