From f6e666479988bb4385acc2fbdf21f890c5595278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?junh=5Feee=28=EC=9D=B4=EC=A4=80=ED=9D=AC=29?= Date: Wed, 13 Dec 2023 17:18:56 +0900 Subject: [PATCH] =?UTF-8?q?[=ED=97=88=EC=9A=A9=EA=B3=A0=EB=8F=84=20?= =?UTF-8?q?=EC=95=8C=EB=A6=BC=EC=A0=95=EB=B3=B4]=20=ED=86=A0=EA=B8=80=20->?= =?UTF-8?q?=20=EB=B2=84=ED=8A=BC=EA=B7=B8=EB=A3=B9=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/map/mapbox/MapBoxMap.js | 9 ++++++--- .../control/map/reducers/controlMapReducer.ts | 12 +++++++++--- src/views/control/setting/ControlSetting.js | 12 ++++++------ 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/src/components/map/mapbox/MapBoxMap.js b/src/components/map/mapbox/MapBoxMap.js index 5233d58..a2f1bc2 100644 --- a/src/components/map/mapbox/MapBoxMap.js +++ b/src/components/map/mapbox/MapBoxMap.js @@ -106,7 +106,8 @@ export default function MapBoxMap() { mapControl.area0004, mapControl.area0005, mapControl.area0006, - mapControl.liner + // mapControl.liner + mapControl.areaType ]); // 공역 생성 @@ -118,7 +119,8 @@ export default function MapBoxMap() { features: [...geoJson.features, ...flatGimpo.features] } ) => { - useGeoJson = mapControl.liner + // useGeoJson = mapControl.liner + useGeoJson = mapControl.areaType ? { ...geoJson, ...flatGimpo, @@ -144,7 +146,8 @@ export default function MapBoxMap() { linerAltitudeMarker.map(i => i.remove()); } - if (!mapControl.liner) { + // if (!mapControl.liner) { + if (mapControl.areaType === 'square') { if (gridCoords.length <= 0) { gimPoGrid.features.map(air => { gridCoords.push({ diff --git a/src/modules/control/map/reducers/controlMapReducer.ts b/src/modules/control/map/reducers/controlMapReducer.ts index b7af070..5452997 100644 --- a/src/modules/control/map/reducers/controlMapReducer.ts +++ b/src/modules/control/map/reducers/controlMapReducer.ts @@ -10,7 +10,8 @@ const initialState = { area0004: true, // 비행장(군사) area0005: true, // 이착륙장(RC비행장) area0006: true, // 초경량비행장치 - liner: true, + // liner: true, + areaType: 'linear', sensor: 'dust', isLaanc: false, drawType: null, @@ -62,10 +63,15 @@ const controlReducerReducer = (state = initialState, action) => { ...state, area0006: !state.area0006 }; - } else if (action.value === 'liner') { + } else if (action.value === 'square') { return { ...state, - liner: !state.liner + areaType: action.value + }; + } else if (action.value === 'linear') { + return { + ...state, + areaType: action.value }; } else { return { diff --git a/src/views/control/setting/ControlSetting.js b/src/views/control/setting/ControlSetting.js index 326ce22..e99c0e2 100644 --- a/src/views/control/setting/ControlSetting.js +++ b/src/views/control/setting/ControlSetting.js @@ -78,16 +78,16 @@ const ControlSetting = props => {