diff --git a/apps/sn/app/map/page.tsx b/apps/sn/app/map/page.tsx
index 4dbb90c49..bd8feb360 100644
--- a/apps/sn/app/map/page.tsx
+++ b/apps/sn/app/map/page.tsx
@@ -27,7 +27,7 @@ const Map = () => {
return (
-
+
);
};
diff --git a/packages/common/business_components/src/ui/map/Gis.js b/packages/common/business_components/src/ui/map/Gis.js
index 7c625a928..2b5f9fc35 100644
--- a/packages/common/business_components/src/ui/map/Gis.js
+++ b/packages/common/business_components/src/ui/map/Gis.js
@@ -10,18 +10,18 @@ import proj4 from 'proj4';
import { register } from 'ol/proj/proj4';
import GisApp from './lib/gis.core';
import GisContent from './GisContent';
-import GisTree from './GisTree';
import GisLonLat from './GisLonLat';
import GisToolBar from './GisToolBar';
-import GisSearch from './GisSearch';
+import GisTab from './GisTab';
import MapToggleBtn from './MapToggleBtn';
export const GisContext = createContext({gisCore: null, gisMap: null, treeData:null, checkedLayerIds:null});
export const useGisContext = () => useContext(GisContext);
-function Gis({ treeData = [] }) {
+function Gis({ treeData = [], isSearch = false }) {
const mapRef = useRef();
const [mapObject, setMapObject] = useState({});
+ const [tabVisible, setTabVisible] = useState(true);
const gisCore = useMemo(() => new GisApp.core({ targetId: mapRef.current }), []);
//const [treeData, setTreeData] = useState([]);
const checkedLayerIds = useRef([]);
@@ -125,34 +125,20 @@ function Gis({ treeData = [] }) {
}
}
- const [isSidebarOpen, setIsSidebarOpen] = useState(true);
return (
+ <>
- <>
-
-
-
- 레이어
- 시설검색
-
-
-
-
-
-
-
-
-
+
- >
+ >
);
}
diff --git a/packages/common/business_components/src/ui/map/GisTab.js b/packages/common/business_components/src/ui/map/GisTab.js
new file mode 100644
index 000000000..baf268879
--- /dev/null
+++ b/packages/common/business_components/src/ui/map/GisTab.js
@@ -0,0 +1,67 @@
+import React, { useState } from 'react';
+import { Tabs, TabsList, TabsTrigger } from '@common/components/ui/tabs';
+import GisTree from './GisTree';
+import GisSearch from './GisSearch';
+import { ChevronLeft, ChevronRight } from 'lucide-react';
+
+function GisTab({ visible, setVisible, isSearch }) {
+ const [activeTab, setActiveTab] = useState('layers');
+
+ return (
+ <>
+
+
+
+ 레이어
+ {isSearch && (
+ 검색
+ )}
+
+
+ {/* GisTree는 항상 마운트되며, 탭 상태에 따라 보여주기만 함 */}
+
+
+
+
+ {/* GisSearch도 동일하게 처리 */}
+ {isSearch && (
+
+
+
+ )}
+
+
+ {/* 접기 버튼 */}
+
+
+
+ {/* 열기 버튼 */}
+ {!visible && (
+
+ )}
+ >
+ );
+}
+
+export default React.memo(GisTab);
diff --git a/packages/common/business_components/src/ui/map/GisTree.js b/packages/common/business_components/src/ui/map/GisTree.js
index 2e9d6f9c0..01a3fabc3 100644
--- a/packages/common/business_components/src/ui/map/GisTree.js
+++ b/packages/common/business_components/src/ui/map/GisTree.js
@@ -116,22 +116,6 @@ export default React.memo(function GisTree({ checkedNodes = [], setCheckedNodes
});
};
- const findUpLyrId = (nodes, targetLyrId) => {
- for (let i = 0; i < nodes.length; i++) {
- const node = nodes[i];
- if (node.data && node.data.lyrSn === targetLyrId) {
- return node.data.upperLyrSn;
- }
- if (node.children) {
- const upLyrId = findUpLyrId(node.children, targetLyrId);
- if (upLyrId) {
- return upLyrId;
- }
- }
- }
- return null;
- };
-
const makeLegendSrc = layerinfo => {
if(!layerinfo.gobjTy) return null;
diff --git a/packages/common/business_components/src/ui/map/lib/css/gis.common.css b/packages/common/business_components/src/ui/map/lib/css/gis.common.css
index 190a98e2e..e479fc501 100644
--- a/packages/common/business_components/src/ui/map/lib/css/gis.common.css
+++ b/packages/common/business_components/src/ui/map/lib/css/gis.common.css
@@ -759,8 +759,6 @@
.puGrayTb {
position: relative;
width: 98.3%;
- cellpadding: 0;
- cellspcing: 0;
margin-top: 5px;
table-layout: fixed;
font-family: Verdana;