From f650d8e4979b4c60e641be17ee6f23c54b2546bd Mon Sep 17 00:00:00 2001 From: JANGHYUNn Date: Thu, 7 Mar 2024 17:41:13 +0900 Subject: [PATCH] =?UTF-8?q?mapbox=20load=20=EC=8B=9C=EC=A0=90=20=EC=9D=B4?= =?UTF-8?q?=EC=8A=88=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/laanc/map/LaancMap.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/laanc/map/LaancMap.js b/src/components/laanc/map/LaancMap.js index 36a38395..ad02b107 100644 --- a/src/components/laanc/map/LaancMap.js +++ b/src/components/laanc/map/LaancMap.js @@ -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)); };