if (!('vw' in window)) { window.vw = { VERSION : "DEV 2.0.0001" }; } if (!('loader' in window.vw)) { window.vw.loader = {}; } if (!('Exception' in window.vw)) { window.vw.Exception = {}; } if (!("idleproc" in window.vw)) { window.vw.idleproc = {}; } if (!("map" in window.vw.idleproc)){ window.vw.idleproc.map = {}; } vw.loader.APIKEY = 'A8C3652E-CFFD-3590-A8E2-A89CCF0EC947'; vw.loader.HOST3D = 'http://xdworld.vworld.kr'; vw.loader.PORT3D = '8080'; vw.loader.VERSION3D = '/dll_home/version.txt'; vw.loader.WAS3DSERVER = false; vw.loader.FULLURL="http://"+vw.loader.HOST3D+":"+vw.loader.PORT3D,vw.loader.XDCOMCLSID="07782E30-6EFC-4760-BE77-9A8D40FC0E92",vw.loader.XDLANCHCLSID="32AFB3E5-DAC6-458A-85CD-11394D8A251B",vw.loader.VWORLD_EMBED_TYPE="application/npVWorld-Plugin:.VWorld:Scriptability Plugin,version=1.0.0.5",vw.loader._ERROR_STR="",vw.loader._ERROR_CODE=1,vw.loader.OS_WINDOW="win",vw.loader.OS_MAC="mac",vw.loader.OS_LINUX="linux",vw.loader.CURRENT_BROWSER="",vw.loader.BROWSER_IE=0,vw.loader.BROWSER_CHROME=1,vw.loader.BROWSER_FIREFOX=2,vw.loader.BROWSER_SAFARI=3,vw.loader.BROWSER_OPERA=4,vw.loader.BROWSER_MOZILLA=5,vw.loader.BROWSER_NETSCAPE=6,vw.loader.BROWSER_OTHERS=7,vw.loader.DEFAULT_LAYER=["facility_build","hybrid_bound","poi_base","facility_build_lod1","facility_build_lod3","facility_bridge","facility_dokdo","facility_build_world","poi_base_world","poi_road","poi_bound","poi_bound_world"],vw.loader.c_flag=!1,vw.loader._browserCheck=function(){var a=navigator.appName,b=navigator.userAgent,c=window.vw.loader;return""==vw.loader.CURRENT_BROWSER?b.indexOf("Opera")>=0?(vw.loader.CURRENT_BROWSER=c.BROWSER_OPERA,c.BROWSER_OPERA):b.indexOf("Edge")>=0?(vw.loader.CURRENT_BROWSER=c.BROWSER_OTHERS,c.BROWSER_OTHERS):b.indexOf("Mozilla/5.0 (Windows NT 10.0; Win64; x64)")>=0?(vw.loader.CURRENT_BROWSER=c.BROWSER_OTHERS,c.BROWSER_OTHERS):b.indexOf("Firefox")>=0||b.indexOf("Minefield")>=0?(vw.loader.CURRENT_BROWSER=c.BROWSER_FIREFOX,c.BROWSER_FIREFOX):b.indexOf("Chrome")>=0?(vw.loader.CURRENT_BROWSER=c.BROWSER_CHROME,c.BROWSER_CHROME):b.indexOf("Safari")>=0?(vw.loader.CURRENT_BROWSER=c.BROWSER_SAFARI,c.BROWSER_SAFARI):b.indexOf("MSIE")>=0||b.indexOf("Trident")>=0?(vw.loader.CURRENT_BROWSER=c.BROWSER_IE,c.BROWSER_IE):a.indexOf("Mozilla")>=0?(vw.loader.CURRENT_BROWSER=c.BROWSER_MOZILLA,c.BROWSER_MOZILLA):a.indexOf("Netscape")>=0?(vw.loader.CURRENT_BROWSER=c.BROWSER_NETSCAPE,c.BROWSER_NETSCAPE):(vw.loader.CURRENT_BROWSER=c.BROWSER_OTHERS,c.BROWSER_OTHERS):vw.loader.CURRENT_BROWSER},vw.loader._ieVersionCheck=function(){var a,b=navigator.userAgent;return a=b.indexOf("Trident/5.0")>-1?b.indexOf("MSIE 7.0")>-1?1:2:b.indexOf("Trident/4.0")>-1?b.indexOf("MSIE 7.0")>-1?3:4:b.indexOf("Trident/6.0")>-1?b.indexOf("MSIE 7.0")>-1?6:7:b.indexOf("Trident/7.0")>-1?8:5},vw.loader._nsVersionCheck=function(){var a,b,c;return/Chrome/.test(navigator.userAgent)?(a=/Chrome\/([\d\.]+) Safari/.exec(navigator.appVersion)[1],b=/(\d+)\./.exec(a)[1],c=b>31?1:2):/Firefox/.test(navigator.userAgent)?(a=/Firefox\/([\d\.]+)/.exec(navigator.userAgent)[1],b=/(\d+)\./.exec(a)[1],c=3):/Safari/.test(navigator.userAgent)&&(a=/Version\/([\d\.]+) Safari/.exec(navigator.appVersion)[1],b=/(\d+)\./.exec(a)[1],c=4),c},vw.loader._platFormCheck=function(){var a=navigator.userAgent,b=window.vw.loader;return a.indexOf("Windows")>=0?b.OS_WINDOW:(vw.Exception.setErrorCode(vw.Exception.error.UNSUPPORTED_PLATFORM),vw.Exception.setErrorString(vw.Exception.errorStr.UNSUPPORTED_PLATFORM),null)},vw.loader.createInstance=function(a,b,c,d){if(b=b||function(){},c=c||function(){},vw.Exception.setErrorCode(vw.Exception.error.NO_ERROR),vw.Exception.setErrorString(vw.Exception.errorStr.NO_ERROR),"win"!=vw.loader._platFormCheck())return void c(vw.Exception.getErrorString(),vw.Exception.getErrorCode());if(vw.loader._browserCheck()==vw.loader.BROWSER_OTHERS)return vw.Exception.setErrorCode(vw.Exception.error.UNSUPPORTED_BROWER),vw.Exception.setErrorString(vw.Exception.errorStr.UNSUPPORTED_BROWER),void c(vw.Exception.getErrorString(),vw.Exception.getErrorCode());var e;if("string"==typeof a||"String"==typeof a){if(e=document.getElementById(a),null==e)return vw.Exception.setErrorCode(vw.Exception.error.INVALID_DIV_ERROR),vw.Exception.setErrorString(vw.Exception.errorStr.INVALID_DIV_ERROR),void c(vw.Exception.getErrorString(),vw.Exception.getErrorCode())}else{if("object"!=typeof a&&"Object"!=typeof a)return vw.Exception.setErrorCode(vw.Exception.error.INVALID_DIV_ERROR),vw.Exception.setErrorString(vw.Exception.errorStr.INVALID_DIV_ERROR),void c(vw.Exception.getErrorString(),vw.Exception.getErrorCode());var f=a.nodeName.upperCase();if("DIV"!=f&&"SAPN"!=f)return vw.Exception.setErrorCode(vw.Exception.error.INVALID_DIV_ERROR),vw.Exception.setErrorString(vw.Exception.errorStr.INVALID_DIV_ERROR),void c(vw.Exception.getErrorString(),vw.Exception.getErrorCode());e=a}if(vw.loader._mapDiv=e,0==vw.loader._launcherOnLine()&&vw.Exception.setErrorCode(vw.Exception.error.NOT_INIT),vw.loader._createPluginObject(e,"XDcom"),vw.loader.CURRENT_BROWSER==vw.loader.BROWSER_IE)try{new ActiveXObject("XDWorldPlugIn.XDWorldCOM.1")}catch(a){return void vw.loader._openLauncherPage()}else if(0==vw.loader._nsPluginExist())return void vw.loader._openLauncherPage();if(vw.Exception.error.NO_ERROR==vw.Exception.getErrorCode()){vw.loader._create(e,"XDcom");var h=vw.loader._getCFlag();if(!h)return void c(vw.Exception.getErrorString(),vw.Exception.getErrorCode());var i=document.getElementById("XDcom");vw.idleproc._init(e,"XDcom",i,b,c,d)}else c(vw.Exception.getErrorString(),vw.Exception.getErrorCode())},vw.loader._apiCheck=function(a){var b=vw.idleproc.map,c=!0;if(c){var d=b.pluginObject.confirmIssuedKey(a);return vw.loader._browserCheck()==vw.loader.BROWSER_IE&&b.pluginObject.setDataAPI(!0),d?(vw.Exception.setErrorCode(vw.Exception.error.NO_ERROR),vw.Exception.setErrorString(vw.Exception.errorStr.NO_ERROR)):(vw.Exception.setErrorCode(vw.Exception.error.INVALID_API_KEY),vw.Exception.setErrorString(vw.Exception.errorStr.INVALID_API_KEY)),d}return vw.Exception.setErrorCode(vw.Exception.error.INVALID_DOMAIN),vw.Exception.setErrorString(vw.Exception.errorStr.INVALID_DOMAIN),!1},vw.loader._serverStart=function(a,b,c){document.oncontextmenu=function(){return!1};var d=vw.idleproc.map.pluginObject;vw.Exception.error.NO_ERROR==vw.Exception.getErrorCode()?(vw.idleproc.map.div.style.display="inline-block",d.setDefaultServerURL(vw.loader.HOST3D,vw.loader.PORT3D),d.setWASServer(vw.loader.WAS3DSERVER),window.setTimeout(function(){if(!window.vw.loader._apiCheck(window.vw.loader.APIKEY))return b(vw.Exception.getErrorString(),vw.Exception.getErrorCode()),!1;vw.Exception.setErrorCode(vw.Exception.error.NO_ERROR),vw.Exception.setErrorString(vw.Exception.errorStr.NO_ERROR);try{d.getOption().setMetaInfoVisible(vw.Constant.enums.VWVISIBLE_OFF)}catch(a){}for(var e=d.getLayerList(),f=0;f
':vw.loader.CURRENT_BROWSER==vw.loader.BROWSER_CHROME||vw.loader.CURRENT_BROWSER==vw.loader.BROWSER_SAFARI||vw.loader.CURRENT_BROWSER==vw.loader.BROWSER_FIREFOX?n+='
':alert(vw.Exception.errorStr.UNSUPPORTED_BROWER)),"reflash"!=a?vw.loader.CURRENT_BROWSER==vw.loader.BROWSER_IE?(n+='
',n+='
',n+='
',n+='
'):vw.loader.CURRENT_BROWSER==vw.loader.BROWSER_CHROME||vw.loader.CURRENT_BROWSER==vw.loader.BROWSER_SAFARI||vw.loader.CURRENT_BROWSER==vw.loader.BROWSER_FIREFOX?(n+='
',n+='플러그인 설치
',n+='
',n+='설치안내 바로가기
'):alert(vw.Exception.errorStr.UNSUPPORTED_BROWER):"plugin"==a&&(n+='
'),n+="
"},vw.loader._makeDiv=function(a){var b=document.createElement("div");return b.style.position="absolute",b.style.top="0px",b.style.left="0px",b.style.display="none",b.id=a,b},vw.loader._launcherOnLine=function(){var a=!0,b=document.getElementById("launcher");null==b&&(b=window.vw.loader._makeDiv("launcher")),document.body.appendChild(b),window.vw.loader._createLauncherObject(b,"XDLUC");try{vw.Exception.getErrorCode()==vw.Exception.error.NO_ERROR?XDLUC.RunUpdate(vw.loader.HOST3D,vw.loader.PORT3D,vw.loader.VERSION3D):a=!1}catch(b){return a=!1,vw.Exception.setErrorCode(vw.Exception.error.UNABLE_EXCUTE_LANCHER),vw.Exception.setErrorString(vw.Exception.errorStr.UNABLE_EXCUTE_LANCHER),a}return a},vw.loader._createLauncherObject=function(a,b){try{vw.loader.CURRENT_BROWSER==vw.loader.BROWSER_IE&&(a.innerHTML=""),vw.Exception.setErrorCode(vw.Exception.error.NO_ERROR),vw.Exception.setErrorString(vw.Exception.errorStr.NO_ERROR)}catch(a){vw.Exception.setErrorCode(vw.Exception.error.LAUNCHER_NOT_INSTALLED),vw.Exception.setErrorString(vw.Exception.errorStr.LAUNCHER_NOT_INSTALLED)}},window.vw.loader._luncherError=function(){return vw.Exception.setErrorCode(vw.Exception.error.LAUNCHER_NOT_INSTALLED),vw.Exception.setErrorString(vw.Exception.errorStr.LAUNCHER_NOT_INSTALLED),!1},vw.loader._onclickEventHandler=function(){vw.loader.CURRENT_BROWSER==vw.loader.BROWSER_IE?location.href="http://xdworld.vworld.kr:8080/3dgis/launcher/ie/sopLauncherSetup_ie.exe":vw.loader.CURRENT_BROWSER==vw.loader.BROWSER_CHROME||vw.loader.CURRENT_BROWSER==vw.loader.BROWSER_FIREFOX||vw.loader.CURRENT_BROWSER==vw.loader.BROWSER_SAFARI?location.href="http://xdworld.vworld.kr:8080/3dgis/launcher/ns/VWLauncherSetup_ns.exe":alert(vw.Exception.errorStr.UNSUPPORTED_BROWER),window.vw.loader._confirmInstalled("reflash")},vw.loader._goInstallPage=function(){location.href="http://map.vworld.kr/map/po_mapuse_a001.do"},vw.loader._createPluginObject=function(a,b){try{vw.loader.CURRENT_BROWSER==vw.loader.BROWSER_IE?a.innerHTML="":vw.loader._browserCheck()!=vw.loader.BROWSER_OTHERS&&(a.innerHTML=""),vw.Exception.setErrorCode(vw.Exception.error.NO_ERROR),vw.Exception.setErrorString(vw.Exception.errorStr.NO_ERROR)}catch(a){vw.Exception.setErrorCode(vw.Exception.error.CREATE_PLUGIN_ERROR),vw.Exception.setErrorString(vw.Exception.errorStr.CREATE_PLUGIN_ERROR)}},vw.loader._confirmInstalled=function(a){var c,d,e,f,b=vw.loader._mapDiv;c=b.offsetTop,d=b.offsetHeight,e=b.offsetLeft,f=b.offsetWidth;var g=vw.loader._createHTML(a,c,e,f,d,b);b.style.zIndex=0,b.innerHTML=g},vw.loader._pluginError=function(){return vw.Exception.setErrorCode(vw.Exception.error.CREATE_PLUGIN_ERROR),vw.Exception.setErrorString(vw.Exception.errorStr.CREATE_PLUGIN_ERROR),!1},vw.idleproc._init=function(a,b,c,d,e,f){var g=window.vw.idleproc;window.vw.loader;try{"undefined"!=top.window.vw&&null!=top.window.vw&&"undefined"!=top.window.vw.idleproc&&null!=top.window.vw.idleproc||(top.window.vw=window.vw,top.window.vw.idleproc=window.vw.idleproc)}catch(a){}g.setMap(a,b,c),vw.loader._serverStart(d,e,f)},window.vw.idleproc.setMap=function(a,b,c){window.vw.idleproc.map.pluginID=b,window.vw.idleproc.map.div=a,window.vw.idleproc.map.pluginObject=c},vw.Exception.getErrorCode=function(){return vw.loader._ERROR_CODE},vw.Exception.getErrorString=function(){return vw.loader._ERROR_STR},vw.Exception.setErrorCode=function(a){"number"!=typeof a&&"Number"!=typeof a||(window.vw.loader._ERROR_CODE=a)},vw.Exception.setErrorString=function(a){"string"!=typeof a&&"String"!=typeof a||(window.vw.loader._ERROR_STR=a)},vw.Exception.errorStr={NO_ERROR:"정상입니다.",CREATE_PLUGIN_ERROR:"플러그인이 적용되지 않았습니다.",INVALID_DIV_ERROR:"플러그인을 추가할 영역의 아이디가 실제와 다르거나 지정되어 있지 않습니다..",NO_AVAILABLE_ID:"사용할 수 없는 아이디입니다.",UNSUPPORTED_PLATFORM:"플렛폼이 플러그인을 지원하지 않습니다.",UNSUPPORTED_BROWER:"브라우저가 플러그인을 지원하지 않습니다.",LAUNCHER_NOT_INSTALLED:"지도를 사용하시려면 플러그인을 설치해 주십시오.",NOT_INIT:"플러그인이 설치되지 않았습니다.",INVALID_API_KEY:"발행되지 않았거나 인증되지 않은 API 키를 사용하고 있습니다. ",EARTH_NOT_READY:"지도데이터의 로딩에 실패하였습니다.",CREATE_CONNECT_MUTEX:"서버접속을 실패하였습니다.",LAYER_INIT_ERROR:"레이어의 초기화에 실패하였습니다.",CREATE_EARTH_TIMEOUT:"대기시간이 초과되었습니다.",ERR_ETC:"알 수 없는 오류가 발생했습니다.",INVALID_LANCHER_DIV:"런처를 추가할 영역의 아이디가 실제와 다르거나 영역이 지정되어있지 않습니다.",UNABLE_EXCUTE_LANCHER:"브라우저 상단의 알림창에서 [추가기능 실행]이나 [모든 웹페이지에서 추가기능 실행]을 클릭하시면 서비스를 이용하실수 있습니다.",INVALID_DOMAIN:"사용신청한 도메인과 현재 사용중인 도메인이 서로 다릅니다.",UNSUPPORTED_3DMAP:"3D MAP API에서 지원하지 않는 기능입니다.",UNSUPPORTED_YET:"현재 지원하지 않는 기능입니다.",UNSUPPORTED_TYPE:"잘못된 인자형식 입니다.",INVALID_MAP_OBJECT:"MAP 객체가 호출되지 않았습니다."},vw.Exception.error={NO_ERROR:1,CREATE_PLUGIN_ERROR:2,INVALID_DIV_ERROR:3,NO_AVAILABLE_ID:4,UNSUPPORTED_PLATFORM:5,UNSUPPORTED_BROWER:6,LAUNCHER_NOT_INSTALLED:7,NOT_INIT:8,INVALID_API_KEY:9,EARTH_NOT_READY:10,CREATE_CONNECT_MUTEX:11,LAYER_INIT_ERROR:12,CREATE_EARTH_TIMEOUT:13,ERR_ETC:14,INVALID_LANCHER_DIV:15,UNABLE_EXCUTE_LANCHER:16,INVALID_DOMAIN:17,UNSUPPORTED_3DMAP:18,UNSUPPORTED_YET:19,UNSUPPORTED_TYPE:20,INVALID_MAP_OBJECT:21},vw.Constant={},vw.Constant.enums={VWEDITABLE_OFF:289,VWEDITABLE_ON:290,VWKEYBOARD_DOWN:18,VWKEYBOARD_LEFT:19,VWKEYBOARD_RIGHT:20,VWKEYBOARD_ROTATELEFT:25,VWKEYBOARD_ROTATERIGHT:32,VWKEYBOARD_TILTDOWN:24,VWKEYBOARD_TILTUP:23,VWKEYBOARD_UP:17,VWKEYBOARD_ZOOMIN:21,VWKEYBOARD_ZOOMOUT:22,VWNAVIGATION_LARGE:5,VWNAVIGATION_LB:3,VWNAVIGATION_LT:1,VWNAVIGATION_RB:4,VWNAVIGATION_RT:2,VWNAVIGATION_SMALL:6,VWOBJECT_LINESTRING:65538,VWOBJECT_MODEL:65540,VWOBJECT_POINT:65537,VWOBJECT_POLYGON:65539,VWOBJECT_SYMBOL:65541,VWOPTION_DISABLE:4097,VWOPTION_HIGH:4099,VWOPTION_MIDDLE:4098,VWSELECTABLE_OFF:273,VWSELECTABLE_ON:274,VWTEXTSTYLE_EDGE_FILL:1048579,VWTEXTSTYLE_EDGE_LINE:1048578,VWTEXTSTYLE_EDGE_LINEFILL:1048581,VWTEXTSTYLE_EDGE_NONE:1048577,VWTEXTSTYLE_FONT_BOLD:1048593,VWTEXTSTYLE_FONT_ITALIC:1048594,VWTEXTSTYLE_FONT_UNDERLINE:1048596,VWVIEW_FT_GROUND:16777218,VWVIEW_FT_SKY:16777219,VWVIEW_TD_SKY:16777217,VWVISIBLE_AUTO:259,VWVISIBLE_OFF:257,VWVISIBLE_ON:258},vw.Constant.MouseMode={MOVEGRAB:1,INPUTPOINT:20,LINESTRING:21,POLYGON:24,ANAAREA:80,ANADISTANCE:81,ANAABSHEIGHT:83,ANARELHEIGHT:84,LANDSCAPE:85,ANAHEIGHT:86},vw.Util={},vw.Util.Class=function(){var a=arguments.length,b=arguments[0],c=arguments[a-1],d="function"==typeof c.initialize?c.initialize:function(){b.prototype.initialize.apply(this,arguments)};if(a>1){var e=[d,b].concat(Array.prototype.slice.call(arguments).slice(1,a-1),c);vw.Util.inherit.apply(null,e)}else d.prototype=c;return d},vw.Util.inherit=function(a,b){var c=function(){};c.prototype=b.prototype,a.prototype=new c;var d,e,f;for(d=2,e=arguments.length;d7&&(b=9),"#"==a.charAt(0)?a.substring(1,b):a},vw.Util.hexToRgb=function(a){var b,c,d;return a=a.replace("#",""),3!==a.length&&6!==a.length?[255,255,255]:(3==a.length&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),b=parseInt(a.substr(0,2),16),c=parseInt(a.substr(2,2),16),d=parseInt(a.substr(4,2),16),[b,c,d])},vw.Util.rgbToHex=function(a){return a[0]=a[0]>255?255:a[0]<0?0:a[0],a[1]=a[1]>255?255:a[1]<0?0:a[1],a[2]=a[2]>255?255:a[2]<0?0:a[2],this.zeroFill(a[0].toString(16),2)+this.zeroFill(a[1].toString(16),2)+this.zeroFill(a[2].toString(16),2)},vw.Util.zeroFill=function(a,b){return b-=a.toString().length,b>0?new Array(b+(/\./.test(a)?2:1)).join("0")+a:a},vw.Util.idSeq=0,vw.Util.getUniqId=function(a){var b="id_"+a+"_"+vw.Util.idSeq;return vw.Util.idSeq++,b},vw.Util.NullCheckValue=function(a){var b=null;return null!=a&&"undefined"!=a&&(b=a),b},vw.Util.NullCheckBoolean=function(a){var b=!1;return null!=a&&"undefined"!=a&&(b=!0),b},vw.Util.trim=function(a){return a.replace(/\s/g,"")},vw.Util.getDistance=function(a,b){this.deg2rad=function(a){return a*Math.PI/180},this.rad2deg=function(a){return 180*a/Math.PI};var c=a.x-b.x,d=Math.sin(this.deg2rad(a.y))*Math.sin(this.deg2rad(b.y))+Math.cos(this.deg2rad(a.y))*Math.cos(this.deg2rad(b.y))*Math.cos(this.deg2rad(c));return d=Math.acos(d),d=this.rad2deg(d),d=60*d*1.1515,d*=1609.344},vw.Util.getDirect=function(a,b){var c=a.y*(3.141592/180),d=a.x*(3.141592/180),e=b.y*(3.141592/180),f=b.y*(3.141592/180),g=0;g=Math.acos(Math.sin(c)*Math.sin(e)+Math.cos(c)*Math.cos(e)*Math.cos(d-f));var h=Math.acos((Math.sin(e)-Math.sin(c)*Math.cos(g))/(Math.cos(c)*Math.sin(g))),i=0;return i=Math.sin(f-d)<0?h*(180/3.141592):h*(180/3.141592)},vw.Util.getTerrHeight=function(a,b){return vw.StaticMap._XDcom.getView().getTerrHeight(a,b)},vw.Util.mapRender=function(){vw.StaticMap._XDcom.getView().requestMapData(),vw.StaticMap._XDcom.getView().MapRender()},vw.Object=vw.Util.Class({on:function(a,b){var c=!1;return vw.EventSupporter.addEventListener(this,a,c,b)},once:function(a,b){var c=!0;return vw.EventSupporter.addEventListener(this,a,c,b)},un:function(a,b){vw.EventSupporter.removeEventListener(this,a,b,"")},unByKey:function(a){vw.EventSupporter.removeEventListener(this,!1,"",a)},eventList:{onPropertyChanged:"vw.PropertyChangedEvent"},set:function(a,b){null==this.userProperties?(this.userProperties={},this.userProperties[a]=b):this.userProperties[a]=b,setTimeout(function(c){vw.PropertyChangedEvent.call(c,c,a,"",b)}(this),100)},get:function(a){return"undefined"==this.userProperties[a]?null:this.userProperties[a]},getNames:function(){return this.userProperties?Object.keys(this.userProperties):null},getValues:function(){var a=new Array;if(this.userProperties){for(var b=0;bb.x?(c.setMinx(b.x),c.setMaxx(a.x)):(c.setMinx(a.x),c.setMaxx(b.x)),a.Y>b.Y?(c.setMiny(b.y),c.setMaxy(a.y)):(c.setMiny(a.y),c.setMaxy(b.y)),c}},vw.Extent.fromPixel=function(a,b){if(null==a||null==b)return vw.Exception.errorStr.UNSUPPORTED_TYPE;if(a instanceof vw.Pixel&&b instanceof vw.Pixel){var c=new vw.Extent(0,0,0,0);return a.x>b.x?(c.setMinx(b.x),c.setMaxx(a.x)):(c.setMinx(a.x),c.setMaxx(b.x)),a.Y>b.Y?(c.setMiny(b.y),c.setMaxy(a.y)):(c.setMiny(a.y),c.setMaxy(b.y)),c}},vw.Bound=vw.Util.Class({apply:!1,min:null,max:null,setApply:function(a){this.apply=a},getApply:function(){return this.apply},setMin:function(a){this.min=a},getMin:function(){return this.min},setpMax:function(a){this.max=a},getpMax:function(){return this.max},initialize:function(a,b,c){vw.Util.NullCheckBoolean(a)&&(this.min=isNaN(parseFloat(a))?vw.Exception.errorStr.UNSUPPORTED_TYPE:parseFloat(a)),vw.Util.NullCheckBoolean(b)&&(this.max=isNaN(parseFloat(b))?vw.Exception.errorStr.UNSUPPORTED_TYPE:parseFloat(b)),vw.Util.NullCheckBoolean(c)&&(this.apply=c)},CLASS_NAME:"vw.Bound"}),vw.FaceBound=vw.Util.Class({apply:!1,x:null,y:null,setApply:function(a){this.apply=a},getApply:function(){return this.apply},setX:function(a){this.min=a},getX:function(){return this.x},setY:function(a){this.y=a},getY:function(){return this.y},initialize:function(a,b,c){vw.Util.NullCheckBoolean(a)&&(this.x=a instanceof vw.Bound?a:vw.Exception.errorStr.UNSUPPORTED_TYPE),vw.Util.NullCheckBoolean(b)&&(this.y=b instanceof vw.Bound?b:vw.Exception.errorStr.UNSUPPORTED_TYPE),vw.Util.NullCheckBoolean(c)&&(this.apply=c)},CLASS_NAME:"vw.FaceBound"}),vw.CubeBound=vw.Util.Class({apply:!1,x:null,y:null,z:null,setApply:function(a){this.apply=a},getApply:function(){return this.apply},setX:function(a){this.min=a},getX:function(){return this.x},setY:function(a){this.y=a},getY:function(){return this.y},setZ:function(a){this.z=a},getZ:function(){return this.z},initialize:function(a,b,c){vw.Util.NullCheckBoolean(pX)&&(this.x=pX instanceof vw.Bound?pX:vw.Exception.errorStr.UNSUPPORTED_TYPE),vw.Util.NullCheckBoolean(pY)&&(this.y=pY instanceof vw.Bound?pY:vw.Exception.errorStr.UNSUPPORTED_TYPE),vw.Util.NullCheckBoolean(pZ)&&(this.x=pZ instanceof vw.Bound?pZ:vw.Exception.errorStr.UNSUPPORTED_TYPE),vw.Util.NullCheckBoolean(c)&&(this.apply=c)},CLASS_NAME:"vw.CubeBound"}),vw.Color=vw.Util.Class(vw.Object,{r:null,g:null,b:null,a:null,setA:function(a){this.a=a},getA:function(){return this.a},setR:function(a){this.r=a},getR:function(){return this.r},setG:function(a){this.g=a},getG:function(){return this.g},setB:function(a){this.b=a},getB:function(){return this.b},getCssString:function(){var a=parseInt(this.r),b=parseInt(this.g),c=parseInt(this.b),d=parseInt(this.a),e=a.toString(16),f=b.toString(16),g=c.toString(16),h=d.toString(16);1==e.length&&(e="0"+e),1==f.length&&(f="0"+f),1==g.length&&(g="0"+g),1==h.length&&(h="0"+h);var i="#"+e+f+g;return i=i.toUpperCase()},getSopColor:function(){var a=vw.StaticMap._XDcom.createColor();return a.setARGB(this.getA(),this.getR(),this.getG(),this.getB()),a},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.Color(this.r,this.g,this.b,this.a);for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(a,b,c,d){if(arguments.length<3)return vw.Exception.errorStr.UNSUPPORTED_TYPE;for(var e=0;e255)return!1;var f=arguments.length;this.r=a,this.g=b,this.b=c,4==f?this.a=d:this.a=255},CLASS_NAME:"vw.Color"}),vw.Color.fromRations=function(a,b,c,d){if(arguments.length<3)return vw.Exception.errorStr.UNSUPPORTED_TYPE;if(a<0||a>1)return vw.Exception.errorStr.UNSUPPORTED_TYPE;if(c<0||c>1)return vw.Exception.errorStr.UNSUPPORTED_TYPE;if(d<0||d>1)return vw.Exception.errorStr.UNSUPPORTED_TYPE;for(var e=new Array,f=0;f6&&(e=parseInt(a.substring(6,8),16)),new vw.Color(b,c,d,e)},vw.Color.BLACK=new vw.Color(0,0,0),vw.Color.WHITE=new vw.Color(255,255,255),vw.Color.GRAY=new vw.Color(128,128,128),vw.Color.RED=new vw.Color(255,0,0),vw.Color.GREEN=new vw.Color(0,128,0),vw.Color.BLUE=new vw.Color(0,0,255),vw.Color.BROWN=new vw.Color(165,42,42),vw.Color.GOLD=new vw.Color(255,215,0), vw.Color.GREENYELLOW=new vw.Color(173,255,47),vw.Color.PINK=new vw.Color(255,192,203),vw.Color.PURPLE=new vw.Color(128,0,128),vw.Color.YELLOW=new vw.Color(255,255,0),vw.Color.AQUA=new vw.Color(0,255,255),vw.Color.BLUEVIOLET=new vw.Color(138,43,226),vw.Color.CHOCOLATE=new vw.Color(210,105,30),vw.Color.CORAL=new vw.Color(255,127,80),vw.Color.CYAN=new vw.Color(0,255,255),vw.Color.HOTPINK=new vw.Color(255,105,180),vw.Color.INDIGO=new vw.Color(75,0,130),vw.Color.KHAKI=new vw.Color(240,230,140),vw.Color.LAVENDER=new vw.Color(230,230,250),vw.Color.LIME=new vw.Color(0,255,0),vw.Color.MAGENTA=new vw.Color(255,0,255),vw.Color.NAVY=new vw.Color(0,0,128),vw.Color.OLIVE=new vw.Color(128,128,0),vw.Color.ORANGE=new vw.Color(255,165,0),vw.Color.SALMON=new vw.Color(250,128,114),vw.Color.SILVER=new vw.Color(192,192,192),vw.Color.SKYBLUE=new vw.Color(135,206,235),vw.Color.SNOW=new vw.Color(255,250,250),vw.Color.TOMATO=new vw.Color(255,99,71),vw.Color.VIOLET=new vw.Color(238,130,238),vw.ColorRamp=vw.Util.Class(vw.Object,{type:"none",setType:function(a){a in vw.ColorRampType&&(this.createType(a),this.type=a)},getType:function(){return this.type},makeRamp:function(a,b,c){var d=[],h=(Math.max(a.r,b.r)-Math.min(a.r,b.r))/c,i=(Math.max(a.g,b.g)-Math.min(a.g,b.g))/c,j=(Math.max(a.b,b.b)-Math.min(a.b,b.b))/c;d.push(a);for(var k=a.r,l=a.g,m=a.b,n=0;n=this.count?this.collectionProp.push(b):this.collectionProp.splice(a,0,b),setTimeout(function(c){vw.CollectionEvent.call(c,c,vw.EditType.INSERT,a,"",b)}(this),100),returnValue):b instanceof this.collectionType?(a<0?this.collectionProp.unshift(b):a>=this.count?this.collectionProp.push(b):this.collectionProp.splice(a,0,b),setTimeout(function(c){vw.CollectionEvent.call(c,c,vw.EditType.INSERT,a,"",b)}(this),100),returnValue):void this.updateCount()},update:function(a,b,c){0==this.count&&this.arrayInit(),null!=this.collectionType?b instanceof this.collectionType&&((a>0||a0||a=this.count)&&(!(b<0||b>=this.count)&&(c=this.collectionProp[a],this.collectionProp[b]=vw.Util.unSafeClone(this.collectionProp[a]),this.removeAt(a),setTimeout(function(a){vw.CollectionEvent.call(a,a,vw.EditType.UPDATE,b,c,this.collectionProp[b])}(this),100),void 0))},switch:function(a,b){if(this.arrayInit(),a<0||a>=this.count)return!1;if(b<0||b>=this.count)return!1;var c=vw.Util.unSafeClone(this.collectionProp[a]);this.update(a,vw.Util.unSafeClone(this.collectionProp[b]),!0),this.update(b,c,!0),setTimeout(function(a){vw.Event.call(a,a,"onItemsChanged")}(this),100)},getArray:function(){return this.collectionProp},indexOf:function(a){for(var c=0;c=this.count?null:this.collectionProp[a]},pop:function(){var a=null,b=null;return this.count>0&&(b=this.collectionProp[this.count],a=this.collectionProp.pop(),setTimeout(function(a){vw.CollectionEvent.call(a,a,vw.EditType.DELETE,this.count,b,"")}(this),100),this.updateCount()),a},remove:function(a){for(var b=null,c=null,d=0;d=this.count?b:(c=this.collectionProp[a],setTimeout(function(b){vw.CollectionEvent.call(b,b,vw.EditType.DELETE,a,c,"")}(this),100),b=this.removeItem(a),this.updateCount(),b)},removeItem:function(a){var b=this.collectionProp.splice(a,1)[0];return this.updateCount(),b},clear:function(){this.collectionProp=new Array,this.updateCount(),setTimeout(function(a){vw.Event.call(a,a,"onClear")}(this),100)},updateCount:function(){this.count=this.collectionProp.length},eventList:{onPropertyChanged:"vw.PropertyChangedEvent",onItemChanged:"vw.CollectionEvent",onItemsChanged:"vw.Event",onClear:"vw.Event"},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.Collection;for(var b in this)a[b]=vw.Util.unSafeClone(this[b]);return a},collectionType:null,setCollectionType:function(a){null!=a&&"undifined"!=a&&(this.collectionType=a)},getCollectionType:function(){return this.collectionType},initialize:function(a,b){if(this.collectionProp=new Array,null!=a&&"undifined"!=a)for(var c=0;c0&&a.saveScreenImg(b)},getContainer:function(){return this.container},getGlobe:function(){return this.globe},getLayers:function(){return this.layers},getOverlays:function(){return this.overlays},getControl:function(){return this.control},getInteractions:function(){return this.interactions},getCamera:function(){return this.camera},getLookat:function(){return this.lookat},getCrs:function(){return this.crs},setIsFullScreen:function(a){a?(this.container.style.position="absolute",this.container.style.marginLeft="-"+this.container.getBoundingClientRect().left+"px",this.container.style.marginTop="-"+this.container.getBoundingClientRect().top+"px",this.container.style.width=window.innerWidth-4+"px",this.container.style.height=window.innerHeight-4+"px"):(this.container.style.marginLeft=this.containerAttr.left,this.container.style.marginTop=this.containerAttr.top,this.container.style.width=this.containerAttr.width,this.container.style.height=this.containerAttr.height,this.container.style.position="relative"),this._XDcom.getView().updateRTT(),this.isFullScreen=a},getIsFullScreen:function(){return this.isFullScreen},eventList:{onPropertyChanged:"vw.PropertyChangedEvent",onTargetChanged:"vw.Event",onSizeChanged:"vw.Event",onClick:"vw.MapEvent",onDoubleClick:"vw.MapEvent",onRightClck:"vw.MapEvent",onRightDoubleClck:"vw.MapEvent",onMouseWheel:"vw.MapEvent",onMouseMove:"vw.MapEvent",onMouseIn:"vw.MapEvent",onMouseOut:"vw.MapEvent",onDragStart:"vw.MapEvent",onDrag:"vw.MapEvent",onDragEnd:"vw.MapEvent",onKeyPress:"vw.KeyEvent",onLMouseDown:"vw.SelectEvent",onLMouseUp:"vw.SelectEvent"},initOptions:function(){this.lookat=new vw.Lookat(this._XDcom.getViewCamera()),this.control=new vw.Controls(this.options.controlsDensity),this.interactions=new vw.Interactions(this.options.interactionsDensity),this.lookat.home=this.options.homePosition,this.lookat.moveTo(this.options.initPosition)},get_XDcom:function(a){return this._XDcom},pixelToCoord:function(a){var b=this._XDcom.createVec2();b.set(a.x,a.y);var c=this._XDcom.getView().ScreenToMapPointEX(b);return new vw.Coord(c.longitude,c.latitude)},pixelToCoordZ:function(a){var b=this._XDcom.createVec2();b.set(a.x,a.y);var c=this._XDcom.getView().ScreenToMapPointEX(b);return new vw.Coord(c.longitude,c.latitude,c.altitude)},coordToPixel:function(a){var b=this._XDcom.createVec3();b.set(a.x,a.y,vw.Util.getTerrHeight(a.x,a.y));var c=this._XDcom.getView().MapToScreenPointEX(b);return new vw.Pixel(c.x,c.y)},screenExtentToMapExtent:function(a){return vw.Exception.errorStr.UNSUPPORTED_3DMAP},updateSize:function(){this.containerAttr.width=this.container.style.width,this.containerAttr.height=this.container.style.height,this.containerAttr.top=this.container.getBoundingClientRect().top,this.containerAttr.left=this.container.getBoundingClientRect().left,this._XDcom.getView().updateRTT()},clear:function(){this.interactions.setExclusive(null),this._XDcom.getView().clearInputPoint(),this._XDcom.getView().clearSelectObj(),this._XDcom.getAnalysis().clear(),this._XDcom.getView().updateRTT()},initEvent:function(){for(var a=[["eventSOPEventResize",[],"onSizeChanged","vw.Event"],["KeyDown",["kCode","nShift"],"onKeyPress","vw.KeyEvent"],["eventSOPEventClick",["object","targetObj","layObj","x","y","lon","lat","alt","keyvalue"],"onClick","vw.MapEvent"],["eventSOPEventMouseDown",["object","targetObj","layObj","x","y","lon","lat","alt","keyvalue"],"onLMouseDown","vw.SelectEvent"],["eventSOPEventMouseUp",["object","targetObj","layObj","x","y","lon","lat","alt","keyvalue"],"onLMouseUp","vw.SelectEvent"],["eventSOPEventDBlClick",["object","targetObj","layObj","x","y","lon","lat","alt","keyvalue"],"onDoubleClick","vw.MapEvent"],["eventSOPEventRMouseDown",["object","targetObj","layObj","x","y","lon","lat","alt","keyvalue"],"onRightClck","vw.MapEvent"],["MouseWheel",["iflag","range","x","y"],"onMouseWheel","vw.MapEvent"],["eventSOPEventMouseMove",["object","targetObj","layObj","x","y","lon","lat","alt","keyvalue"],"onMouseMove","vw.MapEvent"],["eventSOPEventMouseOver",["object","targetObj","layObj","x","y","lon","lat","alt","keyvalue"],"onMouseIn","vw.MapEvent"],["eventSOPEventMouseOut",["object","targetObj","layObj","x","y","lon","lat","alt","keyvalue"],"onMouseOut","vw.MapEvent"]],b=0;a.length>b;b++)vw.EventSupporter.createEventScript("XDcom",a[b][0],a[b][1],a[b][2],a[b][3])},clone:function(){return vw.Exception.errorStr.UNSUPPORTED_3DMAP},initialize:function(a,b){var c={};if(arguments.length<1)return!1;if(1===arguments.length||!b instanceof vw.MapOptions){if("object"==typeof a)return vw.Exception.errorStr.UNSUPPORTED_TYPE;c=vw.BasicOptions}else c=b;this.options=vw.Util.extend({},c),vw.loader.createInstance(a,function(a,b){a._XDcom=b,a.initOptions(),a.globe=new vw.Globe,a.initEvent.apply(a),a.layers=new vw.Layers},function(a,b){return alert("errorCode : "+a+", \n errorMessage : "+b),!1},this),this._XDcom=null,this.container=document.getElementById(a),this.containerAttr.width=this.container.style.width,this.containerAttr.height=this.container.style.height,vw.StaticMap=this},CLASS_NAME:"vw.Map"}),vw.Globe=vw.Util.Class(vw.Object,{timer:null,sun:null,moon:null,light:null,effects:null,getSurfacePoint:function(a){return new vw.Coord},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.Globe;for(var b in this)a[b]=vw.Util.unSafeClone(this[b]);return a},initialize:function(){this.timer=new vw.GlobeTimer,this.sun=new vw.Sun,this.moon=new vw.Moon,this.Light=new vw.Light,this.effects=new vw.Effects},CLASS_NAME:"vw.Globe"}),vw.GlobeTimer=vw.Util.Class(vw.Object,{enabled:!1,interval:1,currentTime:null,useSystemTime:!1,startTime:null,endTime:null,multiplier:60,setEnabled:function(a){this.endabled=a},getEnabled:function(){return this.enabled},setInterval:function(a){this.interval=a},getInterval:function(){return this.interval},setCurrentTime:function(a){this.currentTime=a},getCurrentTime:function(){return this.currentTime},setUseSystemTime:function(a){this.useSystemTime=a},getUseSystemTime:function(){return this.useSystemTime},setStartTime:function(a){this.startTime=a},getStartTime:function(){return this.startTime},setEndTime:function(a){this.endTime=a},getEndTime:function(){return this.endTime},setMultiplier:function(a){this.multiplier=a},getMultiplier:function(){return this.multiplier},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.Timer;for(var b in this)a[b]=vw.Util.unSafeClone(this[b]);return a},initialize:function(){},EventType:{onTick:""},CLASS_NAME:"vw.Timer"}),vw.Sun=vw.Util.Class(vw.Object,{visible:!1,glow:1,clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.Sun;for(var b in this)a[b]=vw.Util.unSafeClone(this[b]);return a},setVisible:function(a){this.visible=a},getVisible:function(){return this.visible},setGlow:function(a){this.glow=a},getGlow:function(){return this.glow},initialize:function(){},CLASS_NAME:"vw.Sun"}),vw.Moon=vw.Util.Class(vw.Object,{visible:!1,phase:.5,setVisible:function(a){this.visible=a},getVisible:function(){return this.visible},setPhase:function(a){this.phase=a},getPhase:function(){return this.phase},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.Moon;for(var b in this)a[b]=vw.Util.unSafeClone(this[b]);return a},initialize:function(){},CLASS_NAME:"vw.Moon"}),vw.Light=vw.Util.Class({enabled:!1,setEnabled:function(a){this.enabled=a},getEnabled:function(){return this.enabled},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.Light;for(var b in this)a[b]=vw.Util.unSafeClone(this[b]);return a},initialize:function(){},CLASS_NAME:"vw.Light"}),vw.Camera=vw.Util.Class(vw.Object,{cameraObj:null,home:null,zoom:vw.Exception.errorStr.UNSUPPORTED_3DMAP,rotation:vw.Exception.errorStr.UNSUPPORTED_3DMAP,minZoom:vw.Exception.errorStr.UNSUPPORTED_3DMAP,maxZoom:vw.Exception.errorStr.UNSUPPORTED_3DMAP,location:{},direction:{},minAltitude:{},maxAltitude:{},animation:{},action:{},canMoveUnderTerrain:{},distance:{},lookat:{},reset:function(){if(null==this.cameraObj||null==this.home||"vw.CameraPosition"!=this.home.CLASS_NAME)return vw.Exception.errorStr.UNSUPPORTED_TYPE;var a=vw.StaticMap._XDcom.createVec3();a.longitude=this.home.location.x,a.latitude=this.home.location.y,a.altitude=this.home.location.z,this.cameraObj.moveDist(a,this.home.direction.tilt,this.home.direction.heading,this.home.location.z,0)},move:function(a,b){},moveTo:function(a){if(null!=this.cameraObj&&a instanceof vw.CameraPosition){var b=vw.StaticMap._XDcom.createVec3();b.longitude=a.location.x,b.latitude=a.location.y,b.altitude=a.location.z,this.cameraObj.moveDist(b,a.direction.tilt,a.direction.heading,a.location.z,10)}else vw.Exception.setErrorString(vw.Exception.errorStr.UNSUPPORTED_TYPE)},lookTo:function(a){},moveToLook:function(a,b){},zoom:function(a){},rotate:function(a){},eventType:{onCenterChanged:"",onZoomChanged:"",onRotationChanged:"",onMoveEnd:"",onRotationEnd:""},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.Camera;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(a){this.cameraObj=a},CLASS_NAME:"vw.Camera"}),vw.CameraPosition=vw.Util.Class({center:vw.Exception.errorStr.UNSUPPORTED_3DMAP,zoom:vw.Exception.errorStr.UNSUPPORTED_3DMAP,rotation:vw.Exception.errorStr.UNSUPPORTED_3DMAP,location:null,direction:null,initialize:function(a,b){this.location=a instanceof vw.CoordZ?a:vw.Exception.errorStr.UNSUPPORTED_TYPE,this.direction=b instanceof vw.Direction?b:vw.Exception.errorStr.UNSUPPORTED_TYPE},CLASS_NAME:"vw.CameraPosition"}),vw.DevicePosition=vw.Util.Class({location:null,direction:null,initialize:function(a,b){this.location=a instanceof vw.CoordZ?a:vw.Exception.errorStr.UNSUPPORTED_TYPE,this.direction=b instanceof vw.Direction?b:vw.Exception.errorStr.UNSUPPORTED_TYPE},CLASS_NAME:"vw.DevicePosition"}),vw.Direction=vw.Util.Class(vw.Object,{heading:null,tilt:null,roll:null,setHeading:function(a){this.heading=a},getHeading:function(){return this.heading},setTilt:function(a){this.tilt=a},getTilt:function(){return this.tilt},setRoll:function(a){this.roll=a},getRoll:function(){return this.roll},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.Direction(this.heading,this.tilt,this.roll);for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(a,b,c){this.heading=isNaN(parseFloat(a))?vw.Exception.errorStr.UNSUPPORTED_TYPE:parseFloat(a),this.tilt=isNaN(parseFloat(b))?vw.Exception.errorStr.UNSUPPORTED_TYPE:parseFloat(b),this.roll=isNaN(parseFloat(c))?vw.Exception.errorStr.UNSUPPORTED_TYPE:parseFloat(c)},CLASS_NAME:"vw.Direction"}),vw.Direction.fromRadians=function(a,b,c){var d=new vw.Direction(a,b,c);return d},vw.Ray=vw.Util.Class(vw.Object,{origin:null,direction:null,setOrigin:function(){this.origin=pOrigin instanceof vw.CoordZ?pOrigin:vw.Exception.errorStr.UNSUPPORTED_TYPE},getOrigin:function(){return this.origin},setDirection:function(){this.direction=pDirection instanceof vw.Direction?pDirection:vw.Exception.errorStr.UNSUPPORTED_TYPE},getDirection:function(){return this.direction},getPointByDistance:function(a){if(null==a&&isNaN(parseFloat(a)))return vw.Exception.errorStr.UNSUPPORTED_TYPE;var b=vw.StaticMap._XDcom.createVec3();b.set(this.origin.x,this.origin.y,this.origin.z);var c=vw.StaticMap._XDcom.getViewCamera().getRayPosition(b,this.direction.heading,this.direction.tilt,a);return new vw.CoordZ(c.longitude,c.latitude,c.altitude)},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.Ray(this.origin,this.direction);for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(a,b){this.origin=a instanceof vw.CoordZ?a:vw.Exception.errorStr.UNSUPPORTED_TYPE,this.direction=b instanceof vw.Direction?b:vw.Exception.errorStr.UNSUPPORTED_TYPE},CLASS_NAME:"vw.Ray"}),vw.Lookat=vw.Util.Class(vw.Object,{cameraObj:null,home:null,center:null,precenter:null,location:null,direction:null,minDistance:null,maxDistance:null,mover:null,action:null,canMoveUnderTerrain:null,distance:null,zoomLevel:null,getZoomLevel:function(){return this.cameraObj.getMapZoomLevel()},getCenter:function(){return this.center},getDirection:function(){return new vw.Direction(this.cameraObj.getDirect(),this.cameraObj.getTilt(),0)},reset:function(){if(null!=this.cameraObj&&null!=this.home&&"vw.CameraPosition"==this.home.CLASS_NAME){var a=vw.StaticMap._XDcom.createVec3();a.longitude=this.home.location.x,a.latitude=this.home.location.y,a.altitude=this.home.location.z,this.cameraObj.moveDist(a,this.home.direction.tilt,this.home.direction.heading,this.home.location.z,0)}else this.errorMessage=vw.Exception.errorStr.UNSUPPORTED_TYPE},moveTo:function(a){if(null!=this.cameraObj&&a instanceof vw.CameraPosition){var b=vw.StaticMap._XDcom.createVec3();b.longitude=a.location.x,b.latitude=a.location.y,b.altitude=a.location.z,this.cameraObj.moveDist(b,a.direction.tilt,a.direction.heading,a.location.z,10)}else vw.Exception.setErrorString(vw.Exception.errorStr.UNSUPPORTED_TYPE)},moveToLook:function(a,b){if(null!=this.cameraObj&&pPosition instanceof vw.CameraPosition){var c=vw.StaticMap._XDcom.createVec3();c.longitude=pPosition.location.x,c.latitude=pPosition.location.y,c.altitude=pPosition.location.z,this.cameraObj.moveDist(c,pPosition.direction.tilt,pPosition.direction.heading,pPosition.location.z,10)}else vw.Exception.setErrorString(vw.Exception.errorStr.UNSUPPORTED_TYPE)},zoom:function(a){var b=this.cameraObj.getDistance();b+=a,this.cameraObj.setDistance(b)},setZoom:function(a){this.cameraObj.setDistance(a)},getZoom:function(){return this.cameraObj.getDistance()},rotate:function(a){var b=a.heading,c=a.tilt,d=a.roll,e=this.cameraObj;if(0!==b&&null!==b){var f=e.getDirect();f+=b,e.setDirect(f)}if(0!==c&&null!==c){var g=e.getTilt();g+=c,e.setTilt(g)}if(0!==d&&null!==d){var g=e.getTilt();g+=c,e.setTilt(g)}},getSurfacePoint:function(){var a=this.cameraObj.getCenterPoint();return new vw.CoordZ(a.longitude,a.latitude,a.altitude)},validate:function(){return!0},eventList:{onPropertyChanged:"vw.PropertyChangedEvent", onCenterChanged:"vw.ChangedEvent",onMoveEnd:"vw.ChangedEvent",onRotationEnd:"vw.ChangedEvent"},initEvent:function(){for(var a=[["eventSOPEventCamMoveEnd",["object"],["onMoveEnd","onRotationEnd","onCenterChanged"],"vw.ChangedEvent"]],b=0;a.length>b;b++)vw.EventSupporter.createEventScript("XDcom",a[b][0],a[b][1],a[b][2],a[b][3]);this.on("onCenterChanged",function(){var a=vw.StaticMap.lookat.cameraObj.getCenterPoint();null!=a&&(vw.StaticMap.lookat.precenter=vw.StaticMap.lookat.center,vw.StaticMap.lookat.center=new vw.Coord(a.longitude,a.latitude))})},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.Lookat;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(a){this.cameraObj=a;var b=this.cameraObj.getCenterPoint();this.center=new vw.Coord(b.longitude,b.latitude),this.initEvent()},CLASS_NAME:"vw.Lookat"}),vw.cameraAction={},vw.cameraAction.CameraAction=vw.Util.Class(vw.Object,{start:function(){},stop:function(){},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.cameraAction.CameraAction;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(){},CLASS_NAME:"vw.cameraAction.CameraAction"}),vw.cameraAction.Fly=vw.Util.Class(vw.cameraAction.CameraAction,{speed:0,headingSpeed:0,tiltSpeed:0,rollSpeed:0,_flight:null,setSpeed:function(a){this._flight.setThrottle(.05*a),this.speed=a,vw.StaticMap.setFocus()},getSpeed:function(){return this.speed},setHeadingSpeed:function(a){vw.StaticMap.setFocus(),this._flight.setYawDelta(a),this.headingSpeed=a},getHeadingSpeed:function(){return this.headingSpeed},setTiltSpeed:function(a){this._flight.setPitchDelta(a),this.tiltSpeed=a},getTiltSpeed:function(){return this.tiltSpeed},setRollSpeed:function(a){this._flight.setRollDelta(a),this.rollSpeed=a},getRollSpeed:function(){return this.rolltSpeed},start:function(){this._flight.setMode(1),this._flight.setViewHUD(!1),this._flight.setPlane(0),this._drive.setGroundMode(!1,10),vw.StaticMap.setFocus()},stop:function(){this._flight.setMode(0),vw.StaticMap.setFocus()},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.cameraAction.Fly;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(){this._flight=vw.StaticMap._XDcom.getFlightSimul()},CLASS_NAME:"vw.cameraAction.Fly"}),vw.cameraAction.Drive=vw.Util.Class(vw.cameraAction.CameraAction,{speed:0,headingSpeed:0,height:0,_drive:null,setSpeed:function(a){this._drive.setThrottle(.01*a),this.speed=a,vw.StaticMap.setFocus()},getSpeed:function(){return this.speed},setHeadingSpeed:function(a){vw.StaticMap.setFocus();var b=Math.abs(a);if(a>0)for(var c=0;c1&&(c.density=1),c.enabled)if("snow"==a[b]){var d=2*c.density,e=1.5*c.density;this.vwMapCl.setSnowImg("C:\\Program Files\\EGIS\\XDWorld\\Icon\\snow_2.png"),this.vwMapCl.startWeather(0,e,d)}else if("rain"==a[b]){var f=2*c.density,g=1.5*c.density;this.vwMapCl.setRainImg("C:\\Program Files\\EGIS\\XDWorld\\Icon\\rain_7_40.png"),this.vwMapCl.startWeather(1,g,f)}else if("fog"==a[b]){var h=3*c.density,i=c.color,j=vw.StaticMap._XDcom.createColor();j.setARGB(i.a,i.r,i.g,i.g),this.vwMapCl.setFogLimitAltitude(c.limitAltitude),this.vwMapCl.setFog(j,h)}}},stop:function(){this.vwMapCl.setFogDefault(),this.vwMapCl.stopWeather()},initialize:function(){this.vwMapCl=vw.StaticMap._XDcom.getView()},CLASS_NAME:"vw.Effects"}),vw.effect=function(){},vw.effect.Effect=vw.Util.Class(vw.Object,{enabled:!1,clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.effect.Effect;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(){},CLASS_NAME:"vw.effect.Effect"}),vw.effect.Snow=vw.Util.Class(vw.effect.Effect,{density:.5,clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.effect.Snow(this.density);for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(a){null!=vw.StaticMap?!isNaN(parseFloat(a))&&parseFloat(a)>=0&&parseFloat(a)<=1?(this.density=a,vw.StaticMap.globe.effects.set("snow",this)):this.errorMessage=vw.Exception.errorStr.UNSUPPORTED_TYPE:this.errorMessage=vw.Exception.errorStr.INVALID_MAP_OBJECT},CLASS_NAME:"vw.effect.Snow"}),vw.effect.Rain=vw.Util.Class(vw.effect.Effect,{density:.5,clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.effect.Rain(this.density);for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(a){null!=vw.StaticMap?!isNaN(parseFloat(a))&&parseFloat(a)>=0&&parseFloat(a)<=1?(this.density=a,vw.StaticMap.globe.effects.set("rain",this)):this.errorMessage=vw.Exception.errorStr.UNSUPPORTED_TYPE:this.errorMessage=vw.Exception.errorStr.INVALID_MAP_OBJECT},CLASS_NAME:"vw.effect.Rain"}),vw.effect.Fog=vw.Util.Class(vw.effect.Effect,{density:.5,color:vw.Color.WHITE,limitAltitude:5e4,clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.effect.Fog(this.density,this.color);for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(a,b){null!=vw.StaticMap?1==arguments.length?!isNaN(parseFloat(a))&&parseFloat(a)>=0&&parseFloat(a)<=1?(this.density=a,vw.StaticMap.globe.effects.set("fog",this)):this.errorMessage=vw.Exception.errorStr.UNSUPPORTED_TYPE:2==arguments.length&&(!isNaN(parseFloat(a))&&parseFloat(a)>=0&&parseFloat(a)<=1&&b instanceof vw.Color?(this.density=a,this.clolr=b,vw.StaticMap.globe.effects.set("fog",this)):this.errorMessage=vw.Exception.errorStr.UNSUPPORTED_TYPE):this.errorMessage=vw.Exception.errorStr.INVALID_MAP_OBJECT},CLASS_NAME:"vw.effect.Fog"}),vw.Controls=vw.Util.Class(vw.NamedSet,{autoArrange:!0,clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.Controls;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(a){var b=new vw.control.Compass,c=new vw.control.Navigator,d=new vw.control.Zoom;a==vw.DensityType.BASIC?(this.set(b.id,b),this.set(c.id,c),b.setAutoHide(!0),c.setAutoHide(!0)):a==vw.DensityType.FULL&&(this.set(b.id,b),this.set(c.id,c),this.set(d.id,d),b.setAutoHide(!0),c.setAutoHide(!0),d.setVisible(!0))},CLASS_NAME:"vw.Controls"}),vw.control={},vw.control.Control=vw.Util.Class(vw.Object,{id:"",site:null,position:"",anchor:vw.SiteAlignType.TOP_LEFT,getId:function(){return this.id},setSite:function(){},getSize:function(){},setPosition:function(){},getPosition:function(){},setAnchor:function(){},getAnchor:function(){},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.control.Control;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(){},CLASS_NAME:"vw.control.Control"}),vw.control.Compass=vw.Util.Class(vw.control.Control,{autoHide:!0,_controlObj:null,setAutoHide:function(a){this.autoHide=a,a?this._controlObj.setCompasVisible(259):this._controlObj.setCompasVisible(258)},getAutoHide:function(){return this.autoHide},makeHide:function(){this.controlObj.setControlVisible(257)},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.control.Compass;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(){this._controlObj=vw.StaticMap._XDcom.getNavigationControl(),this._controlObj.setCompasVisible(257),this.id=this.CLASS_NAME},CLASS_NAME:"vw.control.Compass"}),vw.control.Navigator=vw.Util.Class(vw.control.Control,{autoHide:!0,_controlObj:null,setAutoHide:function(a){this.autoHide=a,a?this._controlObj.setNaviVisible(259):this._controlObj.setNaviVisible(258)},getAutoHide:function(){return this.autoHide},makeHide:function(){this._controlObj.setControlVisible(257)},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.control.Navigator;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(){this._controlObj=vw.StaticMap._XDcom.getNavigationControl(),this._controlObj.setNaviVisible(257),this.id=this.CLASS_NAME},CLASS_NAME:"vw.control.Navigator"}),vw.control.Zoom=vw.Util.Class(vw.control.Control,{delta:1,sliderVisible:!0,_controlObj:null,setDelta:function(a){a>0&&a<2&&(_controlObj.setZoomDelta(a),this.delta=a)},setVisible:function(a){a?this._controlObj.setZoomVisible(258):this._controlObj.setZoomVisible(257)},getDelta:function(){return this.delta},makeHide:function(){},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.control.Zoom;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(){this._controlObj=vw.StaticMap._XDcom.getNavigationControl(),this.id=this.CLASS_NAME,this.setVisible(!1)},CLASS_NAME:"vw.control.Zoom"}),vw.Interactions=vw.Util.Class(vw.Object,{bases:"",always:"",exclusive:null,interactObj:null,analysisObj:null,getExclusive:function(){return this.exclusive},setExclusive:function(a){if(null!=a){var b=this.get(a);return null!=b&&(null!=this.exclusive&&this.exclusive instanceof vw.interaction.Interaction&&!(this.exclusive instanceof vw.interaction.Interaction&&a!=this.exclusive.getId())||(this.mkBasesFalse(),this.exclusive=b,"vw.interaction.LookAround"==b.id||"vw.interaction.Measure"==b.id?b.doThis():"vw.interaction.Modify"==b.id&&(1==b.enabled?this.interactObj.setWorkMode(1):this.interactObj.getWorkMode()==b.type&&this.interactObj.setWorkMode(1)))),this.exclusive}return null!=this.exclusive&&this.exclusive.setDisable(),this.exclusive=a,this.mkBasesTrue(),this.exclusive},getBases:function(){return this.bases},getAlways:function(){return this.always},trueBases:null,mkBasesFalse:function(){var a=this.bases.getCount();this.trueBases=new Array;for(var b=0;b-1?a?null==vw.StaticMap.interactions.getExclusive()?this.initEnable():this.enabled=!1:this.initEnable():vw.StaticMap.interactions.always.indexOf(this)>-1&&(this.enabled=a,this.initEnable()))},initEnable:function(){},doThis:function(){},getEnabled:function(){return this.enabled},eventList:{onPropertyChanged:"vw.PropertyChangedEvent",onEnabledChanged:"vw.ChangedEvent"},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.interaction.Interaction;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(){enabled=!0},CLASS_NAME:"vw.interaction.Interaction"}),vw.interaction.DoubleClickZoom=vw.Util.Class(vw.interaction.Interaction,{initEnable:function(){this.enabled?vw.StaticMap.on("onDoubleClick",this.doThis):vw.StaticMap.un("onDoubleClick",this.doThis)},doThis:function(a,b,c,d,e,f,g,h){var i=XDcom.getViewCamera().getAltitude();i/=4,i<300&&(i=300),XDcom.getViewCamera().setAltitude(i)},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.interaction.DoubleClickZoom;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(){this.id=this.CLASS_NAME},CLASS_NAME:"vw.interaction.DoubleClickZoom"}),vw.interaction.KeyboardPan=vw.Util.Class(vw.interaction.Interaction,{delta:"128",setDelta:function(a){this.delta=a},getDelta:function(){return this.delta},initEnable:function(){XDcom.getControl().setKeyPanMode(this.enabled),XDcom.getControl().setKeyRotMode(this.enabled)},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.interaction.KeyboardPan;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(){this.id=this.CLASS_NAME},CLASS_NAME:"vw.interaction.KeyboardPan"}),vw.interaction.KeyboardZoom=vw.Util.Class(vw.interaction.Interaction,{initEnable:function(){XDcom.getControl().setKeyZoomMode(this.enabled)},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.interaction.KeyboardZoom;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(){this.id=this.CLASS_NAME},CLASS_NAME:"vw.interaction.KeyboardZoom"}),vw.interaction.MouseWheelZoom=vw.Util.Class(vw.interaction.Interaction,{initEnable:function(){XDcom.getControl().setMouseZoomMode(this.enabled)},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.interaction.MouseWheelZoom;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(){this.id=this.CLASS_NAME},CLASS_NAME:"vw.interaction.MouseWheelZoom"}),vw.interaction.Select=vw.Util.Class(vw.interaction.Interaction,{multi:!1,setMulti:function(a){this.multi=a},getMulti:function(){return this.multi},initEnable:function(){this.enabled?vw.StaticMap.on("onLMouseDown",this.doThis):vw.StaticMap.un("onLMouseDown",this.doThis)},doThis:function(a,b,c,d,e,f,g,h,i,j){},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.interaction.Select;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(){this.id=this.CLASS_NAME},CLASS_NAME:"vw.interaction.Select"}),vw.interaction.DragPan=vw.Util.Class(vw.interaction.Interaction,{initEnable:function(){XDcom.getControl().setMousePanMode(this.enabled)},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.interaction.DragPan;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(){this.id=this.CLASS_NAME},CLASS_NAME:"vw.interaction.DragPan"}),vw.interaction.DragRotate=vw.Util.Class(vw.interaction.Interaction,{initEnable:function(){XDcom.getControl().setMouseRotMode(this.enabled)},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.interaction.DragRotate;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(){this.id=this.CLASS_NAME},CLASS_NAME:"vw.interaction.DragRotate"}),vw.interaction.Pointer=vw.Util.Class(vw.interaction.Interaction,{initialize:function(){},CLASS_NAME:"vw.interaction.Pointer"}),vw.DrawShapeType={POINT:"POINT",LINESTRING:"LINESTRING",POLYGON:"POLYGON"};vw.interaction.Draw=vw.Util.Class(vw.interaction.Pointer,{geometry:"",type:"",style:vw.BaseStyle,setGeometry:function(a){a instanceof vw.geom.Geometry&&(this.geometry=a)},getGeometry:function(){return this.geometry},setType:function(a){a in vw.DrawShapeType&&(this.type=a,vw.StaticMap.interactions.getExclusive()==this&&this.doThis())},getType:function(){return this.type},setStyle:function(a){a instanceof vw.style.StyleGroup&&(this.style=a)},getStyle:function(){return this.style},eventId:null,setDisable:function(){XDcom.getView().setWorkMode(vw.Constant.MouseMode.MOVEGRAB),vw.StaticMap.unByKey(this.eventId)},setEnabled:function(a){var b=this.enabled;setTimeout(function(a,b,c,d){vw.ChangedEvent.call(a,b,c,d)}(this,"onEnabledChanged",b,a),100),this.enabled=a,vw.StaticMap.interactions.getExclusive()==this&&this.doThis()},doThis:function(){var a=XDcom.getView();if(this.enabled)switch(a.clearInputPoint(),this.type){case vw.DrawShapeType.POINT:a.setWorkMode(vw.Constant.MouseMode.INPUTPOINT),this.eventId=vw.StaticMap.once("onClick",this.makeGeom);break;case vw.DrawShapeType.LINESTRING:a.setWorkMode(vw.Constant.MouseMode.LINESTRING),this.eventId=vw.StaticMap.once("onDoubleClick",this.makeGeom);break;case vw.DrawShapeType.POLYGON:a.setWorkMode(vw.Constant.MouseMode.POLYGON),this.eventId=vw.StaticMap.once("onDoubleClick",this.makeGeom)}else a.setWorkMode(vw.Constant.MouseMode.MOVEGRAB)},makeGeom:function(a,b,c,d,e,f,g,h){var i=XDcom.getView(),j=vw.StaticMap.getInteractions().getExclusive();if(j.getEnabled())switch(j.getType()){case vw.DrawShapeType.POINT:var k=vw.StaticMap._XDcom.createVec3();k.set(c.x,c.y,i.getTerrHeight(c.x,c.y));var l=vw.StaticMap._XDcom.createPoint(c.x);l.Set(k);var m=l.getSymbol(),n=m.getIcon(),o=vw.BaseStyle.marker.src;n.setNormalIcon(o),l.setName(c.x),l.setDescription("포인트 객체"),m.setIcon(n),l.setSymbol(m),i.addChild(l,8);break;case vw.DrawShapeType.LINESTRING:var p=i.getInputPointCount();if(p<2)return void alert("2점 이상 입력하세요");var q=i.getInputPointList(),r=vw.StaticMap._XDcom.createLineString(q.get(0).Longitude);r.setCoordinates(q);var s;s=r.getStyle();var t;t=s.getColor(),t.setARGB(255,232,83,228),s.setColor(t),s.setWidth(5),r.setStyle(s),i.clearInputPoint(),i.addChild(r,8),i.updateRTT();break;case vw.DrawShapeType.POLYGON:var p=i.getInputPointCount();if(p<3)return void alert("3점 이상 입력해주세요");var q=i.getInputPointList();rect=vw.StaticMap._XDcom.createPolygon(q.get(0).Longitude),rect.setCoordinates(q);var u;u=rect.getStyle();var t=u.getOutlineColor();t.setARGB(255,232,83,228),u.setOutLineColor(t);var v=u.getFillColor();v.setARGB(200,167,167,201),u.setFillColor(v),u.setOutlineWidth(5),rect.setStyle(u),i.clearInputPoint(),i.addChild(rect,13),i.updateRTT()}vw.StaticMap.getInteractions().getExclusive().setEnabled(!1),this.eventId=null},initialize:function(){this.id=this.CLASS_NAME},CLASS_NAME:"vw.interaction.Draw"});vw.MeasureType={DISTANCE:"DISTANCE",AREA:"AREA",ELEVATION:"ELEVATION"},vw.interaction.Measure=vw.Util.Class(vw.interaction.Draw,{type:"",setType:function(a){this.type=a,vw.StaticMap.interactions.getExclusive()==this&&this.doThis()},getType:function(){return this.type},eventId:null,setDisable:function(){XDcom.getView().setWorkMode(vw.Constant.MouseMode.MOVEGRAB)},setEnabled:function(a){var b=this.enabled;setTimeout(function(a,b,c,d){vw.ChangedEvent.call(a,b,c,d)}(this,"onEnabledChanged",b,a),100),this.enabled=a,vw.StaticMap.interactions.getExclusive()==this&&this.doThis()},doThis:function(){var a=XDcom.getView(),b=XDcom.getAnalysis();if(this.enabled)switch(this.type){case vw.MeasureType.DISTANCE:b.addDistObject(),a.setWorkMode(vw.Constant.MouseMode.ANADISTANCE);break;case vw.MeasureType.AREA:b.addAreaObject(),a.setWorkMode(vw.Constant.MouseMode.ANAAREA);break;case vw.MeasureType.ELEVATION:a.setWorkMode(vw.Constant.MouseMode.ANAABSHEIGHT)}else a.setWorkMode(vw.Constant.MouseMode.MOVEGRAB)},initialize:function(a){this.id=this.CLASS_NAME},CLASS_NAME:"vw.interaction.Measure"}),vw.LookAroundType={GROUND:"GROUND",WALL:"WALL"},vw.interaction.LookAround=vw.Util.Class(vw.interaction.Interaction,{type:"",setType:function(a){this.type!=a&&(this.type=a,this.enabled&&(this.setEnabled(!1),this.setEnabled(!0)))},getType:function(){return this.type},eventId:null,setDisable:function(){XDcom.getView().setWorkMode(vw.Constant.MouseMode.MOVEGRAB),vw.StaticMap.unByKey(this.eventId)},setEnabled:function(a){var b=this.enabled;setTimeout(function(a,b,c,d){vw.ChangedEvent.call(a,b,c,d)}(this,"onEnabledChanged",b,a),100),this.enabled=a,vw.StaticMap.interactions.getExclusive()==this&&this.doThis()},doThis:function(){var a=vw.StaticMap._XDcom.getAnalysis(),b=vw.StaticMap._XDcom.getView();1==this.enabled?(b.setWorkMode(85),this.type==vw.LookAroundType.WALL?this.eventId=vw.StaticMap.once("onLMouseUp",this.doWall):this.type==vw.LookAroundType.GROUND&&(this.eventId=vw.StaticMap.once("onClick",this.doGround))):0==this.enabled&&(b.setWorkMode(1),this.type==vw.LookAroundType.WALL?a.getBuildLandscapeMode()&&a.setBuildLandscapeMode(!1):this.type==vw.LookAroundType.GROUND&&a.getGroundLandScapeMode()&&a.setGroundLandScapeMode(!1))},doWall:function(a,b,c,d,e,f,g,h,i,j){null!=j&&"SOPModel"!=j.getType()?setTimeout(function(){var a=vw.StaticMap._XDcom.getAnalysis();a.startBuildLandscape(120),a.setBuildLandscapeMode(!0)},500):(alert("건물을 클릭하셔야 경관을 볼 수 있습니다."),map.setFocus()),vw.StaticMap._XDcom.getView().setWorkMode(1)},doGround:function(){setTimeout(function(){var a=vw.StaticMap._XDcom.getView().getInputPointList(),b=a.get(0),c=vw.StaticMap._XDcom.getAnalysis();c.startGroundLandScape(b),c.setGroundLandScapeMode(!0),vw.StaticMap._XDcom.getView().clearInputPoint(),vw.StaticMap._XDcom.getView().updateRTT(),vw.StaticMap._XDcom.getView().setWorkMode(1)},500)},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.interaction.LookAround(this.type);for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(){this.type=vw.LookAroundType.GROUND,this.id=this.CLASS_NAME},CLASS_NAME:"vw.interaction.LookAround"}),vw.interaction.Modify=vw.Util.Class(vw.interaction.Interaction,{geometry:"",style:"",tolerance:"",clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.interaction.Modify;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(){this.id="Modify",this.enabled=!0,this.style=vw.BaseStyle,this.tolerance=5},CLASS_NAME:"vw.interaction.Modify"}),vw.interaction.DragBox=function(){this.extent="",this.style=""},vw.interaction.DragSelect=function(){this.multi=!1},vw.interaction.DragBoxZoom=function(){},vw.interaction.DragRotateAndZoom=function(){},vw.interaction.DrawGraphic=vw.Util.Class(vw.interaction.Draw,{initialize:function(){},CLASS_NAME:"vw.interaction.DrawGraphic"}),vw.interaction.Custom=vw.Util.Class({handleEvent:"",initialize:function(){},CLASS_NAME:"vw.interaction.Custom"}),vw.callback={},vw.callback.MapEvent=vw.Util.Class({event:"",initialize:function(){return!0},CLASS_NAME:"vw.callback.MapEvent"}),vw.interaction.PinchRotate=function(){this.threshold=10},vw.interaction.PinchZoom=function(){this.threshold=5},vw.Features=vw.Util.Class(vw.Collection,{extent:null,_renderer:null,getExtent:function(){return this.extent},getFeature:function(a){var b="";if(null!=a&&"undifined"!=a&&this.getCount()>0)for(var c=0;c=2))return vw.Exception.errorStr.UNSUPPORTED_TYPE;for(var g=0;g=2))return vw.Exception.errorStr.UNSUPPORTED_TYPE;for(var h=0;h=3))return vw.Exception.errorStr.UNSUPPORTED_TYPE;for(var g=0;g2))return vw.Exception.errorStr.UNSUPPORTED_TYPE;for(var f=0;f2))return vw.Exception.errorStr.UNSUPPORTED_TYPE;for(var f=0;f0)for(var b=0;b0)for(var c=0;c0)for(var c=0;c-1)return d;for(var e=0;e0)for(var e=0;e-1&&(d=d.replace("http://","")),d.indexOf(":")>-1?(e=d.substring(d.indexOf(":")+1,d.indexOf("/")),f=d.substring(d.indexOf("/"),d.length),d=d.substring(0,d.indexOf(":"))):(f=d.substring(d.indexOf("/"),d.length),d=d.substring(0,d.indexOf("/"))),c.setConnectionWMS(d,e,f),c.setLayersWMS(a.getLayers()),c.setStylesWMS(a.getStyles()),c.setTileSizeWMS(256),c.setLevelWMS(10,16)}},addEvt:function(a,b,c,d,e){b==vw.EditType.INSERT&&e.addThis()},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.layer.Tile;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(a){null!=a&&this.setSource(a)},CLASS_NAME:"vw.layer.Tile"}),vw.layer.Basemap=vw.Util.Class(vw.layer.Tile,{type:null,currentDate:null,setType:function(a){this.type=vw.BasemapType.PHOTO},setVisible:function(){return"영상은 숨길수 없습니다."},getVisible:function(){return!0},getType:function(){return this.type},setCurrentDate:function(a){this.currentDate=pData},getCurrentDate:function(){return this.currentDate},eventList:{onPropertyChanged:"vw.PropertyChangedEvent",onExtentChanged:"vw.ChangedEvent",onMaxZoomChanged:"vw.ChangedEvent",onMinZoomChanged:"vw.ChangedEvent",onOpacityChanged:"vw.ChangedEvent",onVisibleChanged:"vw.ChangedEvent",onSourceChanged:"vw.ChangedEvent",onBasemapTypeChanged:"vw.ChangedEvent"},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.layer.Basemap;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(a){this.type=vw.BasemapType.PHOTO,this.name="basemapLayer"},CLASS_NAME:"vw.layer.Basemap"}),vw.layer.Vector=vw.Util.Class(vw.layer.Sourced,{source:null,renderer:null,labelRenderer:null,setSource:function(a){this.source=a},getSource:function(){return this.source},setRenderer:function(a){null!=a&&a instanceof vw.renderer.Renderer&&(this.renderer=a)},getRenderer:function(){return this.renderer},setLabelRenderer:function(a){null!=a&&a instanceof vw.renderer.TextRenderer&&(this.labelRenderer=a)},getLabelRenderer:function(){return this.labelRenderer},addThis:function(){var a=this.getSource();if(null!=a){var b=vw.Util.getUniqId(this.CLASS_NAME),c=vw.StaticMap._XDcom.getLayerList().createWFSLayer(b,0);this.setName(b);var d=a.getUrl(),e=80,f="";d.indexOf("http://")>-1&&(d=d.replace("http://","")),d.indexOf(":")>-1?(e=d.substring(d.indexOf(":")+1,d.indexOf("/")),f=d.substring(d.indexOf("/"),d.length),d=d.substring(0,d.indexOf(":"))):(f=d.substring(d.indexOf("/"),d.length),d=d.substring(0,d.indexOf("/"))),c.setConnectionWFS(d,e,f),c.setLayersWFS(a.getLayerName());var g=15,h=vw.Util.trim(this.getLabelRenderer().getField()),i=this.getRenderer(),j=i.getStyle(),k=j.getText(),l=k.getHalo().color.getSopColor(),m=k.getFont().getColor().getSopColor(),n=k.getFont().getName();if(null!=j.getMarker().getSrc()){var o=j.getMarker().getSrc(),p=c.getWFSSymbol(),q=p.getIcon();q.setNormalIcon(o),p.setIcon(q),c.setWFSSymbol(p)}c.setRequestFeatureCount(a.getMaxFeatures()),c.setFontStyle(n,12,200,m,l),c.setWFSGeoField('sop:ag_geom'),c.setWFSPointName('sop:'+h),c.setViewLimit(20),c.setLevelWFS(13),c.setWFSPropertyName(vw.Util.trim(a.getFeatureNames())),c.setLevelWFS(g)}},addEvt:function(a,b,c,d,e){b==vw.EditType.INSERT&&e.addThis()},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.layer.Vector;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(a){a instanceof vw.source.Source&&(this.source=a),this.renderer=new vw.renderer.SimpleRenderer,this.labelRenderer=new vw.renderer.TextRenderer},CLASS_NAME:"vw.layer.Vector"}),vw.layer.GraphicsGroup=vw.Util.Class(vw.layer.Group,{active:null,add:function(a){},setActive:function(a){},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.layer.GraphicsGroup;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(){},CLASS_NAME:"vw.layer.GraphicsGroup"}),vw.layer.Graphics=vw.Util.Class(vw.layer.Feature,{clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.layer.Graphics;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(){},CLASS_NAME:"vw.layer.Graphics"}),vw.layer.Graphic=vw.Util.Class(vw.layer.Feature,{label:null,labelVisible:null,clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.layer.Graphic;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(a){},CLASS_NAME:"vw.layer.Graphic"}),vw.layer.Selection=vw.Util.Class(vw.layer.Feature,{clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.layer.Selection;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(){},CLASS_NAME:"vw.layer.Selection"}),vw.layer.Terrain=vw.Util.Class(vw.layer.Sourced,{id:null,customTerrains:"",backgroundColor:"",wireframe:!1,wireframeColor:"",setId:function(a){this.id=a},getId:function(){return this.id},getCustomTerrains:function(){return this.customTerrains},setBackgroundColor:function(a){this.backgroundColor=a},getBackgroundColor:function(){return this.backgroundColor},setWireframe:function(a){this.wireframe=a},getWireframe:function(){return this.wireframe},setWireframeColor:function(a){this.wireframeColor=a},getWireframeColor:function(){return this.wireframeColor},getElevation:function(a){return vw.StaticMap._XDcom.getView().getTerrHeight(a.x,a.y)},setVisible:function(){return"지형은 숨길 수 없습니다."},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.layer.Terrain;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(a){null==a&&(this.id="terrainLayer"),this.backgroundColor=vw.Color.BLACK,this.wireframe=!1,this.wireframeColor=vw.Color.WHITE},CLASS_NAME:"vw.layer.Terrain"}),vw.layer.Model=vw.Util.Class(vw.layer.Sourced,{source:null,texture:"",color:"",wireframe:!1,wireframeColor:"",setSource:function(a){this.source=pId},getSource:function(){return this.source},setTexture:function(a){this.texture=a},getTexture:function(){return this.texture},setColor:function(a){this.color=a},getColor:function(){return this.color},setWireframe:function(a){a?vw.StaticMap._XDcom.getView().setRenderMode(1):vw.StaticMap._XDcom.getView().setRenderMode(0),this.wireframe=a},getWireframe:function(){return this.wireframe},setWireframeColor:function(a){this.wireframeColor=a},getWireframeColor:function(){return this.wireframeColor},setVisible:function(a){this.visible=a;var b=258;b=a?258:257,"facility_build"==this.name&&(vw.StaticMap._XDcom.getLayerList().setVisible("facility_build",b),vw.StaticMap._XDcom.getLayerList().setVisible("facility_bridge",b),vw.Util.mapRender())},getVisible:function(){return this.visible},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.layer.Model;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(a){null==a&&(this.id="BASE_Terrain"),this.backgroundColor=vw.Color.BLACK,this.wireframe=!1,this.wireframeColor=vw.Color.WHITE},CLASS_NAME:"vw.layer.Model"}),vw.Overlays=vw.Util.Class(vw.Object,{popup:"",chart:"",getPopup:function(){return this.popup},getChart:function(){return this.chart},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.Overlays;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(){},CLASS_NAME:"vw.Overlays"}),vw.Overlay=vw.Util.Class(vw.Feature,{position:"",anchor:null,offset:"",visible:null,setPosition:function(a){this.position=a},getPosition:function(){return this.position},setAnchor:function(a){this.anchor=a},getAnchor:function(){return this.anchor},setOffset:function(a){this.offset=p},getOffset:function(){return this.offset},setVisible:function(a){this.visible=p},getVisible:function(){return this.visible},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.Overlay;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(){this.anchor=vw.SiteAlignType.BOTTOM_CENTER,this.visible=!0},CLASS_NAME:"vw.Overlay"}),vw.layer.ChartGroup=vw.Util.Class(vw.layer.Group,{clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.layer.ChartGroup;for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},initialize:function(){},CLASS_NAME:"vw.layer.ChartGroup"}),vw.layer.Chart=vw.Util.Class(vw.layer.Feature,{styles:"",legend:"",setStyles:function(a){this.styles=p},getStyles:function(){return this.styles},setLegend:function(a){this.legend=a},getLegend:function(){return this.legend},setFeature:function(a){var b=vw.StaticMap._XDcom.getGraph(),c=b.createTable(a.id),d=vw.StaticMap._XDcom.createColor();c.setType(a.type),0==a.type?c.set2DSize(a.size.width,a.size.height):1==a.type?c.set2DSize(a.radius,a.radius):c.set2DSize(400,400),null!=this.minZoom?pTable.setVisibleRange(this.minZoom,this.maxZoom):pTable.setVisibleRange(1e3,1e5);for(var e=pTable.getLegends(),f=null,g=null,h=0;h1&&(this.points=a)},getPoints:function(){return this.points},getSegment:function(a){return new vw.geom.Line(this.points.item(a))},getPointByDistance:function(a,b){var c=0;return b||this.getLenth()1&&(this.points=a)},CLASS_NAME:"vw.geom.LineString"}),vw.geom.LinearRing=vw.Util.Class(vw.geom.PointGroup,{points:null,setPoints:function(a){a instanceof vw.Collection&&a.getCount()>1&&(a.add(a.item(0)),this.points=a)},getPoints:function(){return this.points},getSegment:function(a){return!(a>this.getPoints().getCount()-1)&&new vw.geom.Line(this.points.item(a),this.points.item(a+1))},getArea:function(){for(var a=0,b=0;b1&&(a.add(a.item(0)),this.points=a)},CLASS_NAME:"vw.geom.LinearRing"}),vw.geom.Polygon=vw.Util.Class(vw.geom.PointGroup,{rings:null,getRings:function(){return this.rings},getArea:function(){return 10},getLength:function(){for(var a=0,b=0;b20000){this._indoorCamera.moveLonLatAltOval(126.98453506288851,37.49207023859339,7000,0),this._indoorCamera.setTilt(70),this._indoorCamera.setDirect(0)}indoorModeFlag=true},stop:function(){var camflag=this._indoorCamera.getMoveMode();var nowALt=this._indoorCamera.getAltitude();this._indoorCamera.setAnimationSpeed(10);if(indoorModeFlag){indoorlayerObj=this._MapObj.getLayerList().nameAtLayer(vw.Indoor.INDOOR_LAYER_BUILD);indoorlayerPoiObj=this._MapObj.getLayerList().nameAtLayer(vw.Indoor.INDOOR_LAYER_POI);if((typeof vw.Indoor.INDOOR_LAYERS_EXCLUDE!='object')||(vw.Indoor.INDOOR_LAYERS_EXCLUDE.length==0))return;for(var i=0;i=701){setTimeout(function(){this._indoorCamera.setAnimationSpeed(this.animationSpeed),this._indoorCamera.setMoveMode(true),this._indoorCamera.setPickMode(true)}.bind(this),7000)}}}.bind(this),timedelay)}vw.StaticMap.setFocus()},moveIndoorInside:function(uid,x,y,z,direct){if(indoorModeFlag){this._indoorView.MapRender();var vec3=vw.StaticMap._XDcom.createVec3();vec3.Longitude=x;vec3.Latitude=y;vec3.Altitude=z;if(this._indoorCamera.getMoveMode()==true){this._indoorCamera.setPickMode(false),this._indoorCamera.move(vec3,0,direct,0);if(this._indoorCamera.getMoveMode()==false){this._indoorCamera.setMoveMode(true)}this._indoorCamera.setPickMode(true)}else{this._indoorCamera.setAnimationSpeed(this.animationSpeed);this._indoorCamera.setMoveMode(true);setTimeout(function(){this._indoorCamera.setPickMode(true);this._indoorCamera.move(vec3,0,direct,0);if(this._indoorCamera.getMoveMode()==false){this._indoorCamera.setMoveMode(true)}this._indoorCamera.setPickMode(true)}.bind(this),7000)}}else{return false}vw.StaticMap.setFocus()},showIndoorLayer:function(){return vw.Indoor.INDOOR_LAYERS},clone:function(){if(null==this||"object"!=typeof this)return this;var a=new vw.indoor.Indoor();for(var b in this){if(this.hasOwnProperty(b))a[b]=this[b]}return a},initialize:function(){this._indoorCamera=vw.StaticMap._XDcom.getViewCamera(),this._indoorView=vw.StaticMap._XDcom.getView(),this._MapObj=vw.idleproc.map.pluginObject,this._MapControl=vw.StaticMap._XDcom.getControl()},CLASS_NAME:"vw.indoor.Indoor"}),vw.indoor.Info=vw.Util.Class(vw.Indoors,{isIndoorData:false,indoorDataFlag:false,_JSONIndoorList:null,idmUID:null,IsIndoorData:function(){return this.isIndoorData=this.indoorDataFlag},getIndoorTypes:function(){return vw.Indoor.INDOOR_CATEGORY},getIndoorTypeList:function(){_JSONIndoorList=null;try{var xhttp=new XMLHttpRequest();xhttp.onreadystatechange=function(){if(this.readyState==4&&this.status==200){_JSONIndoorList=this.responseText}};xhttp.open("POST",vw.Indoor.INDOORLIST_URL,false);xhttp.send()}catch(e){}return _JSONIndoorList},getEntranceInfos:function(a){_JSONIndoorList=null;var b=new FormData();b.append('uid',a);try{var xhttp=new XMLHttpRequest();xhttp.onreadystatechange=function(){if(this.readyState==4&&this.status==200){_JSONIndoorList=this.responseText}};xhttp.open("POST",vw.Indoor.INDOORGATELIST_URL,false);xhttp.send(b)}catch(e){}return _JSONIndoorList},getIndoorInfo:function(a){_JSONIndoorList=null;var b=new FormData();b.append('uid',a);try{var xhttp=new XMLHttpRequest();xhttp.onreadystatechange=function(){if(this.readyState==4&&this.status==200){_JSONIndoorList=this.responseText}};xhttp.open("POST",vw.Indoor.INDOORINFOLIST_URL,false);xhttp.send(b)}catch(e){}return _JSONIndoorList},initialize:function(){this.indoorDataFlag=true},CLASS_NAME:"vw.indoor.Info"});