diff --git a/src/components/laanc/map/FlightArea.js b/src/components/laanc/map/FlightArea.js index 6366d18..3476d2d 100644 --- a/src/components/laanc/map/FlightArea.js +++ b/src/components/laanc/map/FlightArea.js @@ -1,7 +1,6 @@ import 'mapbox-gl/dist/mapbox-gl.css'; import mapboxgl from 'mapbox-gl'; import threebox from 'threebox-plugin'; -import * as turf from '@turf/turf'; import MapboxLanguage from '@mapbox/mapbox-gl-language'; import MapboxDraw from '@mapbox/mapbox-gl-draw'; import { @@ -38,11 +37,10 @@ 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 { ErrorModal } from '../../modal/ErrorModal'; import { FeatureAirZone } from '../../map/mapbox/feature/FeatureAirZone'; import { WeatherContainer } from '../../../containers/basis/flight/plan/WeatherContainer'; -import { InfoModal } from '../../modal/InfoModal'; import { initFlightBas } from '../../../modules/laanc/models/laancModels'; +import * as LaancAction from '../../../modules/laanc/actions/laancActions'; const initialAddData = { isAddable: false, @@ -78,6 +76,8 @@ export default function FlightArea({ const [addData, setAddData] = useState(initialAddData); const [saveData, setSaveData] = useState(); + const [saveElev, setSaveElev] = useState(); + const { laancElev } = useSelector(state => state.laancState); //날씨 임시 데이터 const [wheather, setWheather] = useState([]); @@ -96,12 +96,19 @@ export default function FlightArea({ const area = areaCoordList[0]; if (area.areaType && area.areaType !== '') { if (!centeredModal && previewLayer) handlerPreviewDraw(); - // if (!centeredModal && previewLayer) handlerPrivewDrawObj(); } setWheather(areaCoordList); } }, [areaCoordList, centeredModal, previewLayer]); + // useEffect(() => { + // console.log(saveElev, '---elev'); + // }, [saveElev]); + + // useEffect(() => { + // console.log(laancElev, '---laancelev'); + // }, [laancElev]); + const handlerCreateAirSpace = ( map, useGeoJson = { @@ -499,8 +506,6 @@ export default function FlightArea({ .getAll() .features.filter(obj => obj.properties.id !== 'BUFFER'); handlerDrawType(obj[0].properties.id); - } else { - // alert('구역은 최대 2개까지 설정 가능합니다.'); } }; @@ -526,6 +531,10 @@ export default function FlightArea({ dispatch(AREA_COORDINATE_LIST_SAVE(init)); }; + const handlerSaveElev = elev => { + setSaveElev(elev); + }; + return (