From fcb39e289e1e52cf562ad9cbfc0a9e55128d4a69 Mon Sep 17 00:00:00 2001 From: leedj312 Date: Fri, 8 Aug 2025 14:53:18 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A7=80=EB=8F=84=20=ED=8C=9D=EC=97=85=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=EC=82=AC=ED=95=AD=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wr/app/(map-layout)/map/mainMap/page.tsx | 20 ++++++++++++++++--- .../(popUp-layout)/mapDetailPopUp/page.tsx | 14 ++++++------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/apps/wr/app/(map-layout)/map/mainMap/page.tsx b/apps/wr/app/(map-layout)/map/mainMap/page.tsx index a3c253500..331e487bd 100644 --- a/apps/wr/app/(map-layout)/map/mainMap/page.tsx +++ b/apps/wr/app/(map-layout)/map/mainMap/page.tsx @@ -7,6 +7,7 @@ import GisApp from "@common/business_components/ui/map/lib/gis.core"; import { SearchBar } from "@common/business_components/ui/map/searchBar/searchBar"; import { useWrStore } from "@/app/store"; import { getFeatureCd } from "@/components/lib/func/mapUtil"; +import toast, { Toaster } from "react-hot-toast"; const Map = () => { const { comMap } = useWrStore((state) => state); @@ -228,7 +229,6 @@ const Map = () => { const popupOptions = `width=${width},height=${height},left=${left},top=${top},resizable=yes,scrollbars=no`; popupRef.current = window.open(url, "지도 레이어 팝업", popupOptions); } else { - console.log('isFeature 2', isFeature) const layerNm = getSelectedLayers(isFeature); const safeProps = isFeature.getProperties(); const featureCd = getFeatureCd(safeProps, String(layerNm)); @@ -266,7 +266,20 @@ const Map = () => { }; const onOpenPopup = (data:any) => { - console.log(data) + if(data){ + + const url = `/mapDetailPopUp?layerNm=${encodeURIComponent(data)}`; + const width = window.screen.availWidth; + const height = window.screen.availHeight; + const left = 0; + const top = 0; + const popupOptions = `width=${width},height=${height},left=${left},top=${top},resizable=yes,scrollbars=no`; + popupRef.current = window.open(url, "지도 레이어 팝업", popupOptions); + }else{ + toast.error('시설 및 수요처가 선택되지 않았습니다.') + } + + } return ( @@ -307,7 +320,8 @@ const Map = () => { onOpenPopup(data) }} /> - + + ); }; diff --git a/apps/wr/app/(popUp-layout)/mapDetailPopUp/page.tsx b/apps/wr/app/(popUp-layout)/mapDetailPopUp/page.tsx index 04b7ab238..d8e93c567 100644 --- a/apps/wr/app/(popUp-layout)/mapDetailPopUp/page.tsx +++ b/apps/wr/app/(popUp-layout)/mapDetailPopUp/page.tsx @@ -16,7 +16,7 @@ export default function MapDetailPopUp() { const renderConditionalContent = () => { const layerId = searchParams.get("layerNm"); switch (layerId) { - case "하수재이용시설": + case "tb_wr_bdst_ruse_fclt": return ( { @@ -24,7 +24,7 @@ export default function MapDetailPopUp() { }} /> ); - case "하수처리시설": + case "tb_il_swage_prcs_fclt": return ( { @@ -32,7 +32,7 @@ export default function MapDetailPopUp() { }} /> ); - case "빗물이용시설": + case "tb_wr_rnwtr_utztn_fclt": return ( { @@ -40,7 +40,7 @@ export default function MapDetailPopUp() { }} /> ); - case "중수도시설": + case "tb_wr_rswtr_fclt": return ( { @@ -48,7 +48,7 @@ export default function MapDetailPopUp() { }} /> ); - case "온배수시설": + case "tb_wr_htdfl_fclt": return ( { @@ -56,7 +56,7 @@ export default function MapDetailPopUp() { }} /> ); - case "수요처": + case "tb_wr_ruse_fclt_dmd_co": return ( { @@ -64,7 +64,7 @@ export default function MapDetailPopUp() { }} /> ); - case "잠재수요처": + case "tb_wr_tmpr_dmd_co": return ( {