|
|
|
@ -87,6 +87,11 @@ export const LaancDrawControl = props => {
|
|
|
|
|
|
|
|
|
|
if (mode && obj) { |
|
|
|
|
const feature = drawObj.get(obj.id); |
|
|
|
|
if (!feature) { |
|
|
|
|
drawObj.changeMode('simple_select'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const initCoords = feature.geometry.coordinates; |
|
|
|
|
if (mode !== 'CIRCLE') { |
|
|
|
|
if (state.currentVertexPosition > 1) { |
|
|
|
@ -163,6 +168,25 @@ export const LaancDrawControl = props => {
|
|
|
|
|
coords.splice(-1); |
|
|
|
|
|
|
|
|
|
const data = { coords: coords, mode: mode, id: obj.id }; |
|
|
|
|
// 에러 체크
|
|
|
|
|
// const isExist = drawObj.getAll().features.some(o => o.id === obj.id);
|
|
|
|
|
// if (!isExist) {
|
|
|
|
|
// console.log('1111111?');
|
|
|
|
|
// props.setModal({
|
|
|
|
|
// title: '비행 구역 설정',
|
|
|
|
|
// desc: (
|
|
|
|
|
// <>
|
|
|
|
|
// 비행구역 설정이 완료되지 않았습니다.
|
|
|
|
|
// <br />
|
|
|
|
|
// 비행구역 설정을 다시 해주시기 부탁드립니다.
|
|
|
|
|
// </>
|
|
|
|
|
// ),
|
|
|
|
|
// isOpen: true
|
|
|
|
|
// });
|
|
|
|
|
// dispatch(drawTypeChangeAction('DONE'));
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
handlerAbnormalityCheck(data).then(areaInfo => { |
|
|
|
|
if (areaInfo) { |
|
|
|
|
drawObj.setFeatureProperty(obj.id, 'id', mode); |
|
|
|
@ -208,7 +232,6 @@ export const LaancDrawControl = props => {
|
|
|
|
|
let isBreak = false; |
|
|
|
|
|
|
|
|
|
// 비행금지 구역 체크
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
const elev1 = await axios.post(`api/bas/laanc/valid/elev`, areaList); |
|
|
|
|
props.handlerSaveElev(elev1.data); |
|
|
|
@ -366,6 +389,7 @@ export const LaancDrawControl = props => {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
drawObj.delete(id); |
|
|
|
|
drawObj.changeMode('simple_select'); |
|
|
|
|
|
|
|
|
|
// 라인일 경우 버퍼도 삭제
|
|
|
|
|
const buffer = drawObj |
|
|
|
@ -388,7 +412,7 @@ export const LaancDrawControl = props => {
|
|
|
|
|
|
|
|
|
|
const viewCoordObj = drawObj |
|
|
|
|
.getAll() |
|
|
|
|
.features.filter(o => o.properties.id !== 'BUFFER'); |
|
|
|
|
.features.filter(o => o.properties.id !== 'BUFFER' && o.properties.id); |
|
|
|
|
|
|
|
|
|
props.setViewCoordObj(viewCoordObj); |
|
|
|
|
|
|
|
|
@ -544,6 +568,7 @@ export const LaancDrawControl = props => {
|
|
|
|
|
handlerCreateGroupMarker(mapObject, data, area.areaType); |
|
|
|
|
} |
|
|
|
|
dispatch(drawTypeChangeAction('DONE')); |
|
|
|
|
drawObj.changeMode('simple_select'); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} else if (areas.length > 0 && areas[0].areaType) { |
|
|
|
@ -670,10 +695,13 @@ export const LaancDrawControl = props => {
|
|
|
|
|
props.setViewCoordObj([]); |
|
|
|
|
drawObj.deleteAll(); |
|
|
|
|
handlerRemoveAllMarker(); |
|
|
|
|
drawObj.changeMode('simple_select'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
handlerStartMode(mode); |
|
|
|
|
} else { |
|
|
|
|
drawObj.changeMode('simple_select'); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|