feat: Gis.js defaultZoom, defaultLonLat props 추가

This commit is contained in:
swcho
2025-08-13 16:11:33 +09:00
parent cb11ec839e
commit e797bdbdf7
@@ -124,7 +124,9 @@ function Gis({
checkInterval = 3000,
height: height = "h-[calc(100vh-5rem)]",
onOpenPopup = (data) => { },
droughtDates = { startYmd: '', endYmd: '' }
droughtDates = { startYmd: '', endYmd: '' },
defaultZoom = gisCore.defaults.zoom,
defaultLonLat = [127.4875, 37.4916],
}) {
const mapRef = useRef();
const [mapObject, setMapObject] = useState({});
@@ -209,9 +211,9 @@ function Gis({
}).extend([]),
view: new View({
projection: GisApp.TO_PROJ,
zoom: gisCore.defaults.zoom,
zoom: defaultZoom,
center: olProj.transform(
[127.4875, 37.4916],
defaultLonLat,
GisApp.FROM_PROJ,
GisApp.TO_PROJ,
),