//-------------------------------------------------------------------------- var mailfile = ""; //-------------------------------------------------------------------------- function GetUrl() { return "http://test.hanimap.co.kr:8080/examples/jsp/"; } //-------------------------------------------------------------------------- function GetMailFile() { return mailfile; } //-------------------------------------------------------------------------- // 초기화 //-------------------------------------------------------------------------- function Init() { if(typeof(Hanimap) == "object") { if(typeof(Hanimap.MapInit) == "function") { Hanimap.MapInit (); } } if(typeof(iList) == "object") { iList.Init (); } } //-------------------------------------------------------------------------- // 움직이는 모드 //-------------------------------------------------------------------------- function MoveMode() { } //-------------------------------------------------------------------------- // 확대 //-------------------------------------------------------------------------- function ZoomIn() { Hanimap.ZoomIn (); } //-------------------------------------------------------------------------- // 축소 //-------------------------------------------------------------------------- function ZoomOut() { Hanimap.ZoomOut (); } //-------------------------------------------------------------------------- // 면젹측정 //-------------------------------------------------------------------------- function SetArea() { Hanimap.SetArea (); } //-------------------------------------------------------------------------- // 거리측정 //-------------------------------------------------------------------------- function SetDistance() { Hanimap.SetDistance (); } //-------------------------------------------------------------------------- // 이전화면 //-------------------------------------------------------------------------- function GoPrev() { Hanimap.GoPrev(); } //-------------------------------------------------------------------------- // 다음화면 //-------------------------------------------------------------------------- function GoNext() { Hanimap.GoNext(); } //-------------------------------------------------------------------------- // 지도저장 //-------------------------------------------------------------------------- function MapSave() { Hanimap.PlugInView ("Saving", true, {HAlign:'Left', VAlign:'Top'}, {HMargin: Hanimap.GetWidth()/2, VMargin: Hanimap.GetHeight()/2} ); Hanimap.PlugInExtCall("Saving", 3); Hanimap.SaveMap(1, GetUrl() + "jpeg.jsp"); } //-------------------------------------------------------------------------- // 지도메일창 //-------------------------------------------------------------------------- function MapMail() { Hanimap.PlugInView ("Saving", true, {HAlign:'Left', VAlign:'Top'}, {HMargin: Hanimap.GetWidth()/2, VMargin: Hanimap.GetHeight()/2} ); Hanimap.SaveMap(2, GetUrl() + "jpeg.jsp"); } //-------------------------------------------------------------------------- // 지도 출력창 //-------------------------------------------------------------------------- function MapPrint() { var Coord = Hanimap.GetCenterCoord(); var level = Hanimap.GetLevel(); var url = "./Popup_Print.html?lk=" + Coord.Lon + "&lat=" + Coord.Lat + "&level=" + level; var w = 780; var h = 700; window.open(url, "", 'width='+w+',height='+h +',toolbar=no,menubar=no,status=no,resizable=no,scrollbars=no'); } //-------------------------------------------------------------------------- // 이벤트 //-------------------------------------------------------------------------- function OnMapSaving(iType, iCnt, iMax) { Hanimap.PlugInExtCall("Saving", 1, iCnt, iMax ); } //-------------------------------------------------------------------------- // 이벤트 //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- function OnFileSaved(iType) { Hanimap.PlugInView ("Saving", false, {HAlign:'Left', VAlign:'Top'}, {HMargin: Hanimap.GetWidth()/2, VMargin: Hanimap.GetHeight()/2} ); if(iType == 0) { alert("지도 이미지가 저장 되었습니다."); } else if(iType == -1) { alert("지도 이미지가 저장이 취소 되었습니다."); } else if(iType == -2) { alert("지도 이미지가 저장되지 않았습니다."); } } function OnMapSaved(iType, iFileName) { if(iType == 1) { Hanimap.PlugInExtCall("Saving", 2, iFileName ); // window.location.href = GetUrl() + iFileName; } else if(iType == 2) { Hanimap.PlugInView ("Saving", false, {HAlign:'Left', VAlign:'Top'}, {HMargin: Hanimap.GetWidth()/2, VMargin: Hanimap.GetHeight()/2} ); var url = "./MapFrame_Event_Mail_Popup.html"; var w = 740; var h = 860; mailfile = iFileName; window.open(url, "mail", 'width='+w+',height='+h +',toolbar=no,menubar=no,status=no,resizable=no,scrollbars=no'); } else if(iType == 10) { Hanimap.PlugInView ("Saving", false, {HAlign:'Left', VAlign:'Top'}, {HMargin: Hanimap.GetWidth()/2, VMargin: Hanimap.GetHeight()/2} ); var aaa = document.getElementById('logtext'); aaa.value = iFileName; } }