diff --git a/src/components/laanc/map/FlightArea.js b/src/components/laanc/map/FlightArea.js index 1325a5f..98e957e 100644 --- a/src/components/laanc/map/FlightArea.js +++ b/src/components/laanc/map/FlightArea.js @@ -27,7 +27,6 @@ import { handlerCreatePoint, handlerFitBounds, handlerGetCircleCoord, - handlerRemoveAllMarker, layerBuffer, layerPolygon, layerPolyline, @@ -36,13 +35,11 @@ import { import flatGimpo from '../../map/geojson/flatGimpoAirportAirArea.json'; import gimpo from '../../map/geojson/gimpoAirportAirArea.json'; import geoJson from '../../map/geojson/airArea.json'; -import axios from '../../../modules/utils/customAxiosUtil'; import { FeatureAirZone } from '../../map/mapbox/feature/FeatureAirZone'; import { WeatherContainer } from '../../../containers/basis/flight/plan/WeatherContainer'; import { initFlightBas } from '../../../modules/laanc/models/laancModels'; import * as LaancAction from '../../../modules/laanc/actions/laancActions'; import LaancDrawModal from './LaancDrawModal'; -import { handlerRemoveGroupMarker } from '../../../utility/DrawUtil'; const initialAddData = { isAddable: false, @@ -86,8 +83,6 @@ export default function FlightArea({ const [saveData, setSaveData] = useState(); const [saveElev, setSaveElev] = useState(); - // const [isDrawDone, setIsDrawDone] = useState(false); - //날씨 임시 데이터 const [wheather, setWheather] = useState([]); @@ -183,15 +178,6 @@ export default function FlightArea({ }; const handlerDrawType = val => { - // if (drawObj.getMode().includes('draw')) { - // const isEmpty = drawObj - // .getAll() - // .features.filter(o => !o.properties.id && o.properties.id !== 'BUFFER'); - // drawObj.delete(isEmpty[0].id); - // handlerRemoveGroupMarker(isEmpty[0].id); - // } - // dispatch(drawTypeChangeAction(val)); - if (drawObj.getMode().includes('draw')) { setModal({ title: '비행 구역 설정', @@ -265,6 +251,8 @@ export default function FlightArea({ 'all', ['==', '$type', 'LineString'], ['!=', 'mode', 'static'] + // ['==', 'meta', 'feature'], + // ['==', 'active', 'false'] ], layout: { 'line-cap': 'round', @@ -276,6 +264,26 @@ export default function FlightArea({ 'line-width': 2 } }, + // direct line stroke + // { + // id: 'gl-draw-line-active', + // type: 'line', + // filter: [ + // 'all', + // ['==', '$type', 'LineString'], + // ['==', 'meta', 'feature'], + // ['==', 'active', 'true'] + // ], + // layout: { + // 'line-cap': 'round', + // 'line-join': 'round' + // }, + // paint: { + // 'line-color': '#000000', + // 'line-dasharray': [0.2, 2], + // 'line-width': 2 + // } + // }, // polygon fill { id: 'gl-draw-polygon-fill', @@ -580,7 +588,10 @@ export default function FlightArea({ {page === 1 ? ( setCenteredModal(!centeredModal)} + toggle={() => { + setCenteredModal(!centeredModal); + dispatch(AREA_COORDINATE_LIST_SAVE(saveData)); + }} className='modal-dialog-centered modal-xl' > diff --git a/src/components/laanc/map/LaancAreaMap.js b/src/components/laanc/map/LaancAreaMap.js index 4750a1c..f0f3af3 100644 --- a/src/components/laanc/map/LaancAreaMap.js +++ b/src/components/laanc/map/LaancAreaMap.js @@ -12,10 +12,7 @@ import { AREA_COORDINATE_LIST_SAVE, FLIGHT_PLAN_AREA_BUFFER_LIST } from '../../../modules/basis/flight/actions/basisFlightAction'; -import { - drawTypeChangeAction, - mapInitAction -} from '../../../modules/control/map/actions/controlMapActions'; +import { mapInitAction } from '../../../modules/control/map/actions/controlMapActions'; import { FormattingCoord, handlerFitBounds, @@ -44,8 +41,6 @@ export default function LaancAreaMap({ setSaveData, handlerSaveElev, setModal - // isDrawDone, - // setIsDrawDone }) { const dispatch = useDispatch(); const mapControl = useSelector(state => state.controlMapReducer); @@ -59,13 +54,8 @@ export default function LaancAreaMap({ ); const [number, setNumber] = useState(0); - // const [modal, setModal] = useState({ - // title: '', - // desc: '', - // isOpen: false - // }); - const [detailLayer, setDetailLayer] = useState(); + // const [detailLayer, setDetailLayer] = useState(); const [viewCoordObj, setViewCoordObj] = useState([]); @@ -265,8 +255,8 @@ export default function LaancAreaMap({ handlerCreateAirSpace(map); setIsMapLoad(true); - const detail = map.getSource('detail'); - if (detail) setDetailLayer(detail); + // const detail = map.getSource('detail'); + // if (detail) setDetailLayer(detail); }); setMapObject(map); dispatch(mapInitAction(map)); @@ -484,13 +474,8 @@ export default function LaancAreaMap({ setSaveData={setSaveData} handlerAreaInfoToAreaList={handlerAreaInfoToAreaList} handlerSaveElev={handlerSaveElev} - // isDrawDone={isDrawDone} - // setIsDrawDone={setIsDrawDone} /> - {/* {modal ? ( - - ) : null} */} ) : null}