|
|
|
@ -43,10 +43,8 @@ export default function LaancMap({ page, handleChange, data }) {
|
|
|
|
|
const mapState = useSelector(state => state.mapState); |
|
|
|
|
|
|
|
|
|
// 비행구역 정보, 비행 구역 설정 모달 오픈 여부, 지도 로딩 여부
|
|
|
|
|
const { areaCoordList, isOpenModal, isMapLoading } = useSelector( |
|
|
|
|
state => state.laancState |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
const { areaCoordList, isOpenModal } = useSelector(state => state.laancState); |
|
|
|
|
const [isMapLoading, setIsMapLoading] = useState(false); |
|
|
|
|
// 지도
|
|
|
|
|
const [mapObject, setMapObject] = useState(); |
|
|
|
|
const mapContainer = useRef(null); |
|
|
|
@ -245,7 +243,9 @@ export default function LaancMap({ page, handleChange, data }) {
|
|
|
|
|
|
|
|
|
|
const preview = map.getSource('preview'); |
|
|
|
|
if (preview) setPreviewLayer(preview); |
|
|
|
|
setIsMapLoading(true); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
setMapObject(map); |
|
|
|
|
dispatch(clientMapInit(map)); |
|
|
|
|
}; |
|
|
|
|