|
|
@ -40,6 +40,8 @@ import flatGimpo from '../../map/geojson/flatGimpoAirportAirArea.json'; |
|
|
|
import { clientMapInit } from '@src/redux/features/control/map/mapSlice'; |
|
|
|
import { clientMapInit } from '@src/redux/features/control/map/mapSlice'; |
|
|
|
import { getDraw } from '@src/utility/MapUtils'; |
|
|
|
import { getDraw } from '@src/utility/MapUtils'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// import { AreaBufferList } from '@src/redux/features/laanc/laancThunk';
|
|
|
|
|
|
|
|
|
|
|
|
let gridCoords = []; |
|
|
|
let gridCoords = []; |
|
|
|
let altitudeMarker = []; |
|
|
|
let altitudeMarker = []; |
|
|
|
let linerAltitude = [ |
|
|
|
let linerAltitude = [ |
|
|
@ -104,6 +106,65 @@ export default function MapBoxMap({ handlerDrawObjInit }) { |
|
|
|
features: [] |
|
|
|
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(() => { |
|
|
|
useLayoutEffect(() => { |
|
|
|
mapBoxMapInit(); |
|
|
|
mapBoxMapInit(); |
|
|
@ -592,7 +653,9 @@ export default function MapBoxMap({ handlerDrawObjInit }) { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
handlerDrawObjInit(drawObj, map); |
|
|
|
if (handlerDrawObjInit) { |
|
|
|
|
|
|
|
handlerDrawObjInit(drawObj, map); |
|
|
|
|
|
|
|
} |
|
|
|
setMapObject(map); |
|
|
|
setMapObject(map); |
|
|
|
dispatch(clientMapInit(map)); |
|
|
|
dispatch(clientMapInit(map)); |
|
|
|
}; |
|
|
|
}; |
|
|
|