diff --git a/src/components/map/mapbox/draw/LaancDrawControl.js b/src/components/map/mapbox/draw/LaancDrawControl.js index c1adf6e..7517a32 100644 --- a/src/components/map/mapbox/draw/LaancDrawControl.js +++ b/src/components/map/mapbox/draw/LaancDrawControl.js @@ -47,10 +47,6 @@ export const LaancDrawControl = props => { // if (areaType !== drawType) drawInit(); }, [mapControl.drawType]); - // useEffect(() => { - // console.log(props.areaCoordList[0], '-----------'); - // }, [props.areaCoordList]); - useEffect(() => { if (mapObject) { mapObject.on('draw.update', handlerUpdateSetting); @@ -331,6 +327,7 @@ export const LaancDrawControl = props => { const obj = drawObj .getAll() .features.filter(obj => obj.properties.id !== 'BUFFER'); + props.setViewCoordObj(obj); if (obj.length > 1) { props.handlerAddChange('overAdd', true); } else { @@ -473,6 +470,7 @@ export const LaancDrawControl = props => { props.handlerAddChange('isAddable', false); props.handlerAddChange('isViewAdd', false); props.handlerAddChange('overAdd', false); + props.setViewCoordObj([]); drawObj.deleteAll(); handlerRemoveAllMarker(); return; diff --git a/src/views/laanc/LaancAreaMap.js b/src/views/laanc/LaancAreaMap.js index a1a96fb..a42a5a5 100644 --- a/src/views/laanc/LaancAreaMap.js +++ b/src/views/laanc/LaancAreaMap.js @@ -319,7 +319,46 @@ export default function LaancAreaMap({