diff --git a/src/main/java/geoinfo/main/main/MainController.java b/src/main/java/geoinfo/main/main/MainController.java index 2952e393..70b59cd0 100644 --- a/src/main/java/geoinfo/main/main/MainController.java +++ b/src/main/java/geoinfo/main/main/MainController.java @@ -2220,7 +2220,7 @@ public class MainController filePath = filePath.replaceAll("\\|1\\|", "/"); filePath = filePath.replaceAll("\\|2\\|", "."); } - + System.out.println("실제 파일 다운로드를 처리하는 최종 파일경로 ::: " + path + filePath); File file = new File(path + filePath); int filesize = (int) file.length(); if (filesize > 0) diff --git a/src/main/webapp/WEB-INF/views/body/join/postcode_new.jsp b/src/main/webapp/WEB-INF/views/body/join/postcode_new.jsp index cad672cf..65459f67 100644 --- a/src/main/webapp/WEB-INF/views/body/join/postcode_new.jsp +++ b/src/main/webapp/WEB-INF/views/body/join/postcode_new.jsp @@ -12,7 +12,6 @@ //document.domain = "abc.go.kr"; function init(){ - var url = location.href; var confmKey = "U01TX0FVVEgyMDE4MDYxNTExMTczMTEwNzk0NjQ=";//승인키 // resultType항목 추가(2016.10.06) diff --git a/src/main/webapp/WEB-INF/views/home/index.jsp b/src/main/webapp/WEB-INF/views/home/index.jsp index f4afa48f..1616d6b6 100644 --- a/src/main/webapp/WEB-INF/views/home/index.jsp +++ b/src/main/webapp/WEB-INF/views/home/index.jsp @@ -497,7 +497,7 @@ <%-- --%> - + 지반정보 입력
프로그램 메뉴얼
(PDF파일)
diff --git a/src/main/webapp/WEB-INF/views/map/index.jsp b/src/main/webapp/WEB-INF/views/map/index.jsp index bd1649c0..3ef1d84b 100644 --- a/src/main/webapp/WEB-INF/views/map/index.jsp +++ b/src/main/webapp/WEB-INF/views/map/index.jsp @@ -275,6 +275,10 @@ function LoadingShow() { 관정 +
  • + 급경사지 +
  • diff --git a/src/main/webapp/body/join/postcode_new.jsp b/src/main/webapp/body/join/postcode_new.jsp index 2d853671..96997467 100644 --- a/src/main/webapp/body/join/postcode_new.jsp +++ b/src/main/webapp/body/join/postcode_new.jsp @@ -12,7 +12,7 @@ String inputYn = request.getParameter("inputYn"); String roadFullAddr = request.getParameter("roadFullAddr"); String roadAddrPart1 = request.getParameter("roadAddrPart1"); - String roadAddrPart2 = request.getParameter("roadAddrPart2"); + String roadAddrPart2 = request.getParameter("roadAddrPart2"); String engAddr = request.getParameter("engAddr"); String jibunAddr = request.getParameter("jibunAddr"); String zipNo = request.getParameter("zipNo"); @@ -47,8 +47,8 @@ function init(){ var confmKey = "U01TX0FVVEgyMDE4MDYxNTExMTczMTEwNzk0NjQ=";//승인키 // resultType항목 추가(2016.10.06) var resultType = "4"; // 도로명주소 검색결과 화면 출력유형, 1 : 도로명, 2 : 도로명+지번, 3 : 도로명+상세건물명, 4 : 도로명+지번+상세건물명 - <%-- var inputYn= "<%=inputYn%>"; --%> - var inputYn= ''; + var inputYn= "<%=inputYn%>"; + //var inputYn= ''; if(inputYn != "Y"){ document.form.confmKey.value = confmKey; document.form.returnUrl.value = url; @@ -62,10 +62,17 @@ function init(){ , "<%=jibunAddr%>","<%=zipNo%>", "<%=admCd%>", "<%=rnMgtSn%>", "<%=bdMgtSn%>", "<%=detBdNmList%>" , "<%=bdNm%>", "<%=bdKdcd%>", "<%=siNm%>", "<%=sggNm%>", "<%=emdNm%>", "<%=liNm%>", "<%=rn%>", "<%=udrtYn%>" , "<%=buldMnnm%>", "<%=buldSlno%>", "<%=mtYn%>", "<%=lnbrMnnm%>", "<%=lnbrSlno%>", "<%=emdNo%>"); --%> - opener.jusoCallBack("","","", "","" + + opener.jusoCallBack("<%=roadFullAddr%>","<%=roadAddrPart1%>","<%=addrDetail%>", "<%=roadAddrPart2%>","<%=engAddr%>" + , "<%=jibunAddr%>","<%=zipNo%>", "<%=admCd%>", "<%=rnMgtSn%>", "<%=bdMgtSn%>", "<%=detBdNmList%>" + , "<%=bdNm%>", "<%=bdKdcd%>", "<%=siNm%>", "<%=sggNm%>", "<%=emdNm%>", "<%=liNm%>", "<%=rn%>", "<%=udrtYn%>" + , "<%=buldMnnm%>", "<%=buldSlno%>", "<%=mtYn%>", "<%=lnbrMnnm%>", "<%=lnbrSlno%>", "<%=emdNo%>"); + <%-- + opener.jusoCallBack("","","", "","" , "","", "", "", "", "" , "", "", "", "", "", "", "", "" , "", "", "", "", "", ""); + --%> window.close(); } diff --git a/src/main/webapp/com/css/map-service.css b/src/main/webapp/com/css/map-service.css index b2e093f7..bf933ac5 100644 --- a/src/main/webapp/com/css/map-service.css +++ b/src/main/webapp/com/css/map-service.css @@ -872,7 +872,9 @@ header .global-link-wrapper { .map-right-btn-group > li .map-right-btn.map-btn-icon-well::before { background: url(../img/map-service/icon/ico_map_right_control_well.png) no-repeat 50% 50%; } - +.map-right-btn-group > li .map-right-btn.map-btn-icon-steep-slope::before { + background: url(../img/map-service/icon/ico_map_right_control_steep_slope.png) no-repeat 50% 50%; +} /* 지도구분 탭 시작 */ diff --git a/src/main/webapp/com/img/map-service/icon/ico_map_right_control_steep_slope.png b/src/main/webapp/com/img/map-service/icon/ico_map_right_control_steep_slope.png new file mode 100644 index 00000000..5d561a50 Binary files /dev/null and b/src/main/webapp/com/img/map-service/icon/ico_map_right_control_steep_slope.png differ diff --git a/src/main/webapp/js/join/join.js b/src/main/webapp/js/join/join.js index 11e04433..1d7e7d46 100644 --- a/src/main/webapp/js/join/join.js +++ b/src/main/webapp/js/join/join.js @@ -1,7 +1,3 @@ -/******************************************************************************* - * ????? ?? ????????o?? - ******************************************************************************/ - function zipsearch() { //window.open("postcode.do", "Addr_Search","toolbar=no,menubar=no,scrollbars=yes,resizable=no,width=460,height=500"); //var pop = window.open("postcode.do","_blank","width=570,height=420, scrollbars=yes, resizable=yes"); diff --git a/src/main/webapp/js/map/main/map.js b/src/main/webapp/js/map/main/map.js index 3b8df58a..ef4101a3 100644 --- a/src/main/webapp/js/map/main/map.js +++ b/src/main/webapp/js/map/main/map.js @@ -308,7 +308,9 @@ var HOLE_LAYER; // 시추공 레이어 var HOLE_LAYER_M; // 시추공 레이어2 var GEOLOGY_LAYER; // 지질도/광물 레이어 var MINERAL_LAYER; // 광물 레이어 -var MINE_LAYER; // 광산 레이어 +var MINE_LAYER; // 광산 레이어 +var WELL_LAYER; // 관정 레이어 +var STEEP_SLOPE_LAYER; // 급경사지 레이어 var HOLE_SELECT; // 시추공 선택 var HOLE_SELECT2; // 3d지반 var HOLE_AREA; // 영역 선택 @@ -784,26 +786,110 @@ function initApp(param){ - // 광산정보 - var mineBaseUrl = "https://apis.data.go.kr/1480523/GeologicalService/getMineWMS" + - "?ServiceKey=L1z0zEpxNLB0Sqwv97WAIyL1lB%2BshPemDLNaG9hy9g3BzbkXRVG2%2FaSTZ7PiAAivgaCYn9p1tLmq2keiC4yFZA%3D%3D" + - "&srs=EPSG%3A3857" + // 정상 동작하는 요청의 버전 - "&format=png" + - "&transparent=true"; - MINE_LAYER = new OpenLayers.Layer.WMS( - "Mine Map", - mineBaseUrl, // 파라미터가 포함된 URL 사용 - {}, // params 객체는 비워둠 - { - isBaseLayer: false, - visibility: false, - singleTile: true, - opacity: 0.7 - } - ); + // ▼▼▼ 광산정보 ▼▼▼ + // 1. Base URL (쿼리 파라미터 제외) + var mineBaseUrl = "https://apis.data.go.kr/1480523/GeologicalService/getMineWMS"; + + // 2. 정적 파라미터 (ServiceKey, srs 등) + var mineParams = { + ServiceKey: "L1z0zEpxNLB0Sqwv97WAIyL1lB+shPemDLNaG9hy9g3BzbkXRVG2/aSTZ7PiAAivgaCYn9p1tLmq2keiC4yFZA==", + srs: "EPSG:3857", + format: "png", + transparent: true + }; + + + MINE_LAYER = new OpenLayers.Layer.Grid( + "Mine Map", + mineBaseUrl, // Base URL + mineParams, // 정적 파라미터 + { + isBaseLayer: false, + visibility: false, + opacity: 0.7, + singleTile: true, // 단일 타일로 요청 + + /** + * getURL 함수를 재정의(override)하여 + * 원하는 URL 형식을 직접 만듭니다. + */ + getURL: function(bounds) { + // 1. 맵의 현재 영역(bounds)을 BBOX 문자열로 변환 + var bbox = bounds.toBBOX(); + + // 2. 맵의 현재 픽셀 크기(width, height) + var size = this.map.getSize(); + + // 3. 기본 URL (mineBaseUrl) + var url = this.url; + + // 4. 정적 파라미터 (ServiceKey, srs, format 등) 복사 + // OpenLayers.Util.extend는 객체를 복사합니다. + var params = OpenLayers.Util.extend({}, this.params); + + // 5. 동적 파라미터 (bbox, width, height) 추가 + params.bbox = bbox; + params.width = size.w; + params.height = size.h; + + // 6. 모든 파라미터를 URL에 조합하여 최종 요청 URL 반환 + // OpenLayers.Util.urlAppend가 ? 와 & 를 알아서 처리해줍니다. + return OpenLayers.Util.urlAppend(url, OpenLayers.Util.getParameterString(params)); + } + } + ); BASE_MAP.addLayer(MINE_LAYER); + // ▲▲▲ 광산정보 ▲▲▲ + + // ▼▼▼ 관정정보 ▼▼▼ + // 1. Base URL (쿼리 파라미터 제외) + var wellBaseUrl = "https://api.vworld.kr/req/wms"; + + // 2. 정적 파라미터 (ServiceKey, srs 등) + var wellParams = { + SERVICE: "WMS", + REQUEST: "GetMap", + VERSION: "1.3.0", + LAYERS: "lt_l_gimsdepth,lt_l_gimspoten,lt_l_gimsdirec", + STYLES: "lt_l_gimsdepth,lt_l_gimspoten,lt_l_gimsdirec", + CRS: "EPSG:3857" + }; + + + WELL_LAYER = new OpenLayers.Layer.Grid( + "Well Map", + wellBaseUrl, // Base URL + wellParams, // 정적 파라미터 + { + isBaseLayer: false, + visibility: false, + opacity: 0.7, + singleTile: true, // 단일 타일로 요청 + + getURL: function(bounds) { + var bbox = bounds.toBBOX(); + var size = this.map.getSize(); + var url = this.url; + var params = OpenLayers.Util.extend({}, this.params); + params.BBOX = bbox; + params.WIDTH = size.w; + params.HEIGHT = size.h; + params.FORMAT = "image/png"; + params.TRANSPARENT = "true"; + params.BGCOLOR = "0xFFFFFF"; + params.EXCEPTIONS = "text/xml"; + params.KEY = "F4C6834D-604A-35C3-8DBE-DFA19631CA14"; + params.DOMAIN = "localhost"; + + return OpenLayers.Util.urlAppend(url, OpenLayers.Util.getParameterString(params)); + } + } + ); + BASE_MAP.addLayer(WELL_LAYER); + // ▲▲▲ 관정정보 ▲▲▲ + // ▼▼▼ 레이어 순서(Z-index) 조정 코드 ▼▼▼ if (GEOLOGY_LAYER) { // 배경 지도(VWorld)를 가장 아래(index 0)에 둡니다. @@ -812,13 +898,19 @@ function initApp(param){ // 지질도 레이어를 그 위(index 1)에 둡니다. BASE_MAP.setLayerIndex(GEOLOGY_LAYER, 1); - // 광산 레이어를 그 위(index 2)에 둡니다. - BASE_MAP.setLayerIndex(MINE_LAYER, 2); + // 관정 레이어를 가장 위(index 2)로 올립니다. + BASE_MAP.setLayerIndex(WELL_LAYER, 2); + + // 급경사지 레이어를 가장 위(index 3)로 올립니다. + //BASE_MAP.setLayerIndex(STEEP_SLOPE_LAYER, 3); - // 시추공 레이어를 가장 위(index 3)로 올립니다. - BASE_MAP.setLayerIndex(HOLE_LAYER, 3); + // 시추공 레이어를 가장 위(index 5)로 올립니다. + BASE_MAP.setLayerIndex(HOLE_LAYER, 5); + + // 광산 레이어를 그 위(index 6)에 둡니다. + BASE_MAP.setLayerIndex(MINE_LAYER, 6); } - // [추가] 레이어 순서(Z-index) 조정 코드 ▲▲▲ + // ▲▲▲ 레이어 순서(Z-index) 조정 코드 ▲▲▲ var textStyle = new OpenLayers.Style({ // feature의 'attributes' 객체에 있는 속성들을 참조하여 스타일을 동적으로 적용합니다. @@ -3580,6 +3672,19 @@ function initControl(){ if( GEOLOGY_LAYER && GEOLOGY_LAYER.active ) { GEOLOGY_LAYER.deactivate(); } + + if( MINE_LAYER && MINE_LAYER.active ) { + MINE_LAYER.deactivate(); + } + + if( WELL_LAYER && WELL_LAYER.active ) { + WELL_LAYER.deactivate(); + } + + if( STEEP_SLOPE_LAYER && STEEP_SLOPE_LAYER.active ) { + STEEP_SLOPE_LAYER.deactivate(); + } + } function initCoordinateControl(){ @@ -5125,10 +5230,84 @@ function geologyMineral() { function geologyMine() { initControl(); // 다른 컨트롤 상태 초기화 - alert('관산 기능이 곧 오픈됩니다.'); + + // MINE_LAYER가 정상적으로 생성되었는지 확인 + if (!MINE_LAYER) { + console.error("광산 레이어가 초기화되지 않았습니다."); + return; + } + + // 현재 레이어의 표시 상태를 가져옵니다. + var isVisible = MINE_LAYER.getVisibility(); + + if (isVisible ) { + // 레이어가 현재 보이고 있다면, 숨깁니다. + MINE_LAYER.setVisibility(false); + CTL_INFO.setText("지질 Off"); + CTL_INFO.deactivate(); // 정보창도 비활성화 + + removeGeologyLegend(); // 끌 때 범례도 닫습니다. + + } else { + + // 레이어를 보이게 설정하고 강제로 다시 그립니다. + MINE_LAYER.setVisibility(true); + MINE_LAYER.redraw(true); + + // CTL_INFO의 infoDiv가 내부 요소를 absolute 포지셔닝할 수 있도록 'relative'로 설정 + $(CTL_INFO.infoDiv).css("position", "relative"); + + // CTL_INFO 텍스트 설정 시 버튼 HTML을 함께 삽입 + CTL_INFO.setText("광산 On"); + CTL_INFO.activate(); + $("#CTL_INFO").css("bottom", "65px"); + $("#CTL_INFO").css("left", "20px"); + } + + alert('광산은 공개된 데이터가 많지 않습니다. 빨간색 사각형으로 표시됩니다.'); } + +// 관정 보기 버튼 눌렀을 때 호출됨. function geologyWell() { initControl(); // 다른 컨트롤 상태 초기화 - alert('관정 기능이 곧 오픈됩니다.'); + + // WELL_LAYER 가 정상적으로 생성되었는지 확인 + if (!WELL_LAYER) { + console.error("관정 레이어가 초기화되지 않았습니다."); + return; + } + + // 현재 레이어의 표시 상태를 가져옵니다. + var isVisible = WELL_LAYER.getVisibility(); + + if (isVisible ) { + // 레이어가 현재 보이고 있다면, 숨깁니다. + WELL_LAYER.setVisibility(false); + CTL_INFO.setText("관정 Off"); + CTL_INFO.deactivate(); // 정보창도 비활성화 + //removeGeologyLegend(); // 끌 때 범례도 닫습니다. + + } else { + + // 레이어를 보이게 설정하고 강제로 다시 그립니다. + WELL_LAYER.setVisibility(true); + WELL_LAYER.redraw(true); + + // CTL_INFO의 infoDiv가 내부 요소를 absolute 포지셔닝할 수 있도록 'relative'로 설정 + $(CTL_INFO.infoDiv).css("position", "relative"); + + // CTL_INFO 텍스트 설정 시 버튼 HTML을 함께 삽입 + CTL_INFO.setText("관정 On"); + CTL_INFO.activate(); + $("#CTL_INFO").css("bottom", "65px"); + $("#CTL_INFO").css("left", "20px"); + } + alert('관정 정보는 지도를 최대로 확대시에만 보여집니다.'); +} + +//급경사지 버튼 눌렀을 때 호출됨. +function geologySteepSlope() { + initControl(); // 다른 컨트롤 상태 초기화 + alert('급경사지 보기 기능이 곧 오픈됩니다.'); } \ No newline at end of file