From 7cd1ae262524023c4e47734e50fd4ee45648ea0c Mon Sep 17 00:00:00 2001 From: yschoi Date: Thu, 24 Jul 2025 20:47:35 +0900 Subject: [PATCH] =?UTF-8?q?gis=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/dm/.env.local | 13 +- apps/dm/app/pages/map/popup/sdmInfoMap.tsx | 132 + apps/dm/app/pages/map/popup/windowPotal.tsx | 94 + apps/dm/app/pages/map/service/index.ts | 1 + apps/dm/app/pages/map/service/map.ts | 46 + .../ui/sdmInfoInsertForm/component.tsx | 237 +- .../images/map/layericon/BML_CBAS_PS.png | Bin 0 -> 1547 bytes .../images/map/layericon/BML_ELEV_PS.png | Bin 0 -> 1030 bytes .../images/map/layericon/BML_ETCP_PS.png | Bin 0 -> 961 bytes .../images/map/layericon/BML_STMS_PS.png | Bin 0 -> 1542 bytes .../images/map/layericon/BML_SYMB_PS.png | Bin 0 -> 970 bytes .../images/map/layericon/RDL_BYST_PS.png | Bin 0 -> 1196 bytes .../images/map/layericon/RDL_CROS_PS.png | Bin 0 -> 1083 bytes .../images/map/layericon/RDL_ETCT_PS.png | Bin 0 -> 1016 bytes .../images/map/layericon/RDL_OCUP_PS.png | Bin 0 -> 1061 bytes .../images/map/layericon/RDL_RDSN_PS.png | Bin 0 -> 1313 bytes .../images/map/layericon/RDL_SCLT_PS.png | Bin 0 -> 1072 bytes .../images/map/layericon/RDL_SEPC_PS.png | Bin 0 -> 1068 bytes .../images/map/layericon/RDL_STAT_PS.png | Bin 0 -> 1075 bytes .../images/map/layericon/RDL_STLT_PS.png | Bin 0 -> 1089 bytes .../images/map/layericon/RDL_TFSN_PS.png | Bin 0 -> 1291 bytes .../images/map/layericon/RDL_TRCT_PS.png | Bin 0 -> 1412 bytes .../images/map/layericon/RDL_TREE_PS.png | Bin 0 -> 1136 bytes .../images/map/layericon/RDL_TRSN_PS.png | Bin 0 -> 1375 bytes .../images/map/layericon/RDL_TSCT_PS.png | Bin 0 -> 1700 bytes .../images/map/layericon/SWL_CLAY_PS.png | Bin 0 -> 1146 bytes .../images/map/layericon/SWL_CLAY_PS_RED.png | Bin 0 -> 468 bytes .../images/map/layericon/SWL_DEPT_PS.png | Bin 0 -> 1079 bytes .../images/map/layericon/SWL_MANH_PS.png | Bin 0 -> 1559 bytes .../map/layericon/SWL_MANH_PS_BLACK.png | Bin 0 -> 757 bytes .../images/map/layericon/SWL_MANH_PS_BLUE.png | Bin 0 -> 785 bytes .../images/map/layericon/SWL_MANH_PS_GRAY.png | Bin 0 -> 1054 bytes .../map/layericon/SWL_MANH_PS_GREEN.png | Bin 0 -> 791 bytes .../map/layericon/SWL_MANH_PS_ORANGE.png | Bin 0 -> 455 bytes .../images/map/layericon/SWL_MANH_PS_RED.png | Bin 0 -> 782 bytes .../map/layericon/SWL_MANH_PS_YELLOW.png | Bin 0 -> 782 bytes .../images/map/layericon/SWL_SPEW_PS.png | Bin 0 -> 1217 bytes .../images/map/layericon/SWL_SPOT_PS.png | Bin 0 -> 1067 bytes .../map/layericon/SWL_SPOT_PS_BLACK.png | Bin 0 -> 217 bytes .../images/map/layericon/SWL_SPOT_PS_BLUE.png | Bin 0 -> 217 bytes .../map/layericon/SWL_SPOT_PS_GREEN.png | Bin 0 -> 217 bytes .../images/map/layericon/SWL_SPOT_PS_GREY.png | Bin 0 -> 217 bytes .../images/map/layericon/SWL_SPOT_PS_RED.png | Bin 0 -> 217 bytes .../images/map/layericon/SWL_VENT_PS.png | Bin 0 -> 1033 bytes .../images/map/layericon/TL_SPBD_ENTRC.png | Bin 0 -> 1260 bytes .../images/map/layericon/TL_SPGF_LOC.png | Bin 0 -> 1383 bytes .../images/map/layericon/TL_SPOT_NOIN.png | Bin 0 -> 1009 bytes .../images/map/layericon/TL_SPRD_BANO.png | Bin 0 -> 1044 bytes .../images/map/layericon/TL_SPRD_CRSRD.png | Bin 0 -> 1083 bytes .../images/map/layericon/TL_SPRD_NONM.png | Bin 0 -> 1049 bytes .../images/map/layericon/TL_SPRD_RENM.png | Bin 0 -> 1009 bytes .../images/map/layericon/TL_SPRD_RWNM.png | Bin 0 -> 1049 bytes .../images/map/layericon/UFL_BMAN_PS.png | Bin 0 -> 1552 bytes .../images/map/layericon/UFL_BOPC_PS.png | Bin 0 -> 1132 bytes .../images/map/layericon/UFL_BPIP_PS.png | Bin 0 -> 1017 bytes .../images/map/layericon/UFL_BPOL_PS.png | Bin 0 -> 1193 bytes .../images/map/layericon/UFL_BTRS_PS.png | Bin 0 -> 1097 bytes .../images/map/layericon/UFL_GMNT_PS.png | Bin 0 -> 1166 bytes .../images/map/layericon/UFL_GPIP_PS.png | Bin 0 -> 1103 bytes .../images/map/layericon/UFL_GPRS_PS.png | Bin 0 -> 1408 bytes .../images/map/layericon/UFL_GVAL_PS.png | Bin 0 -> 1426 bytes .../images/map/layericon/UFL_KMAN_PS.png | Bin 0 -> 1572 bytes .../images/map/layericon/UFL_KPOL_PS.png | Bin 0 -> 1122 bytes .../images/map/layericon/UFL_VALV_PS.png | Bin 0 -> 1058 bytes .../images/map/layericon/WTL_FIRE_PS.png | Bin 0 -> 1072 bytes .../images/map/layericon/WTL_FLOW_PS.png | Bin 0 -> 1137 bytes .../images/map/layericon/WTL_MANH_PS.png | Bin 0 -> 1557 bytes .../images/map/layericon/WTL_META_PS.png | Bin 0 -> 1100 bytes .../images/map/layericon/WTL_PIPE_PS.png | Bin 0 -> 1075 bytes .../images/map/layericon/WTL_RSRV_PS.png | Bin 0 -> 1057 bytes .../map/layericon/WTL_RSRV_PS_BLACK.png | Bin 0 -> 167 bytes .../images/map/layericon/WTL_RSRV_PS_GRAY.png | Bin 0 -> 259 bytes .../map/layericon/WTL_RSRV_PS_GREEN.png | Bin 0 -> 167 bytes .../map/layericon/WTL_RSRV_PS_ORANGE.png | Bin 0 -> 164 bytes .../map/layericon/WTL_RSRV_PS_PURPLE.png | Bin 0 -> 165 bytes .../images/map/layericon/WTL_RSRV_PS_RED.png | Bin 0 -> 165 bytes .../map/layericon/WTL_RSRV_PS_YELLOW.png | Bin 0 -> 163 bytes .../images/map/layericon/WTL_VALV_PS.png | Bin 0 -> 1077 bytes .../public/images/map/layericon/default.png | Bin 0 -> 160 bytes apps/dm/public/images/map/layericon/reset.png | Bin 0 -> 108 bytes .../public/images/map/toolbar/arrow_down.png | Bin 0 -> 1532 bytes .../public/images/map/toolbar/arrow_right.png | Bin 0 -> 1931 bytes .../images/map/toolbar/backward_icon.png | Bin 0 -> 313 bytes .../images/map/toolbar/btn_cont_area.png | Bin 0 -> 1231 bytes .../images/map/toolbar/btn_cont_area_on.png | Bin 0 -> 1184 bytes .../images/map/toolbar/btn_cont_next.png | Bin 0 -> 1256 bytes .../images/map/toolbar/btn_cont_next_on.png | Bin 0 -> 1204 bytes .../images/map/toolbar/btn_cont_prev.png | Bin 0 -> 1265 bytes .../images/map/toolbar/btn_cont_prev_on.png | Bin 0 -> 1223 bytes .../images/map/toolbar/btn_cont_print.png | Bin 0 -> 1318 bytes .../images/map/toolbar/btn_cont_print_on.png | Bin 0 -> 1293 bytes .../images/map/toolbar/btn_cont_ruler.png | Bin 0 -> 1353 bytes .../images/map/toolbar/btn_cont_ruler_on.png | Bin 0 -> 1339 bytes .../images/map/toolbar/btn_cont_save.png | Bin 0 -> 1216 bytes .../images/map/toolbar/btn_cont_save_on.png | Bin 0 -> 1202 bytes .../images/map/toolbar/btn_cont_sketch.png | Bin 0 -> 15103 bytes .../images/map/toolbar/btn_cont_sketch_on.png | Bin 0 -> 14933 bytes .../images/map/toolbar/btn_cont_zoomin.png | Bin 0 -> 1456 bytes .../images/map/toolbar/btn_cont_zoomin_on.png | Bin 0 -> 1423 bytes .../images/map/toolbar/btn_cont_zoomout.png | Bin 0 -> 1395 bytes .../map/toolbar/btn_cont_zoomout_on.png | Bin 0 -> 1376 bytes .../images/map/toolbar/btn_edit_add.png | Bin 0 -> 1169 bytes .../images/map/toolbar/btn_edit_add_on.png | Bin 0 -> 1168 bytes .../images/map/toolbar/btn_edit_del.png | Bin 0 -> 1160 bytes .../images/map/toolbar/btn_edit_del_on.png | Bin 0 -> 1158 bytes .../images/map/toolbar/btn_edit_next.png | Bin 0 -> 1209 bytes .../images/map/toolbar/btn_edit_next_on.png | Bin 0 -> 1205 bytes .../images/map/toolbar/btn_edit_prev.png | Bin 0 -> 1172 bytes .../images/map/toolbar/btn_edit_prev_on.png | Bin 0 -> 1176 bytes .../images/map/toolbar/btn_edit_save.png | Bin 0 -> 1180 bytes .../images/map/toolbar/btn_edit_save_on.png | Bin 0 -> 1190 bytes .../images/map/toolbar/btn_edit_slt.png | Bin 0 -> 1288 bytes .../images/map/toolbar/btn_edit_slt_on.png | Bin 0 -> 1274 bytes .../images/map/toolbar/btn_edit_snap.png | Bin 0 -> 1185 bytes .../images/map/toolbar/btn_edit_snap_on.png | Bin 0 -> 1185 bytes .../public/images/map/toolbar/close_icon.png | Bin 0 -> 313 bytes .../images/map/toolbar/ico_gis_sprite.png | Bin 0 -> 7858 bytes .../images/map/toolbar/icon-viewclose.png | Bin 0 -> 2895 bytes .../images/map/toolbar/img_base_map.png | Bin 0 -> 4537 bytes .../images/map/toolbar/img_network_map.png | Bin 0 -> 4974 bytes .../images/map/toolbar/img_road_map.png | Bin 0 -> 6079 bytes .../images/map/toolbar/img_settle_map.png | Bin 0 -> 7264 bytes apps/dm/public/images/map/toolbar/loading.gif | Bin 0 -> 184974 bytes apps/dm/public/images/map/toolbar/map_pin.png | Bin 0 -> 2362 bytes .../public/images/map/toolbar/toggle_off.png | Bin 0 -> 1591 bytes .../public/images/map/toolbar/toggle_on.png | Bin 0 -> 1612 bytes pnpm-lock.yaml | 11095 ++++++++++++++++ 127 files changed, 11516 insertions(+), 102 deletions(-) create mode 100644 apps/dm/app/pages/map/popup/sdmInfoMap.tsx create mode 100644 apps/dm/app/pages/map/popup/windowPotal.tsx create mode 100644 apps/dm/app/pages/map/service/index.ts create mode 100644 apps/dm/app/pages/map/service/map.ts create mode 100644 apps/dm/public/images/map/layericon/BML_CBAS_PS.png create mode 100644 apps/dm/public/images/map/layericon/BML_ELEV_PS.png create mode 100644 apps/dm/public/images/map/layericon/BML_ETCP_PS.png create mode 100644 apps/dm/public/images/map/layericon/BML_STMS_PS.png create mode 100644 apps/dm/public/images/map/layericon/BML_SYMB_PS.png create mode 100644 apps/dm/public/images/map/layericon/RDL_BYST_PS.png create mode 100644 apps/dm/public/images/map/layericon/RDL_CROS_PS.png create mode 100644 apps/dm/public/images/map/layericon/RDL_ETCT_PS.png create mode 100644 apps/dm/public/images/map/layericon/RDL_OCUP_PS.png create mode 100644 apps/dm/public/images/map/layericon/RDL_RDSN_PS.png create mode 100644 apps/dm/public/images/map/layericon/RDL_SCLT_PS.png create mode 100644 apps/dm/public/images/map/layericon/RDL_SEPC_PS.png create mode 100644 apps/dm/public/images/map/layericon/RDL_STAT_PS.png create mode 100644 apps/dm/public/images/map/layericon/RDL_STLT_PS.png create mode 100644 apps/dm/public/images/map/layericon/RDL_TFSN_PS.png create mode 100644 apps/dm/public/images/map/layericon/RDL_TRCT_PS.png create mode 100644 apps/dm/public/images/map/layericon/RDL_TREE_PS.png create mode 100644 apps/dm/public/images/map/layericon/RDL_TRSN_PS.png create mode 100644 apps/dm/public/images/map/layericon/RDL_TSCT_PS.png create mode 100644 apps/dm/public/images/map/layericon/SWL_CLAY_PS.png create mode 100644 apps/dm/public/images/map/layericon/SWL_CLAY_PS_RED.png create mode 100644 apps/dm/public/images/map/layericon/SWL_DEPT_PS.png create mode 100644 apps/dm/public/images/map/layericon/SWL_MANH_PS.png create mode 100644 apps/dm/public/images/map/layericon/SWL_MANH_PS_BLACK.png create mode 100644 apps/dm/public/images/map/layericon/SWL_MANH_PS_BLUE.png create mode 100644 apps/dm/public/images/map/layericon/SWL_MANH_PS_GRAY.png create mode 100644 apps/dm/public/images/map/layericon/SWL_MANH_PS_GREEN.png create mode 100644 apps/dm/public/images/map/layericon/SWL_MANH_PS_ORANGE.png create mode 100644 apps/dm/public/images/map/layericon/SWL_MANH_PS_RED.png create mode 100644 apps/dm/public/images/map/layericon/SWL_MANH_PS_YELLOW.png create mode 100644 apps/dm/public/images/map/layericon/SWL_SPEW_PS.png create mode 100644 apps/dm/public/images/map/layericon/SWL_SPOT_PS.png create mode 100644 apps/dm/public/images/map/layericon/SWL_SPOT_PS_BLACK.png create mode 100644 apps/dm/public/images/map/layericon/SWL_SPOT_PS_BLUE.png create mode 100644 apps/dm/public/images/map/layericon/SWL_SPOT_PS_GREEN.png create mode 100644 apps/dm/public/images/map/layericon/SWL_SPOT_PS_GREY.png create mode 100644 apps/dm/public/images/map/layericon/SWL_SPOT_PS_RED.png create mode 100644 apps/dm/public/images/map/layericon/SWL_VENT_PS.png create mode 100644 apps/dm/public/images/map/layericon/TL_SPBD_ENTRC.png create mode 100644 apps/dm/public/images/map/layericon/TL_SPGF_LOC.png create mode 100644 apps/dm/public/images/map/layericon/TL_SPOT_NOIN.png create mode 100644 apps/dm/public/images/map/layericon/TL_SPRD_BANO.png create mode 100644 apps/dm/public/images/map/layericon/TL_SPRD_CRSRD.png create mode 100644 apps/dm/public/images/map/layericon/TL_SPRD_NONM.png create mode 100644 apps/dm/public/images/map/layericon/TL_SPRD_RENM.png create mode 100644 apps/dm/public/images/map/layericon/TL_SPRD_RWNM.png create mode 100644 apps/dm/public/images/map/layericon/UFL_BMAN_PS.png create mode 100644 apps/dm/public/images/map/layericon/UFL_BOPC_PS.png create mode 100644 apps/dm/public/images/map/layericon/UFL_BPIP_PS.png create mode 100644 apps/dm/public/images/map/layericon/UFL_BPOL_PS.png create mode 100644 apps/dm/public/images/map/layericon/UFL_BTRS_PS.png create mode 100644 apps/dm/public/images/map/layericon/UFL_GMNT_PS.png create mode 100644 apps/dm/public/images/map/layericon/UFL_GPIP_PS.png create mode 100644 apps/dm/public/images/map/layericon/UFL_GPRS_PS.png create mode 100644 apps/dm/public/images/map/layericon/UFL_GVAL_PS.png create mode 100644 apps/dm/public/images/map/layericon/UFL_KMAN_PS.png create mode 100644 apps/dm/public/images/map/layericon/UFL_KPOL_PS.png create mode 100644 apps/dm/public/images/map/layericon/UFL_VALV_PS.png create mode 100644 apps/dm/public/images/map/layericon/WTL_FIRE_PS.png create mode 100644 apps/dm/public/images/map/layericon/WTL_FLOW_PS.png create mode 100644 apps/dm/public/images/map/layericon/WTL_MANH_PS.png create mode 100644 apps/dm/public/images/map/layericon/WTL_META_PS.png create mode 100644 apps/dm/public/images/map/layericon/WTL_PIPE_PS.png create mode 100644 apps/dm/public/images/map/layericon/WTL_RSRV_PS.png create mode 100644 apps/dm/public/images/map/layericon/WTL_RSRV_PS_BLACK.png create mode 100644 apps/dm/public/images/map/layericon/WTL_RSRV_PS_GRAY.png create mode 100644 apps/dm/public/images/map/layericon/WTL_RSRV_PS_GREEN.png create mode 100644 apps/dm/public/images/map/layericon/WTL_RSRV_PS_ORANGE.png create mode 100644 apps/dm/public/images/map/layericon/WTL_RSRV_PS_PURPLE.png create mode 100644 apps/dm/public/images/map/layericon/WTL_RSRV_PS_RED.png create mode 100644 apps/dm/public/images/map/layericon/WTL_RSRV_PS_YELLOW.png create mode 100644 apps/dm/public/images/map/layericon/WTL_VALV_PS.png create mode 100644 apps/dm/public/images/map/layericon/default.png create mode 100644 apps/dm/public/images/map/layericon/reset.png create mode 100644 apps/dm/public/images/map/toolbar/arrow_down.png create mode 100644 apps/dm/public/images/map/toolbar/arrow_right.png create mode 100644 apps/dm/public/images/map/toolbar/backward_icon.png create mode 100644 apps/dm/public/images/map/toolbar/btn_cont_area.png create mode 100644 apps/dm/public/images/map/toolbar/btn_cont_area_on.png create mode 100644 apps/dm/public/images/map/toolbar/btn_cont_next.png create mode 100644 apps/dm/public/images/map/toolbar/btn_cont_next_on.png create mode 100644 apps/dm/public/images/map/toolbar/btn_cont_prev.png create mode 100644 apps/dm/public/images/map/toolbar/btn_cont_prev_on.png create mode 100644 apps/dm/public/images/map/toolbar/btn_cont_print.png create mode 100644 apps/dm/public/images/map/toolbar/btn_cont_print_on.png create mode 100644 apps/dm/public/images/map/toolbar/btn_cont_ruler.png create mode 100644 apps/dm/public/images/map/toolbar/btn_cont_ruler_on.png create mode 100644 apps/dm/public/images/map/toolbar/btn_cont_save.png create mode 100644 apps/dm/public/images/map/toolbar/btn_cont_save_on.png create mode 100644 apps/dm/public/images/map/toolbar/btn_cont_sketch.png create mode 100644 apps/dm/public/images/map/toolbar/btn_cont_sketch_on.png create mode 100644 apps/dm/public/images/map/toolbar/btn_cont_zoomin.png create mode 100644 apps/dm/public/images/map/toolbar/btn_cont_zoomin_on.png create mode 100644 apps/dm/public/images/map/toolbar/btn_cont_zoomout.png create mode 100644 apps/dm/public/images/map/toolbar/btn_cont_zoomout_on.png create mode 100644 apps/dm/public/images/map/toolbar/btn_edit_add.png create mode 100644 apps/dm/public/images/map/toolbar/btn_edit_add_on.png create mode 100644 apps/dm/public/images/map/toolbar/btn_edit_del.png create mode 100644 apps/dm/public/images/map/toolbar/btn_edit_del_on.png create mode 100644 apps/dm/public/images/map/toolbar/btn_edit_next.png create mode 100644 apps/dm/public/images/map/toolbar/btn_edit_next_on.png create mode 100644 apps/dm/public/images/map/toolbar/btn_edit_prev.png create mode 100644 apps/dm/public/images/map/toolbar/btn_edit_prev_on.png create mode 100644 apps/dm/public/images/map/toolbar/btn_edit_save.png create mode 100644 apps/dm/public/images/map/toolbar/btn_edit_save_on.png create mode 100644 apps/dm/public/images/map/toolbar/btn_edit_slt.png create mode 100644 apps/dm/public/images/map/toolbar/btn_edit_slt_on.png create mode 100644 apps/dm/public/images/map/toolbar/btn_edit_snap.png create mode 100644 apps/dm/public/images/map/toolbar/btn_edit_snap_on.png create mode 100644 apps/dm/public/images/map/toolbar/close_icon.png create mode 100644 apps/dm/public/images/map/toolbar/ico_gis_sprite.png create mode 100644 apps/dm/public/images/map/toolbar/icon-viewclose.png create mode 100644 apps/dm/public/images/map/toolbar/img_base_map.png create mode 100644 apps/dm/public/images/map/toolbar/img_network_map.png create mode 100644 apps/dm/public/images/map/toolbar/img_road_map.png create mode 100644 apps/dm/public/images/map/toolbar/img_settle_map.png create mode 100644 apps/dm/public/images/map/toolbar/loading.gif create mode 100644 apps/dm/public/images/map/toolbar/map_pin.png create mode 100644 apps/dm/public/images/map/toolbar/toggle_off.png create mode 100644 apps/dm/public/images/map/toolbar/toggle_on.png create mode 100644 pnpm-lock.yaml diff --git a/apps/dm/.env.local b/apps/dm/.env.local index 0b14165fd..106493928 100644 --- a/apps/dm/.env.local +++ b/apps/dm/.env.local @@ -1,19 +1,16 @@ NEXT_PUBLIC_SITE_ID = DM +NEXT_PUBLIC_CLAIM_NAME = Authorization +NEXT_PUBLIC_AUTH_USER_ID = token-id +NEXT_PUBLIC_ACCESS_TOKEN = access-token +NEXT_PUBLIC_REFRESH_TOKEN = refresh-token NEXT_PUBLIC_PORT = 11035 NEXT_PUBLIC_PROXY_HOST = http://con.mind-one.co.kr:11035 NEXT_PUBLIC_SERVER_API_URL = http://con.mind-one.co.kr:11080/api/v1 NEXT_PUBLIC_FO_SERVER_API_URL = http://con.mind-one.co.kr:11082/api/v1 NEXT_PUBLIC_CS_SERVER_API_URL = http://dev.onasys.co.kr:8000 NEXT_PUBLIC_CS_TUS_UPLOAD = /attach-service/api/v1/tus/upload -NEXT_PUBLIC_CLAIM_NAME = Authorization -NEXT_PUBLIC_AUTH_USER_ID = token-id -NEXT_PUBLIC_ACCESS_TOKEN = access-token -NEXT_PUBLIC_REFRESH_TOKEN = refresh-token - - - NEXT_PUBLIC_SEWERAGE_API_URL=http://con.mind-one.co.kr:11083/sewerage-service/api # 개발 서버 API -# NEXT_PUBLIC_SEWERAGE_API_URL=http://192.168.1.128:8883/sewerage-service/api # 최용성 +#NEXT_PUBLIC_SEWERAGE_API_URL=http://192.168.1.128:8883/sewerage-service/api # 최용성 #NEXT_PUBLIC_SEWERAGE_API_URL=http://192.168.1.66:8883/sewerage-service/api # 박이정 diff --git a/apps/dm/app/pages/map/popup/sdmInfoMap.tsx b/apps/dm/app/pages/map/popup/sdmInfoMap.tsx new file mode 100644 index 000000000..21b76f943 --- /dev/null +++ b/apps/dm/app/pages/map/popup/sdmInfoMap.tsx @@ -0,0 +1,132 @@ +"use client"; + +import Gis from "@common/business_components/ui/map/Gis"; +import { useEffect, useRef, useState, useCallback } from "react"; +import { mapService } from "../service"; +import GisApp from "@common/business_components/ui/map/lib/gis.core"; + +const Map = () => { + const [treeData, setTreeData] = useState([]); // 초기값을 객체 또는 null로 설정 + const gisMaps = useRef(null); + const [isOpen, setIsOpen] = useState(false); // 팝업 열기/닫기 상태 + const [isSearchModalOpen, setIsSearchModalOpen] = useState(true); // SearchModal 열림 상태 + const [featureData, setFeatureData] = useState(null); // 선택된 피쳐 데이터 + const [checkedLayers, setCheckedLayers] = useState([]); + const [checkedLayersData, setCheckedLayersData] = useState([]); + + const fetchData = async () => { + try { + const response = await mapService.getLyrStngs(); + setTreeData(response); // API 응답 저장 + } catch (error) { + console.error("데이터 불러오기 실패:", error); + } + }; + + // 팝업 닫기 핸들러를 useCallback으로 메모이제이션 + const handlePopupClose = useCallback(() => { + setIsOpen(false); + setFeatureData(null); + }, []); + + // 컴포넌트 마운트 시 1회 실행 + useEffect(() => { + fetchData(); + }, []); + + // 체크된 레이어 정보를 받는 핸들러 + const handleCheckedLayersChange = ( + checkedIds: string[], + checkedNodesData: any[] + ) => { + setCheckedLayers(checkedIds); + setCheckedLayersData(checkedNodesData); + }; + + // SearchModal, GisContent 등에서 호출 + const onFeatureSelect = (data: any) => { + const map = gisMaps.current; + if (!map) { + console.warn("지도가 초기화되지 않았습니다."); + return; + } + + // 항상 같은 select 객체 사용 + const select = GisApp.Module.select as any; + if (!select) return; + + // 1. 기존 선택 초기화 + select.resetSelectedFeature(); + + // 2. data가 OpenLayers Feature 인스턴스인지 확인 + let foundFeature: any = null; + if ( + data && + typeof data.getGeometry === "function" && + typeof data.setStyle === "function" + ) { + // 이미 Feature 인스턴스라면 그대로 사용 + foundFeature = data; + } else { + // 아니면 featureId로 맵에서 Feature 인스턴스를 찾아서 사용 + const featureId = data.fid || data.ftrIdn || data.id; + map + .getLayers() + .getArray() + .forEach((layer: any) => { + const source = layer.getSource?.(); + if (source?.getFeatureById) { + const feature = source.getFeatureById(String(featureId).trim()); + if (feature) foundFeature = feature; + } + }); + } + + // 3. 피처 선택 + if (foundFeature) { + const geometry = foundFeature.getGeometry(); + if (geometry) { + const extent = geometry.getExtent(); + + map.getView().fit(extent, { + duration: 300, + padding: [50, 50, 50, 50], + maxZoom: 16, + constrainResolution: true, + nearest: true, + }); + } + select.selectFeature(foundFeature, true); + } else { + console.warn("OpenLayers Feature를 찾을 수 없습니다:", data); + } + + setFeatureData(data); + setIsOpen(true); + setIsSearchModalOpen(false); + }; + + return ( +
+ +
+ ); +}; + +export default Map; diff --git a/apps/dm/app/pages/map/popup/windowPotal.tsx b/apps/dm/app/pages/map/popup/windowPotal.tsx new file mode 100644 index 000000000..e601e7c9c --- /dev/null +++ b/apps/dm/app/pages/map/popup/windowPotal.tsx @@ -0,0 +1,94 @@ +import React, { useState, useEffect, useRef, useCallback } from 'react'; +import { createPortal } from 'react-dom'; + +// 현재 문서의 스타일(CSS)을 새 창으로 복사하는 함수 +const copyStyles = (sourceDoc: Document, targetDoc: Document) => { + Array.from(sourceDoc.styleSheets).forEach(styleSheet => { + try { + if (styleSheet.cssRules) { //