diff --git a/src/views/laanc/LaancAreaMap.js b/src/views/laanc/LaancAreaMap.js index d015cf74..4c3ada71 100644 --- a/src/views/laanc/LaancAreaMap.js +++ b/src/views/laanc/LaancAreaMap.js @@ -59,6 +59,8 @@ export default function LaancAreaMap({ const [detailLayer, setDetailLayer] = useState(); const [coordArr, setCoordArr] = useState([]); + const [viewCoordObj, setViewCoordObj] = useState([]); + const detailGeo = useMemo(() => { return { type: 'FeatureCollection', @@ -317,21 +319,21 @@ export default function LaancAreaMap({
{mapObject ? ( -
+ //
+
{drawObj.getAll().features.length > 1 ? drawObj .getAll() .features.filter(obj => obj.properties.id !== 'BUFFER') .map((obj, i) => { - // console.log(obj, '>>>>>>obj'); const coord = obj.properties.id === 'LINE' ? obj.geometry.coordinates @@ -339,10 +341,10 @@ export default function LaancAreaMap({ return (
비행구역 {i + 1}
{coord?.map(co => { @@ -355,23 +357,6 @@ export default function LaancAreaMap({ ); } })} - {/* {obj.geometry.coordinates.map(coord => { - if (obj.properties.id === 'LINE') { - const fCoord = FormattingCoord(coord); - return ( -
- {fCoord[0]} , {fCoord[1]} -
- ); - } else if(obj.properties.id === 'POLYGON') { - const fCoord = FormattingCoord(coord); - return ( -
- {fCoord[0]} , {fCoord[1]} -
- ); - } - })} */}
); }) @@ -422,6 +407,7 @@ export default function LaancAreaMap({ handlerCoordinates={handlerCoordinates} handlerInitCoordinates={handlerInitCoordinates} setCoordArr={setCoordArr} + setViewCoordObj={setViewCoordObj} /> {modal ? (