var dpMouseX = 0; var dpMouseY = 0; var movement = 0; //Áöµµ ÃʱâÈ­ ½ÃÅ°´Â À̺¥Æ® function MapOnCreate() { //¶óÀ̼¾½º ÆÄÀÏ °æ·Î Map.LicenseInfoPath = defaultLicense; //¸Êµ¥ÀÌŸ Map.DataMan.MapDataPath = defaultMPath; //Å׸¶°æ·Î Map.DataMan.ThemePath = defaultTPath; //±âº»Å׸¶ÆÄÀÏ Map.ThemeMan.FileName = defaultTFile; //±âº» ¾îµå¹ÎÆÄÀÏÁ¤º¸ Map.AdminMan.FileName = defaultAFile; // Map.AdminMan.DrawAdmin = true; //Map.AdminMan.BFileName = defaultBFile; //³ªÄ§¹Ý À̹ÌÁö Map.CompassMan.ImagePath = defaultCIFile; //IndexMapÀ» º¸¿©ÁØ´Ù. Map.IndexMap.Visible = true; //ÁöµµÀÇ »óŸ¦ ÀúÀåÇÑ´Ù. Map.CtrlMan.AutoConditionSave = true; // 200 usec ÀÌ»ó Áöµµ¸¦ ±×¸®´Â ¼Óµµ°¡ ³ÑÀ¸¸é, Image Move¸¦ ÇÑ´Ù. Map.CtrlMan.MapDragMode = 200; // 14 LevelÀ» ³í¸®ÀûÀ¸·Î ³ª´©¾î, 54 Level·Î WheelÀ» ÀÌ¿ëÇØ Á¶Á¤ÇÑ´Ù. Map.CtrlMan.UseDetailLevel = true; //±âÁ¸ÀÇ Á¤º¸¸¦ º¹¿øÇÏ´Â ÇÔ¼ö Map.CtrlMan.RestoreCondition(); //ÁöµµÀ§¿¡ ¹®ÀÚ¸¦ º¸¿©ÁØ´Ù. Map.MapMan.ShowTextHint = 0; // º¸ÀÌ´Â ¹®ÀÚ¸¸ Hint Ç¥½Ã 1(Àüü), 0(º¸ÀÌÁö ¾ÊÀ½) // GIF Image¸¦ »ç¿ëÇÏ´Â °æ¿ì GIFÀÇ AnimationÀ» Á¶ÀýÇÑ´Ù. Map.AnimationInterval = 500; if (Map.CtrlMan.BirdView) { Map.CtrlMan.ViewCenter = 70; } else { Map.CtrlMan.ViewCenter = 50; } // Layer, POI µîÀÇ Ç¥ÃâÀ» »¡¸® ó¸® ÇÒ ¼ö ÀÖ´Ù. Map.TripleBuffered = true; Map.SetFocus(); Map.ShowHint = true; ShowIndexMap(0); //ÄÞº¸¹Ú½º ±âº»¼ÂÆà ChangeAdmin(1, false); // POIÀÇ Image°¡ GIFÀΰæ¿ì ImageÀÇ µÚ¹è°æÀ» °ü¸®ÇÑ´Ù. Map.POIMan.SaveBackImage = 1; //ÁöµµÀ§¿¡ ¿Ã·Á³õÀ» À̹ÌÁö¸¦ ¹Ì¸® ¼±¾ð Map.ImageMan.PrepareRotationImage("http://www.smartmap.co.kr/tutorial/image/poi/car.png","car",2, Map.Util.RGBColor(255,0,255)); Map.ImageMan.PrepareImage("http://www.smartmap.co.kr/tutorial/image/poi/taxi.bmp", "start"); Map.ImageMan.PrepareImage("http://www.smartmap.co.kr/tutorial/image/poi/taxi_s.bmp", "player"); Map.ImageMan.PrepareImage("http://www.smartmap.co.kr/tutorial/image/poi/add.gif", "add"); // Map.IndexMap.SetPositionImage("http://www.smartmap.co.kr/tutorial/image/small_balls.bmp", 1); // Progress Bar ¼³Á¤ // Map.UIMan.ProgressBar_Visible = true; // Map.UIMan.ProgressBar_Type = 1; // Graphic // Map.MapMan.UseMinMaxLevelText = 1; } //Áöµµ »óź¯°æ½Ã È£ÃâµÇ´Â ÇÔ¼ö function MapOnStateChange(Type, Value) { if (Type == Map.Util.ConstToValue("SMSC_LEVEL")) { DrawLevel(); } else if (Type == Map.Util.ConstToValue("SMSC_ZOOM")) { } else if (Type == Map.Util.ConstToValue("SMSC_DISPSIZE")) { ShowIndexMap(0); } else if (Type == Map.Util.ConstToValue("SMSC_INDEXMAP")) { ChangeIndexMap(Value); } } function MapOnPopupMenu(Index, Caption, Contents) { var vector = Map.PopupMenu.PopupPoint; var coord = Map.DPToCoord(vector.X, vector.Y); if (Index < 10) { // °´Ã¼ ¸Þ´º if (Map.CtrlMan.Mode == Map.Util.ConstToValue("SMM_ManMode")) { var obj = Map.LayerMan.HitTest(vector.X, vector.Y, true); if (obj != null) { if (obj.Type == Map.Util.ConstToValue("SMOT_POLYGON")) { // var polygon = Map.LayerMan.CastToPolygon(obj); var polygon = obj; if (Index == 1) { polygon.SeparateLine(vector.X, vector.Y); } else if (Index == 2) { polygon.DeleteDPPoint(vector.X, vector.Y); } else if (Index == 3) { Map.LayerMan.DeleteObject2(obj); } } } } } else { if (Contents != "") { eval(Contents); } } } //Áöµµ À§¿¡¼­ ¸¶¿ì½º À̵¿½Ã ¹ß»ýÇÏ´Â À̺¥Æ® function MapOnMouseMove(Shift, X, Y) { dpMouseX = X; dpMouseY = Y; var coord = Map.DPToCoord(X, Y); Map.AdminMan.SetAdminPos(coord.tmX, coord.tmY); var lon = Map.Util.TrimRight(coord.StrLon, ".") + "¡È"; // ¼Ò¼öÁ¡ Ãʸ¦ »èÁ¦ÇÑ´Ù. var lat = Map.Util.TrimRight(coord.StrLat, ".") + "¡È"; // ¼Ò¼öÁ¡ Ãʸ¦ »èÁ¦ÇÑ´Ù. var adminname = ""; if (Map.AdminMan.InAdmin) { adminname = Map.Util.ReplaceStr(Map.AdminMan.AdminName, "/", " "); } //coord = BesselTOWGS84(coord); //var tmpX = coord.StrLon; //var tmpY = coord.StrLat; tmpX = coord.tmX; tmpY = coord.tmY; //window.status='°æµµ:'+tmpX+'('+coord.DegreeLon.toString().substring(0, 12)+') À§µµ:'+tmpY+'('+coord.DegreeLat.toString().substring(0, 12)+') ÁÖ¼Ò:'+adminname;return true; window.status = 'ÁÖ¼Ò :' + adminname; } function MapOnMouseUp(Button, Shift, X, Y) { if (Button == Map.Util.ConstToValue("mbRight")) { var menu = Map.PopupMenu; var idx = 0; menu.Clear(); menu.SetImageList("http://www.eksys.co.kr/map/image/popupimage.bmp", 16, 16, Map.Util.RGBCOLOR(255, 0, 255)); if (Map.ActiveMan && Map.ActiveMan.ManName == "LayerMan") { var obj = Map.LayerMan.HitTest(X, Y, true); if (obj && obj.Type == Map.Util.ConstToValue("SMOT_POLYGON")) { menu.NewMenuItem(1, -1, "¼±³ª´©±â", -1, "Layer_SepLine()"); menu.NewMenuItem(2, -1, "Á¡ »èÁ¦", -1, "Layer_DeletePos()"); menu.NewMenuItem(3, -1, "°´Ã¼ »èÁ¦", -1, "Layer_Delete()"); menu.NewMenuItem(4, -1, "-", -1, ""); var hr = obj.HitTest(X, Y); if (hr == Map.Util.ConstToValue("SMHR_LINE")) { menu.SetEnabled(2, false); } else if (hr == Map.Util.ConstToValue("SMHR_IN")) { menu.SetEnabled(1, false); menu.SetEnabled(2, false); } else if (hr >= 0) { menu.SetEnabled(1, false); } } } menu.NewMenuItem(10, -1, "Áöµµ È®´ë", 1, "ZoomIn()"); menu.NewMenuItem(11, -1, "Áöµµ Ãà¼Ò", 2, "ZoomOut()"); menu.NewMenuItem(12, -1, "Áöµµ ȸÀü", 3, "Rotate()"); menu.NewMenuItem(-1, -1, "-", -1, ""); menu.NewMenuItem(20, -1, "Á¶¸Á º¸±â", 9, "BirdView()"); menu.NewMenuItem(21, -1, "ÀÔü º¸±â", 10, "View3D()"); menu.NewMenuItem(-1, -1, "-", -1, ""); menu.NewMenuItem(30, -1, "°Å¸® °è»ê", 11, "CheckDistance()"); menu.NewMenuItem(31, -1, "¸éÀû °è»ê", 12, "CheckArea()"); menu.NewMenuItem(32, -1, "°´Ã¼ ÆíÁý", 13, "ObjectModify()"); menu.NewMenuItem(33, -1, "°Å¸®/¸éÀû »èÁ¦", 14, "DelDistance()"); menu.NewMenuItem(-1, -1, "-", -1, ""); idx = menu.NewMenuItem(40, -1, "º¸³»±â", -1, ""); menu.NewMenuItem(41, idx, "Ŭ¸³º¸µå º¹»ç", 16, "CopyToClipboard()"); menu.NewMenuItem(42, idx, "Áöµµ ÀúÀåÇϱâ", 17, "javascript:SaveImage(1)"); menu.NewMenuItem(-1, -1, "-", -1, ""); menu.NewMenuItem(50, -1, "ÇàÁ¤µ¿ Æú¸®°ï", -1, "AdminPolygon(1, coord.Lon, coord.Lat)"); menu.NewMenuItem(-1, -1, "-", -1, ""); idx = menu.NewMenuItem(90, -1, "¼³Á¤", -1, ""); menu.NewMenuItem(91, idx, "»öÀÎÁöµµ º¸±â", -1, "ShowIndexMap(-2)"); menu.NewMenuItem(92, idx, "¹Ý°æ º¸±â", -1, "ToggleThemeMisc(126)"); menu.NewMenuItem(-1, -1, "-", -1, ""); idx = menu.NewMenuItem(2000, -1, "Å׸¶ °ü¸®", -1, ""); menu.NewMenuItem(2100, idx, "°ü¸®Ã¢ º¸±â", -1, "Map.ThemeMan.ShowForm()"); if (Map.IndexMap.Visible) menu.SetChecked(91, true); menu.PopupMenu(X, Y); } else if (Button == Map.Util.ConstToValue("mbLeft")) { if (Map.AdminMan.InAdmin) { var code = Map.AdminMan.AdminCode; // 10ÀÚ¸® - µµ(2ÀÚ¸®), ±¸(3ÀÚ¸®), µ¿(5ÀÚ¸®) var tcode= code.substring(0, 2); if (tcode != AdminDo.value) { for (i = 0; i < AdminDo.length; i++) { if (AdminDo.options[i].value == tcode) { AdminDo.options[i].selected = true; break; } } if (AdminDo.value != "") ChangeAdmin(1, false); } tcode = code.substring(0, 5); if (tcode != AdminGu.value) { for (i = 0; i < AdminGu.length; i++) { if (AdminGu.options[i].value == tcode) { AdminGu.options[i].selected = true; break; } } if (AdminGu.value != "") ChangeAdmin(2, false); } tcode = code; if (tcode != AdminGu.value) { for (i = 0; i < AdminDong.length; i++) { if (AdminDong.options[i].value == tcode) { AdminDong.options[i].selected = true; break; } } } } else { AdminDo.value = ""; AdminGu.options.length = 0; AdminGu.options[0] = new Option("--¼±ÅÃ--", ""); AdminDong.options.length = 0; AdminDong.options[0] = new Option("--¼±ÅÃ--", ""); } } } //Áö¿ªÀ̵¿ÄÞº¸¹Ú½ºÅ¬¸¯½Ã È£ÃâµÇ´Â ÇÔ¼ö function ChangeAdmin(Type, IsEvent) { if (Type == 0) { AdminDo.options.length = 0; var adminlist = Map.AdminMan.GetAdminList("", false); // No name sort for (i=0; i < adminlist.Count; i++) { var value = adminlist.Value(i); var oOption = document.createElement("OPTION"); oOption.text = value.String2; oOption.value = value.String1; AdminDo.add(oOption); } AdminDo.selectedIndex = 0; ChangeAdmin(1, false); Map.SetFocus(); } else if (Type == 1) { if (AdminDo.value == "") { AdminGu.options.length = 0; AdminGu.options[0] = new Option("--¼±ÅÃ--", ""); AdminDong.options.length = 0; AdminDong.options[0] = new Option("--¼±ÅÃ--", ""); } else if (AdminDo.options.length > 0) { AdminGu.options.length = 0; var adminlist = Map.AdminMan.GetAdminList(AdminDo.options[AdminDo.selectedIndex].value, true); // name sort // alert(AdminDo.options[AdminDo.selectedIndex].value); for (i=0; i < adminlist.Count; i++) { var value = adminlist.Value(i); var oOption = document.createElement("OPTION"); oOption.text = value.String2; oOption.value = value.String1; AdminGu.add(oOption); } AdminGu.selectedIndex = 0; ChangeAdmin(2, false); if (IsEvent) { Map.AdminMan.GotoAdmin(AdminDo.options[AdminDo.selectedIndex].value, true); Map.SetFocus(); } } } else if (Type == 2) { if (AdminGu.options.length > 0) { AdminDong.options.length = 0; var adminlist = Map.AdminMan.GetAdminList(AdminGu.options[AdminGu.selectedIndex].value, true); // name sort for (i=0; i < adminlist.Count; i++) { var value = adminlist.Value(i); var oOption = document.createElement("OPTION"); oOption.text = value.String2; oOption.value = value.String1; AdminDong.add(oOption); } AdminDong.selectedIndex = 0; if (IsEvent) { Map.AdminMan.GotoAdmin(AdminGu.options[AdminGu.selectedIndex].value, true); Map.SetFocus(); } } } else if (Type == 3) { if (AdminDong.options.length > 0) { if (IsEvent) { Map.AdminMan.GotoAdmin(AdminDong.options[AdminDong.selectedIndex].value, true); Map.AdminMan.AdminCode = AdminDong.options[AdminDong.selectedIndex].value; var center; center = Map.AdminMan.AdminCenter; Map.SetFocus() } } } } //indexmap È£ÃâµÇ´Â ÇÔ¼ö // 1 (Show), 0 (Reposition), -1 (Hide) function ShowIndexMap(Value) { var indexmap = Map.IndexMap; if (!indexmap.UseDefaultPos) { if (Value == -2) { // Toggle indexmap.Visible = !indexmap.Visible; } else { if (Value != 0) indexmap.Visible = (Value > 0); } if (indexmap.Visible) { indexmap.Left = Map.Width - indexmap.Width - 10; indexmap.Top = Map.Height - indexmap.Height - 50; if (indexmap.IsIconic) { indexmap.Left -= 2; indexmap.Top -= 2; } } } } function ChangeIndexMap(Value) { if (Value == 5 || Value == 6) { ShowIndexMap(0); } } //ÁÂÇ¥º¯°æ½Ã È£ÃâµÇ´Â ÇÔ¼ö function DoMinToTM(lat,lon) { var coord = Map.Coord; coord.CoordType = 1; coord.DoMinLat = lat; coord.DoMinLon = lon; coord.CoordType = 0; return coord; } //ÁÂÇ¥º¯°æ½Ã È£ÃâµÇ´Â ÇÔ¼ö function TMToDoMin(tmX, tmY) { var coord = Map.Coord; coord.CoordType = 0; coord.tmX = tmX; coord.tmY = tmY; coord.CoordType = 1; return coord; } function BesselTOWGS84(xcoord) { var coord = Map.Coord; coord.CoordType = 0; coord = xcoord; coord.CoordType = 1; return coord; } //À̹ÌÁö·Î º¹»çÇÏ´Â ÇÔ¼ö function CopyToClipboard() { Map.MapImage.CopyToClipboard(); } //À̹ÌÁö·Î ÀúÀåÇÏ´Â ÇÔ¼ö function SaveImage(type) { // OpenDialogµµ °°Àº Çü½ÄÀ¸·Î ó¸®ÇϸéµÊ. if (type == 1) { // Raster Image var path = Map.Util.SaveDialog("À̹ÌÁö ÀúÀå", "C:\\", "MapImage.png", "Windows Bitmap Image (*.bmp)|*.BMP|PNG Image (*.png)|*.PNG|Jpeg Image (*.jpg)|*.JPG"); if (path != "") { Map.MapImage.SaveToFile(path); } } else if (type == 2) { // Meta Image var path = Map.Util.SaveDialog("¸ÞŸ À̹ÌÁö ÀúÀå", "C:\\", "MapImage.emf", "Windows Enhanced Meta Image (*.emf)|*.EMF"); if (path != "") { var image = Map.MapMetaImage(1250/*Width*/, 750/*Height*/, 1, 0); if (image != null) { image.SaveToFile(path); } else { alert("Meta Image¸¦ »ý¼º ÇÒ ¼ö ¾ø½À´Ï´Ù."); } } } } //Áöµµ Áß¾ÓÀ¸·Î À̵¿ÇÏ´Â ÇÔ¼ö function Map_Center(tmX, tmY) { Map.CenterTMX = tmX; Map.CenterTMY = tmY; Map.focus(); } //¹öµåºä·Î º¸´Â ÇÔ¼ö function BirdView() { Map.CtrlMan.BirdView = !Map.CtrlMan.BirdView; if (Map.CtrlMan.BirdView) { Map.CtrlMan.ViewCenter = 70; } else { Map.CtrlMan.ViewCenter = 50; } } //3D·Î º¸´Â ÇÔ¼ö function View3D() { Map.MapMan.Show3DBuilding = !Map.MapMan.Show3DBuilding; } //Áöµµ ȸÀüÇÏ´Â ÇÔ¼ö function Rotate() { if (Map.CtrlMan.RotationAngle != 0) Map.CtrlMan.RotationAngle = 0; else Map.CtrlMan.SetModeRotation(); } //ÀÌÀüÈ­¸éÀ¸·Î À̵¿ÇÏ´Â ÇÔ¼ö function HistoryPrev() { Map.CtrlMan.HistoryPrev(); } //´ÙÀ½È­¸éÀ¸·Î À̵¿ÇÏ´Â ÇÔ¼ö function HistoryNext() { Map.CtrlMan.HistoryNext(); } //ÁÜÀÎÇÏ´Â ÇÔ¼ö function ZoomIn() { if (Map.CtrlMan.Level <= 0) return; Map.CtrlMan.Level = Map.CtrlMan.Level - 1; } //ÁܾƿôÇÏ´Â ÇÔ¼ö function ZoomOut() { if (Map.CtrlMan.Level >= 13) return; Map.CtrlMan.Level = Map.CtrlMan.Level + 1; } //Æú¸®°ï ±×¸®´Â ÇÔ¼ö function DrawPolygon(ColorR, ColorG, ColorB) { var layer = Map.LayerMan.FindLayer(1); if (layer == null) layer = Map.LayerMan.NewLayer(1); if (layer != null) { var obj = layer.NewPolygon(-1); if (obj != null) { obj.Closed = true; obj.StartArrow = 4; // ¿ø obj.EndArrow = 4; // ¸¶¸§¸ð obj.PenStyle = Map.Util.ConstToValue("PS_SOLID"); obj.PenWidth = 1; obj.PenColor = Map.Util.RGBCOLOR(150, 150, 150); obj.Pen2Color = Map.Util.RGBCOLOR(255, 0, 0); obj.BrushStyle = Map.Util.ConstToValue("BS_SOLID"); obj.BrushColor = Map.Util.RGBCOLOR(255, 255, 0); obj.HatchStyle = Map.Util.ConstToValue("HS_FDIAGONAL"); obj.ROP2Mode = Map.Util.ConstToValue("R2_MASKPEN"); obj.EnableStyle = true; Map.LayerMan.SetModeNewObject(); Map.LayerMan.ActiveObject = obj; var mpos = Map.Util.MousePos; mpos.X = 400; mpos.Y = 400; Map.Util.MousePos = mpos; Map.CtrlMan.DisplayMessage("¸¶¿ì½º ¿À¸¥ÂÊ ¹öÆ°À» Ŭ¸¯Çϸé, Á¾·áµË´Ï´Ù.", 10000, true); } } } //Æú¸®¶óÀÎ ±×¸®´Â ÇÔ¼ö function DrawPolyline() { var layer = Map.LayerMan.FindLayer(1); if (layer == null) layer = Map.LayerMan.NewLayer(1); if (layer != null) { var obj = layer.NewPolygon(-1); if (obj != null) { obj.StartArrow = 1; // ¿ø obj.EndArrow = 2; // ¸¶¸§¸ð obj.PenStyle = Map.Util.ConstToValue("PS_SOLID"); obj.PenWidth = 10; obj.PenColor = Map.Util.RGBCOLOR(150, 150, 150); obj.Pen2Style = Map.Util.ConstToValue("PS_SOLID"); obj.Pen2Width = 3; obj.Pen2Color = Map.Util.RGBCOLOR(255, 255, 255); obj.BrushStyle = Map.Util.ConstToValue("BS_SOLID"); obj.BrushColor = Map.Util.RGBCOLOR(255, 255, 0); obj.HatchStyle = Map.Util.ConstToValue("HS_FDIAGONAL"); obj.ROP2Mode = Map.Util.ConstToValue("R2_MASKPEN"); obj.EnableStyle = true; Map.LayerMan.SetModeNewObject(); Map.LayerMan.ActiveObject = obj; var mpos = Map.Util.MousePos; mpos.X = 400; mpos.Y = 400; Map.Util.MousePos = mpos; Map.CtrlMan.DisplayMessage("¸¶¿ì½º ¿À¸¥ÂÊ ¹öÆ°À» Ŭ¸¯Çϸé, Á¾·áµË´Ï´Ù.", 10000, true); } } } //Æú¸®°ï °´Ã¼ »èÁ¦ÇÏ´Â ÇÔ¼ö function RemovePolygon() { var layer = Map.LayerMan.FindLayer(1); if (layer != null) { layer.Clear(); // Layer 1ÀÇ ¸ðµç °´Ã¼¸¦ »èÁ¦ÇÑ´Ù. } } //Æú¸®°ï °´Ã¼ ¼öÁ¤ÇÏ´Â ÇÔ¼ö function ObjectModify() { if (Map.CtrlMan.GetMode() == 0) { Map.LayerMan.SetModeEditLayer(); } else { Map.CtrlMan.SetModeDefault(); } } function CheckArea() { var layer = Map.LayerMan.NewLayer(2); if (layer == null) layer = Map.LayerMan.FindLayer(2); if (layer != null) { var obj = layer.NewPolygon(-1); if (obj != null) { obj.Closed = true; obj.ShowArea = true; obj.PenStyle = Map.Util.ConstToValue("PS_SOLID"); obj.PenWidth = 2; obj.PenColor = Map.Util.RGBCOLOR(255, 0, 0); obj.BrushStyle = Map.Util.ConstToValue("BS_SOLID"); obj.BrushColor = Map.Util.RGBCOLOR(255, 255, 0); obj.HatchStyle = Map.Util.ConstToValue("HS_FDIAGONAL"); obj.ROP2Mode = Map.Util.ConstToValue("R2_MASKPEN"); obj.EnableStyle = true; Map.LayerMan.SetModeNewObject(); Map.LayerMan.ActiveObject = obj; var mpos = Map.Util.MousePos; mpos.X = 400; mpos.Y = 400; Map.Util.MousePos = mpos; } } } function CheckDistance() { var layer = Map.LayerMan.NewLayer(2); if (layer == null) layer = Map.LayerMan.FindLayer(2); if (layer != null) { var obj = layer.NewPolygon(-1); if (obj != null) { obj.caption ="test"; obj.ShowCaption = 0; //obj.ShowDistance = true; obj.StartArrow = 4; // ¿ø obj.EndArrow = 4; // ¸¶¸§¸ð obj.PenStyle = Map.Util.ConstToValue("PS_SOLID"); obj.PenWidth = 2; obj.PenColor = Map.Util.RGBCOLOR(255, 0, 0); obj.BrushStyle = Map.Util.ConstToValue("BS_SOLID"); obj.BrushColor = Map.Util.RGBCOLOR(255, 255, 0); obj.HatchStyle = Map.Util.ConstToValue("HS_FDIAGONAL"); obj.ROP2Mode = Map.Util.ConstToValue("R2_MASKPEN"); obj.EnableStyle = true; Map.LayerMan.SetModeNewObject(); Map.LayerMan.ActiveObject = obj; var mpos = Map.Util.MousePos; mpos.X = 400; mpos.Y = 400; Map.Util.MousePos = mpos; } } } function DelDistance() { var layer = Map.LayerMan.FindLayer(2); if (layer != null) { layer.Clear(); // Layer 2ÀÇ ¸ðµç °´Ã¼¸¦ »èÁ¦ÇÑ´Ù. } } //Å׸¶°ü¸®Ã¢ º¸ÀÌ´Â ÇÔ¼ö function ShowTheme() { Map.ThemeMan.ShowForm(); } //ÁöµµÀ§¿¡ ±Û¾¾º¸ÀÌ´Â ÇÔ¼ö function ViewText() { Map.MapMan.ShowText = !Map.MapMan.ShowText; } //Áöµµ ·¹º§ º¯°æ½Ã À̹ÌÁö ±³Ã¼ÇÏ´Â ÇÔ¼ö function DrawLevel(){ var imgid = "slevel"; var imgname = "z"; for(i=0; i<=13; i++){ num = i; if(num < 10){ num = "0"+i; } if(i == Map.Level) { eval(imgid+num).src = "./image/icon/"+imgname+num+"_on.gif"; } else { eval(imgid+num).src = "./image/icon/"+imgname+num+".gif"; } } }