Browse Source

mapbox load 시점 이슈 수정

master
김장현 7 months ago
parent
commit
f650d8e497
  1. 8
      src/components/laanc/map/LaancMap.js

8
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));
};

Loading…
Cancel
Save