|
|
@ -8,11 +8,15 @@ import { |
|
|
|
flightlayerWayPoint, |
|
|
|
flightlayerWayPoint, |
|
|
|
flightlayerPolyline, |
|
|
|
flightlayerPolyline, |
|
|
|
flightlayerPolygon, |
|
|
|
flightlayerPolygon, |
|
|
|
flightlayerBuffer |
|
|
|
flightlayerBuffer, |
|
|
|
|
|
|
|
handlerStartMode |
|
|
|
} from '../../utility/MapUtils'; |
|
|
|
} from '../../utility/MapUtils'; |
|
|
|
import { useHistory } from 'react-router-dom'; |
|
|
|
import { useHistory } from 'react-router-dom'; |
|
|
|
import useMapType from '@hooks/useMapType'; |
|
|
|
import useMapType from '@hooks/useMapType'; |
|
|
|
import { clientSaveAreaCoordinateList } from '@src/redux/features/laanc/laancSlice'; |
|
|
|
import { |
|
|
|
|
|
|
|
clientSaveAreaCoordinateList, |
|
|
|
|
|
|
|
clientChangeDrawType |
|
|
|
|
|
|
|
} from '@src/redux/features/laanc/laancSlice'; |
|
|
|
import { MapControl } from '../../components/map/MapControl'; |
|
|
|
import { MapControl } from '../../components/map/MapControl'; |
|
|
|
import { clientSetIsMapLoading } from '@src/redux/features/laanc/laancSlice'; |
|
|
|
import { clientSetIsMapLoading } from '@src/redux/features/laanc/laancSlice'; |
|
|
|
import { clientMapInit } from '@src/redux/features/control/map/mapSlice'; |
|
|
|
import { clientMapInit } from '@src/redux/features/control/map/mapSlice'; |
|
|
@ -45,7 +49,7 @@ export default function OperationApprovalsContainer({ mode }) { |
|
|
|
const [selected, setSelected] = useState(null); |
|
|
|
const [selected, setSelected] = useState(null); |
|
|
|
const [isMapLoading, setIsMapLoading] = useState(false); |
|
|
|
const [isMapLoading, setIsMapLoading] = useState(false); |
|
|
|
// 비행구역 그리기
|
|
|
|
// 비행구역 그리기
|
|
|
|
|
|
|
|
const [drawObj, setDrawObj] = useState(); |
|
|
|
const [filter, setFilter] = useState(''); |
|
|
|
const [filter, setFilter] = useState(''); |
|
|
|
|
|
|
|
|
|
|
|
// 지도
|
|
|
|
// 지도
|
|
|
@ -410,6 +414,20 @@ export default function OperationApprovalsContainer({ mode }) { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const handlerDrawTypeChange = val => { |
|
|
|
|
|
|
|
dispatch(clientChangeDrawType(val)); |
|
|
|
|
|
|
|
handlerStartMode(val, drawObj); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const handlerDrawObjInit = obj => { |
|
|
|
|
|
|
|
setDrawObj(obj); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const handlerMapTypeChange = val => { |
|
|
|
|
|
|
|
dispatch(clientChangeDrawType('')); |
|
|
|
|
|
|
|
setMapType(val); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const handlerLogout = async () => { |
|
|
|
const handlerLogout = async () => { |
|
|
|
const { payload } = await dispatch(setLogout()); |
|
|
|
const { payload } = await dispatch(setLogout()); |
|
|
|
|
|
|
|
|
|
|
@ -643,19 +661,19 @@ export default function OperationApprovalsContainer({ mode }) { |
|
|
|
<ButtonGroup> |
|
|
|
<ButtonGroup> |
|
|
|
<Button |
|
|
|
<Button |
|
|
|
color={mapType === 'TERRAIN' ? 'primary' : ''} |
|
|
|
color={mapType === 'TERRAIN' ? 'primary' : ''} |
|
|
|
onClick={e => setMapType('TERRAIN')} |
|
|
|
onClick={() => handlerMapTypeChange('TERRAIN')} |
|
|
|
> |
|
|
|
> |
|
|
|
지형지도 |
|
|
|
지형지도 |
|
|
|
</Button> |
|
|
|
</Button> |
|
|
|
<Button |
|
|
|
<Button |
|
|
|
color={mapType === 'SATELLITE' ? 'primary' : ''} |
|
|
|
color={mapType === 'SATELLITE' ? 'primary' : ''} |
|
|
|
onClick={e => setMapType('SATELLITE')} |
|
|
|
onClick={() => handlerMapTypeChange('SATELLITE')} |
|
|
|
> |
|
|
|
> |
|
|
|
위성지도 |
|
|
|
위성지도 |
|
|
|
</Button> |
|
|
|
</Button> |
|
|
|
<Button |
|
|
|
<Button |
|
|
|
color={mapType === '2D' ? 'primary' : ''} |
|
|
|
color={mapType === '2D' ? 'primary' : ''} |
|
|
|
onClick={e => setMapType('2D')} |
|
|
|
onClick={() => handlerMapTypeChange('2D')} |
|
|
|
> |
|
|
|
> |
|
|
|
2D |
|
|
|
2D |
|
|
|
</Button> |
|
|
|
</Button> |
|
|
@ -666,15 +684,29 @@ export default function OperationApprovalsContainer({ mode }) { |
|
|
|
<h4>거리측정</h4> |
|
|
|
<h4>거리측정</h4> |
|
|
|
<div className='map-btn'> |
|
|
|
<div className='map-btn'> |
|
|
|
<ButtonGroup> |
|
|
|
<ButtonGroup> |
|
|
|
<Button primary>직선</Button> |
|
|
|
<Button |
|
|
|
<Button primary>다각형</Button> |
|
|
|
color={drawType === 'LINE' ? 'primary' : ''} |
|
|
|
|
|
|
|
onClick={() => { |
|
|
|
|
|
|
|
handlerDrawTypeChange('LINE'); |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
직선 |
|
|
|
|
|
|
|
</Button> |
|
|
|
|
|
|
|
<Button |
|
|
|
|
|
|
|
color={drawType === 'POLYGON' ? 'primary' : ''} |
|
|
|
|
|
|
|
onClick={() => { |
|
|
|
|
|
|
|
handlerDrawTypeChange('POLYGON'); |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
다각형 |
|
|
|
|
|
|
|
</Button> |
|
|
|
</ButtonGroup> |
|
|
|
</ButtonGroup> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</Card> |
|
|
|
</Card> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<MapControl /> |
|
|
|
<MapControl handlerDrawObjInit={handlerDrawObjInit} /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className='left-menu'> |
|
|
|
<div className='left-menu'> |
|
|
|
<h1 className='logo'> |
|
|
|
<h1 className='logo'> |
|
|
|