파일명 변경

This commit is contained in:
yschoi
2025-06-05 13:14:36 +09:00
parent 3e016951ec
commit 59cc416eaa
5 changed files with 8 additions and 72 deletions
+5 -9
View File
@@ -1,18 +1,14 @@
'use client'
"use client";
import Gis from '@common/business_components/ui/map/Gis';
import { SearchDiv, SelectBox, UiTable, MainDiv, Title, ContentsDiv, SearchFormLeft, SearchFormRight } from '@common/business_components';
import ListDiv from '@common/business_components/ui/list_div';
import { Button, Input } from '@common/components';
import Gis from "@common/business_components/ui/map/Gis";
import { useEffect, useState } from "react";
import { mapService } from "@service";
const Map = () => {
const [treeData, setTreeData] = useState([]); // 초기값을 객체 또는 null로 설정
const [selectedFeature,setSelectedFeature] = useState(null); // 선택된 피처 상태
const [selectedFeature, setSelectedFeature] = useState(null); // 선택된 피처 상태
const fetchData = async () => {
const fetchData = async () => {
try {
const response = await mapService.getLyrStngs();
setTreeData(response.data); // API 응답 저장
@@ -29,7 +25,7 @@ const Map = () => {
return (
<div className="bg-container">
<Gis treeData={treeData} isSearch={true} />
</div>
</div>
);
};
@@ -224,7 +224,7 @@ function Gis({ treeData = [], isSearch = false }) {
<div ref={mapRef} className="gis-map flex-1 relative" style={{ height: '100%', padding: 0 }} />
{/* <GisLonLat/>
<GisToolBar/>
<MapToggleBtn/> */}
<GisMapToggle/> */}
</div>
</GisContext.Provider>
</>
@@ -5,7 +5,7 @@ import GisLonLat from './GisLonLat';
import GisSelect from './GisSelect';
import GisToolBar from './GisToolBar';
import './lib/css/gis.edit.css';
import MapToggleBtn from './MapToggleBtn';
import GisMapToggle from './GisMapToggle';
import { Search } from 'lucide-react';
export default function GisContent({ edit = false, onFeatureSelect, isSearch, setIsSearchModalOpen }) {
@@ -51,7 +51,7 @@ export default function GisContent({ edit = false, onFeatureSelect, isSearch, se
return (
<>
{/*<GisTree />*/}
<MapToggleBtn />
<GisMapToggle />
<GisLonLat />
<GisToolBar />
<GisSelect onFeatureSelect={onFeatureSelect} />
@@ -1,60 +0,0 @@
import React, { useEffect, useRef, useState } from 'react';
import OLCesium from 'olcs/OLCesium';
import olView from 'ol/View.js';
import olSourceImageWMS from 'ol/source/ImageWMS.js';
import olSourceOSM from 'ol/source/OSM.js';
import olLayerImage from 'ol/layer/Image.js';
import olLayerTile from 'ol/layer/Tile.js';
import olMap from 'ol/Map.js';
import { GLOBAL } from '../../js/consts/global';
const Google3DMap = () => {
const mapRef = useRef(null);
const [ol3d, setOl3d] = useState(null);
useEffect(() => {
if (!mapRef.current) return;
const customProjSource = new olSourceImageWMS({
attributions: '© <a href="http://www.geo.admin.ch/internet/geoportal/en/home.html">National parks / geo.admin.ch</a>',
crossOrigin: 'anonymous',
params: { LAYERS: 'ch.bafu.schutzgebiete-paerke_nationaler_bedeutung' },
projection: 'EPSG:21781',
url: 'https://wms.geo.admin.ch/',
});
const { Cesium } = window;
Cesium.Ion.defaultAccessToken = GLOBAL.CESIUM_ION_TOKEN;
const ol2d = new olMap({
layers: [new olLayerTile({ source: new olSourceOSM() }), new olLayerImage({ source: customProjSource })],
target: mapRef.current,
view: new olView({
center: [860434.6266531206, 6029479.0044273855],
zoom: 6,
}),
});
const ol3dInstance = new OLCesium({
map: ol2d,
time: () => Cesium.JulianDate.now(),
});
const scene = ol3dInstance.getCesiumScene();
Cesium.createWorldTerrainAsync().then(tp => {
scene.terrainProvider = tp;
});
ol3dInstance.setEnabled(true);
setOl3d(ol3dInstance);
return () => {
ol3dInstance.setEnabled(false);
ol2d.setTarget(null);
};
}, []);
return <div ref={mapRef} style={{ width: '100%', height: '100vh' }} />;
};
export default Google3DMap;