//"; // } // // document.getElementById("resDiv").innerHTML = str; // // // userPoints는 TPoint 객체를 담는 배열 // } else if(prevmode==7) { // 타원 정보 // var circle = CongnamulMap.userCircle; // alert("타원이 속한 MBR : " + circle.sPoint.x + ", " + circle.sPoint.y + " ~ " + circle.ePoint.x + ", " + circle.ePoint.y); // } else if(prevmode==7.5) { // 원 정보 // alert("원의 중심 : " + CongnamulMap.circleInfo.point.x + ", " + CongnamulMap.circleInfo.point.y + "\n반지름 : " + CongnamulMap.circleInfo.radius + "m"); // } else if(prevmode==8) { // 사각형 // alert("사각형 정보 좌하단 좌표~우상단 좌표" + CongnamulMap.rectInfo.minx + ", " + CongnamulMap.rectInfo.miny + " ~ " + CongnamulMap.rectInfo.maxx + ", " + CongnamulMap.rectInfo.maxy); // } else if(prevmode==9) { // 텍스트 상자 // alert("텍스트 상자 좌표 : " + CongnamulMap.textInfo.point.x + ", " + CongnamulMap.textInfo.point.y + "\n텍스트 정보 : " + CongnamulMap.textInfo.message); // } // } catch(ex) {} //} // 맵이동시에 필요한것들 function mapMoved() { Set_Serverxy(); Set_clientxy(); // 지역 바뀌기 바인딩 conTactAreaSet(); // 다른검색 4개의 바인딩 searchFourBind(); } // 지도 초기화 function fnReSetting() { var point = new TPoint(495412, 1131562); CongnamulMap.clearOverlay(); CongnamulMap.setCenter(point, 3); } // 줌체인지 일때 등록 아이콘 위치값 바꿔준다. function zoomChanged() { conTactAreaSet(); } function sizeChanged() { //alert("sizeChanged"); } function maptypeChanged() { //alert("maptypeChanged"); } function mapAttributeChanged() { //alert("mapAttributeChanged"); } /** * 지도의 모드 변경 * @param mode * @return */ function setMode(mode) { CongnamulMap.setMode(mode); } /** * 현재 지도의 모드 값 * @return */ function getMode() { alert("mode : " + CongnamulMap.getMode()); } /** * 현재 지도의 중심 좌표 * @return */ function getCenter() { var center = CongnamulMap.getCenter(); alert("중심좌표 : " + center.x + ", " + center.y); } /** * 현재 지도의 영역 * @return */ function getBound() { var bound = CongnamulMap.getBound(); alert("지도 영역 {left : " + bound.left + ", bottom : " + bound.bottom + ", right : " + bound.right + ", top : " + bound.top + "}"); } /** * 현재 지도의 픽셀 사이즈 * @return */ function getSize() { var size = CongnamulMap.getSize(); alert("지도 픽셀 크기 : {width : " + size.width + ", height : " + size.height + "}"); } /** * 지도의 좌표 폭 (너비, 높이) * @return */ function getRealSize(){ var realsize = CongnamulMap.getRealSize(); alert("지도의 좌표 폭 : {너비 : " + realsize.width + ", 높이 : " + realsize.height + "}"); } /** * 지도 레벨 * @return */ function getLevel(){ alert("레벨값 : " + CongnamulMap.getLevel()); } /** * 지도 스케일 값 * @return */ function getScale(){ alert("스케일값 : " + CongnamulMap.getScale()); } /** * 선 그리기 * @return */ function drawLine() { // 선 시작 좌표 var point1 = new TPoint(506072, 1110709); // 선 끝 좌표 var point2 = new TPoint(506799, 1109717); // 선에 대한 옵션 값들 var options = { strokeWeight : "3", // 선 두께 strokeColor : "#f10000", // 선 색상 strokeOpacity : "0.6", // 선 투명도 (1이면 불투명) fillColor1 : "transparent", // 선 채움 (효과 의미 없음 : 그대로 사용 요망) fillOpacity : "0.0", // 선 채움 투명도 (효과 의미 없음 : 그대로 사용 요망) dashStyle : "solid" // 선 스타일 }; //선 그리기 API 실행 (그룹 아이디, 고유 아이디, 시작포인트, 끝 포인트, 옵션) CongnamulMap.drawLine(1, 1, point1, point2, options); //모든 Draw를 한 후에는 redraw를 해줘야만 화면에 나타난다. //여러개를 그릴 경우에는 여러개 draw를 선언한 후에 최종적으로 redraw를 한번만 실행해야 속도가 빠르다. CongnamulMap.redraw(); } /** * 여러개의 연결된 선 (폴리라인) 그리기 * @return */ function drawPolyline() { //여러 포인트 정보를 담은 배열 선언 var points = new Array(); points[points.length] = new TPoint(505000, 1109977); points[points.length] = new TPoint(504857, 1110719); points[points.length] = new TPoint(505499, 1110849); points[points.length] = new TPoint(506687, 1110882); // drawLine과 동일안 옵션 구조 var options = { strokeWeight : "1", strokeColor : "#f100f1", strokeOpacity : "0.6", fillColor1 : "transparent", fillOpacity : "0.0", dashStyle : "solid" }; // 폴리 라인 그리기 (그룹 아이디, 고유 아이디, 포인트좌표들, 옵션) CongnamulMap.drawPolyline(1, 2, points, options); CongnamulMap.drawClickableMark(7, 12, 7, new TPoint(505000, 1109977), "클릭 마크", {x:0, y:5}, "http://blog.hometown.co.kr", {width:300, height:200}); CongnamulMap.redraw(); } /** * 원 그리기 */ function drawCircle() { // 원의 중심 좌표 시정 var center = new TPoint(505997, 1109977); // 원의 반지름을 미터 단위로 지정 var radius = 200; // 원의 옵션 var options = { strokeWeight : "3", // 원 테두리 두께 strokeColor : "#0000f1", // 원의 테두리 색상 strokeOpacity : "0.6", // 원의 테두리 투명도 fillColor1 : "#ff0000", // 원 내부의 채움 색상 fillOpacity : "0.2" // 원 내부의 채움 투명도 (1이면 불투명, 0이면 완전 투명) }; // 원 그리기 API 실행 (그룹 아이디, 고유 아이디, 중심 좌표, 반지름, 옵션) CongnamulMap.drawCircle(2, 3, center, radius, options); CongnamulMap.redraw(); } /** * 타원 그리기 * @return */ function drawOval() { // 타원의 MBR (타원을 포함하는 최소 사각형을 지정) // 사각형 최소 좌표 (좌하단) var minPoint = new TPoint(505997, 1109977); // 사각형 최대 좌표(우상단) var maxPoint = new TPoint(506880, 1110515); // 옵션값은 Circle과 동일 var options = { strokeWeight : "3", strokeColor : "#f10000", strokeOpacity : "0.6", fillColor1 : "#00ff00", fillOpacity : "0.2" }; // 타원 그리기 API 실행 (그룹 아이디, 고유 아이디, 좌하단 좌표, 우상단 좌표, 옵션) CongnamulMap.drawOval(3, 4, minPoint, maxPoint, options); CongnamulMap.redraw(); } /** * 사각형 그리기 * @return */ function drawRect() { // 사각형 최소 좌표 (좌하단) var minPoint = new TPoint(505048, 1109940); // 사각형 최대 좌표(우상단) var maxPoint = new TPoint(506000, 1110500); // 옵션값은 Circle과 동일 var options = { strokeWeight : "3", strokeColor : "#0000f1", strokeOpacity : "0.6", fillColor1 : "#00f100", fillOpacity : "0.2" }; // 사각형 그리기 API 실행 (그룹 아이디, 고유 아이디, 좌하단 좌표, 우상단 좌표, 옵션) CongnamulMap.drawRect(4, 5, minPoint, maxPoint, options); CongnamulMap.redraw(); } /** * 폴리곤 그리기 * @return */ function drawPolygon() { //폴리곤을 구성할 좌표 배열 선언 var points = new Array(); points[points.length] = new TPoint(506333, 1110343); points[points.length] = new TPoint(505498, 1109985); points[points.length] = new TPoint(506278, 1109568); // 옵션값 : circle, rectangle 과 동일 var options = { strokeWeight : "3", strokeColor : "#00ff00", strokeOpacity : "0.6", fillColor1 : "#ffff00", fillOpacity : "0.2" }; // 폴리곤 그리기 API (그룹 아이디, 고유 아이디, 폴리곤 구성 포인트 배열, 옵션) CongnamulMap.drawPolygon(5, 6, points, options); CongnamulMap.redraw(); } /** * 텍스트 넣기 * @return */ function drawText() { // 텍스트가 쓰여질 위치의 좌표 var point = new TPoint(505875, 1110597); // 옵션 값 var options = { backgroundColor : "transparent", // 배경 색상, html color값 fillOpacity : "0", border : "solid 0px #0000ff", // 테두리 설정 fontFamily : "돋움,돋움체,dotum,sans-serif", // 글꼴 설정 fontColor : "#333333", // 글씨 색상 설정 fontSize : "11px", // 글씨 크기 설정 fontWeight : "normal", // 글씨 두께 설정 bold, normal textAlign : "center" // 배열 설정 }; // 텍스트에 쓰여질 문구 var message = "