Browse Source

김포공항 중심좌표 변경으로 인한 수정작업

master
이준희 2 months ago
parent
commit
3f43f66e64
  1. 4
      src/components/laanc/step/LaancStep1.js
  2. 10
      src/components/map/geojson/_AirArea.js
  3. 2126
      src/components/map/geojson/flatGimpoAirportAirArea.json
  4. 65
      src/components/map/mapbox/MapBoxMap.js

4
src/components/laanc/step/LaancStep1.js

@ -359,14 +359,14 @@ export default function LaancStep1({
const handlerBufferApply = async () => {
if (areaCoordList.length1 != 0) {
if (areaCoordList[0].coordList.length > 0) {
dispatch(checkLaancValidArea.request(detailData.areaList));
dispatch(checkLaancValidArea(detailData.areaList));
const array = [];
const copy = { ...areaCoordList[0] };
copy.bufferZone = detailData.areaList[0].bufferZone;
array.push(copy);
dispatch(AreaBufferList.request(array));
dispatch(AreaBufferList(array));
try {
const elev = await axios.post(

10
src/components/map/geojson/_AirArea.js

@ -8,11 +8,11 @@ import ultraLightVehicleArea from './_ultraLightVehicleArea.json';
export const airArea = {
type: 'FeatureCollection',
features: [
...prohibitedArea.features, // 비행금지구역
...restrictedArea.features, // 비행제한구역
...controlArea.features, // 관제권(공항)
...aerodromeArea.features, // 관제권(군사/민간)
...ultraLightVehicleArea.features, // (UA)초경량비행장치공역
...airFieldArea.features, // 경량항공기이착륙장
...ultraLightVehicleArea.features // (UA)초경량비행장치공역
...aerodromeArea.features, // 관제권(군사/민간)
...controlArea.features, // 관제권(공항)
...restrictedArea.features, // 비행제한구역
...prohibitedArea.features // 비행금지구역
]
};

2126
src/components/map/geojson/flatGimpoAirportAirArea.json

File diff suppressed because it is too large Load Diff

65
src/components/map/mapbox/MapBoxMap.js

@ -40,6 +40,8 @@ import flatGimpo from '../../map/geojson/flatGimpoAirportAirArea.json';
import { clientMapInit } from '@src/redux/features/control/map/mapSlice';
import { getDraw } from '@src/utility/MapUtils';
// import { AreaBufferList } from '@src/redux/features/laanc/laancThunk';
let gridCoords = [];
let altitudeMarker = [];
let linerAltitude = [
@ -104,6 +106,65 @@ export default function MapBoxMap({ handlerDrawObjInit }) {
features: []
});
// 공역 수정 작업
// useEffect(() => {
// const line = turf.lineString([
// [0, 0],
// [0, 0]
// ]);
// if (line.geometry.coordinates.length > 0) {
// const coordList = [];
// line.geometry.coordinates.map(coord => {
// coordList.push({
// planAreacoordSno: 0,
// planAreaSno: 0,
// lat: coord[1],
// lon: coord[0],
// createUserId: '',
// createDt: ''
// });
// });
// const rq = {
// planAreaSno: 0,
// planSno: 0,
// areaType: 'LINE',
// fltMethod: '',
// fltMothoeRm: '',
// bufferZone: 367,
// concatBufferZone: 0,
// fltElev: 0,
// createUserId: '',
// createDt: '',
// updateUserId: '',
// updateDt: '',
// coordList: coordList
// };
// dispatch(AreaBufferList([rq])).then(res => {
// const buffer = res.payload[0].bufferCoordList;
// const bufferCoord = [];
// buffer.map(bf => {
// bufferCoord.push([bf.lon, bf.lat]);
// });
// console.log(bufferCoord, '-----bufferCoord');
// });
// }
// const linee = turf.lineString([
// [126.773741386, 37.5677930496, 18.59],
// [126.7461278299, 37.5840418952, 82.81],
// [126.6355487467, 37.6489641997, 381.99]
// ]);
// const circle = turf.lineString([
// [126.70986209199998, 37.60272668099992],
// [126.71112399499998, 37.604222307999976],
// ]);
// const intersect = turf.lineIntersect(linee, circle);
// console.log(intersect, '----intersect');
// }, []);
// 지도 초기 셋팅
useLayoutEffect(() => {
mapBoxMapInit();
@ -592,7 +653,9 @@ export default function MapBoxMap({ handlerDrawObjInit }) {
}
});
handlerDrawObjInit(drawObj, map);
if (handlerDrawObjInit) {
handlerDrawObjInit(drawObj, map);
}
setMapObject(map);
dispatch(clientMapInit(map));
};

Loading…
Cancel
Save