Browse Source

laanc 비행구역 좌표표출 CSS 롤백

pull/2/head
junh_eee(이준희) 11 months ago
parent
commit
6046b20a45
  1. 44
      src/views/laanc/LaancAreaMap.js

44
src/views/laanc/LaancAreaMap.js

@ -59,6 +59,8 @@ export default function LaancAreaMap({
const [detailLayer, setDetailLayer] = useState(); const [detailLayer, setDetailLayer] = useState();
const [coordArr, setCoordArr] = useState([]); const [coordArr, setCoordArr] = useState([]);
const [viewCoordObj, setViewCoordObj] = useState([]);
const detailGeo = useMemo(() => { const detailGeo = useMemo(() => {
return { return {
type: 'FeatureCollection', type: 'FeatureCollection',
@ -317,21 +319,21 @@ export default function LaancAreaMap({
<div style={{ position: 'relative' }}> <div style={{ position: 'relative' }}>
<LaancMapSearch mapObject={mapObject} /> <LaancMapSearch mapObject={mapObject} />
<div <div
className='d-flex absolute' className='d-flex'
style={{ // style={{
position: 'relative', // position: 'relative',
zIndex: 100, // zIndex: 100,
margin: '470px 10px 10px 10px' // margin: '470px 10px 10px 10px'
}} // }}
> >
{mapObject ? ( {mapObject ? (
<div style={{ width: '400px' }}> // <div style={{ width: '400px' }}>
<div>
{drawObj.getAll().features.length > 1 {drawObj.getAll().features.length > 1
? drawObj ? drawObj
.getAll() .getAll()
.features.filter(obj => obj.properties.id !== 'BUFFER') .features.filter(obj => obj.properties.id !== 'BUFFER')
.map((obj, i) => { .map((obj, i) => {
// console.log(obj, '>>>>>>obj');
const coord = const coord =
obj.properties.id === 'LINE' obj.properties.id === 'LINE'
? obj.geometry.coordinates ? obj.geometry.coordinates
@ -339,10 +341,10 @@ export default function LaancAreaMap({
return ( return (
<div <div
style={{ // style={{
backgroundColor: '#fff', // backgroundColor: '#fff',
marginBottom: '10px' // marginBottom: '10px'
}} // }}
> >
<div>비행구역 {i + 1}</div> <div>비행구역 {i + 1}</div>
{coord?.map(co => { {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 (
<div>
{fCoord[0]} , {fCoord[1]}
</div>
);
} else if(obj.properties.id === 'POLYGON') {
const fCoord = FormattingCoord(coord);
return (
<div>
{fCoord[0]} , {fCoord[1]}
</div>
);
}
})} */}
</div> </div>
); );
}) })
@ -422,6 +407,7 @@ export default function LaancAreaMap({
handlerCoordinates={handlerCoordinates} handlerCoordinates={handlerCoordinates}
handlerInitCoordinates={handlerInitCoordinates} handlerInitCoordinates={handlerInitCoordinates}
setCoordArr={setCoordArr} setCoordArr={setCoordArr}
setViewCoordObj={setViewCoordObj}
/> />
<FeatureAirZone map={mapObject} mapboxgl={mapboxgl} /> <FeatureAirZone map={mapObject} mapboxgl={mapboxgl} />
{modal ? ( {modal ? (

Loading…
Cancel
Save