You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pingAnQiYeWeb/public/modules/panoramaflash_wnw23f.js

1 line
12 KiB

/**/_jsload2 && _jsload2('panoramaflash', 'x.extend(Qa.prototype,{Vi:function(){for(var a=0;a<B.Tr.length;a++)B.Tr[a](this);this.Nf!=p&&this.dispatchEvent(new N("onvisible_poi_type_changed"),{visiblePOIType:this.Nf});this.ql=this.jh();this.gs=this.hd=q;this.br={};this.gd=new Dk(this);this.mT();this.WQ();this.YQ();if(this.Ya||this.Kb)this.Ya?this.rc(this.Ya,this.Le):this.ta(this.Kb)},YQ:function(){var a=this;setInterval(function(){if(a.Yb()){var b=a.jh();b.ab(a.ql)||(a.gd.set("size",{width:b.width,height:b.height}),a.ql=b,a.dispatchEvent(new N("size_changed")))}}, 80)},mT:function(){var a=this.gd,b=this;a.addEventListener("clicked_position",function(a){b.dispatchEvent(new N("onclicked_position"),a)});a.addEventListener("thumbnail_complete",function(){b.dispatchEvent(new N("onthumbnail_complete"))});a.addEventListener("indoor_enter",function(a){a.data.R4===p?b.Fj({haveBreakId:q}):b.Fj({haveBreakId:o});b.dispatchEvent(new N("onhaveBreakId_changed"))});a.addEventListener("first_thumb_complete",function(){var a,d;if(b.hd!==o){b.hd=o;a=this;b.Ya=a.get("id");"street"!= b.Le&&(b.Le="street",b.fz("inter"));b.uo=a.get("links");d=a.get("position");b.Kb=d;d=a.get("pov");!b.Ea.heading&&!b.Ea.pitch?b.Ea=d:(d.heading!=b.Ea.heading||d.pitch!=b.Ea.pitch)&&a.set("pov",b.Ea);d=a.get("zoom");1==!b.Kc&&1!=d?b.Kc==d:b.Kc!=d&&a.set("zoom",b.Kc);d=p;for(var e in b.Ke)d=b.Ke[e],delete b.Ke[e],b.Ka(d);b.k.navigationControl===q&&a.set("navigationControlVisible",q);var f=function(b){a.Vs("toggleUI",{topo:b.linksControl,wellLid:b.clickOnRoad,innerExit:q,innerFloor:b.indoorFloorControl})}; f(b.k);b.addEventListener("clickonroad_changed",function(){f(b.k)});b.addEventListener("links_visible_changed",function(){f(b.k)});b.addEventListener("onindoorfloor_options_changed",function(){f(b.k)});b.addEventListener("navigation_visible_changed",function(){a.set("navigationControlVisible",b.k.navigationControl)});if(0<b.Vg.length){e=0;for(d=b.Vg.length;e<d;e++)b.Vg[e].register(b.C,b,b.gd);var g="",i=[];e=0;for(d=b.Wr.length;e<d;e++)g=b.Wr[e].wN,i=b.Wr[e].vN,b[g].apply(b,i)}b.k.visible?b.show(): b.U()}});a.addEventListener("pano_error",function(){b.dispatchEvent(new N("error"))});a.addEventListener("id_changed",function(a){if(b.hd||b.Ya==p||"inter"==b.Le)b.Ya=a.data;b.dispatchEvent(new N("onid_changed"))});a.addEventListener("position_changed",function(a){b.hd?b.Kb=b.gd.get("position"):b.Kb==p&&(b.Kb=a.data);b.dispatchEvent(new N("onposition_changed"))});a.addEventListener("pov_changed",function(a){if(b.hd||b.Ea.heading==p)b.Ea=a.data;b.dispatchEvent(new N("onpov_changed"))});a.addEventListener("links_changed", function(a){if(b.hd||0==b.uo.length)b.uo=a.data;b.dispatchEvent(new N("onlinks_changed"))});a.addEventListener("zoom_changed",function(a){if(b.hd||b.Kc==p)b.Kc=a.data;b.dispatchEvent(new N("onzoom_changed"))});a.addEventListener("sdata_loaded",function(a){b.fz(a.data.panoType);b.dispatchEvent(new N("oncopyright_changed"),{copyright:a.data.copyright});if(b.gs){for(var d in b.br)b[d](b.br[d]);b.gs=q;b.br={}}});a.addEventListener("overlay_mouseclick",function(a){a=b.Ke[a.data.markerId];a.dispatchEvent(new N("onclick"), {type:"click",target:a})});a.addEventListener("overlay_mouseover",function(a){a=b.Ke[a.data.markerId];a.dispatchEvent(new N("onmouseover"),{type:"mouseover",target:a})});a.addEventListener("overlay_mouseout",function(a){a=b.Ke[a.data.markerId];a.dispatchEvent(new N("onmouseout"),{type:"mouseout",target:a})})},WQ:function(){var a=this;x.M(this.C,ka.da.Te?"DOMMouseScroll":"onmousewheel",function(b){if(a.k.enableScrollWheelZoom&&a.k.visible){var c=-b.detail/3||b.wheelDelta/120,c=a.ga()+c;a.Oc(c);Gb(b)}})}, rc:function(a,b,c){"object"===typeof b&&(c=b,b=k);if(!this.hd||a&&a!=this.Ya)this.hd||(this.Ya=a,this.Le=b||"street",this.Kb=p),this.gd.set("id",{id:a,type:b||"street"}),this.gs=o,c&&c.pov&&this.Nc(c.pov)},ta:function(a){if(!this.hd||a&&!this.Kb.ab(a))this.hd||(this.Kb=a,this.Ya=p),this.gd.set("position",a),this.gs=o},Nc:function(a){a&&(90<a.pitch&&(a.pitch=90),-90>a.pitch&&(a.pitch=-90),this.hd?this.gs?this.br.setPov=a:this.gd.set("pov",a):this.Ea=a)},Oc:function(a){a!=this.Kc&&(a>Qe&&(a=Qe),a<Re&& (a=Re),this.hd?this.gd.set("zoom",a):this.Kc=a,this.br.setZoom=a)},show:function(){this.k.visible=o;this.Af&&(this.D&&this.D.Ga()===this.C)&&x.K.show(this.Af);this.gd&&this.gd.Sr&&(this.gd.Sr.style.left="0");this.hd&&(this.Dl===this.Yb()&&this.gd.set("id",{id:this.Dl,type:this.BT||"street"}),this.dispatchEvent(new N("onvisible_changed")))},U:function(){this.k.visible=q;this.hd&&(this.Dl=this.Ya,this.BT=this.Le,this.gd.Vs("closePano"));this.Ya=p;this.gd&&this.gd.Sr&&(this.gd.Sr.style.left="-9999px"); this.dispatchEvent(new N("onvisible_changed"))},uC:function(a){function b(a,b){return function(){a.Wr.push({wN:b,vN:arguments})}}if(this.hd)a.register(this.C,this,this.gd);else for(var c=a.getPanoMethodList(),d="",e=0,f=c.length;e<f;e++)d=c[e],this[d]=b(this,d);this.Vg.push(a)},KF:function(a){this.hd&&a.dispose();for(var b=this.Vg.length;b--;)this.Vg[b]===a&&this.Vg.splice(b,1)},ru:function(a){this.Nf=a||"none";this.dispatchEvent(new N("onvisible_poi_type_changed"),{visiblePOIType:this.Nf})},Ka:function(a){this.Ke[a.kd]= a;this.hd&&this.dispatchEvent(new N("onadd_overlay"),{overlay:a})},Ub:function(a){var b=a.kd;this.hd&&this.dispatchEvent(new N("onremove_overlay"),{overlay:a});delete this.Ke[b]},mp:function(){var a=this.gd.get("indoorData");a&&a.pid&&this.rc(a.pid)},$F:function(a){this.gd.set("interactiveState",a)}});Oj=Qa.prototype; U(Oj,{setId:Oj.rc,setPosition:Oj.ta,setPov:Oj.Nc,setZoom:Oj.Oc,show:Oj.show,hide:Oj.U,addPlugin:Oj.uC,removePlugin:Oj.KF,addOverlay:Oj.Ka,removeOverlay:Oj.Ub,setPanoramaPOIType:Oj.ru,exitInter:Oj.mp,setInteractiveState:Oj.$F});function Ek(){this.XT=(this.WA=window.ActiveXObject&&!(window.opera&&!window.opera.nodeType))?\' classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"\':\' type="application/x-shockwave-flash"\';this.bJ=["id","width","height","align","data"];this.cJ="wmode movie flashvars scale quality play loop menu salign bgcolor base allowscriptaccess allownetworking allowfullscreen seamlesstabbing devicefont swliveconnect".split(" ")} x.extend(Ek.prototype,{create:function(a,b){var c=this.tS(a);b&&"string"===typeof b&&(b=document.getElementById(b));b?b.innerHTML=c:document.write(c)},remove:function(a){if((a=this.oM(a))&&this.WA){a.style.display="none";for(var b in a)"function"===typeof a[b]&&(a[b]=p);window.VP&&setTimeout(window.VP,0)}a.parentNode.removeChild(a)},VX:function(){function a(){var c=function(){var a=navigator;if(a.plugins&&a.mimeTypes.length){if((a=a.plugins["Shockwave Flash"])&&a.description)return a.description.replace(/([a-zA-Z]|\\s)+/, "").replace(/(\\s)+r/,".")+".0"}else if(b.WA)try{var c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(c)return c.GetVariable("$version").replace(/WIN/g,"").replace(/,/g,".")}catch(f){}}();a=function(){return c};return c}var b=this;return a()},oM:function(a){return document.getElementById(a)},JH:function(a,b){for(var a=a.split("."),b=b.split("."),c=Math.max(a.length,b.length),d=0;d<c;d++){var e=a[d],f=b[d];if(!e||!f)return!e&&!f?0:e?1:-1;e=Number(e);f=Number(f);if(e<f)return-1;if(e>f)return 1}return 0}, tS:function(a){a=a||{};a.movie=a.url||"";a.altHtml=a.errorMessage||"";if(a.vars){var b=a.vars,c=[],d=p,e=p;for(d in b)e=b[d],c.push(d+"="+encodeURIComponent(e));a.flashvars=c.join("&")}a.minVer=a.ver;b=a.minVer;c=a.maxVer;if(b||c)if(d=this.VX(),!d||b&&0>this.JH(d,b)||c&&0<this.JH(d,c))return a.altHtml||"";d=["<object",this.XT];a.data=a.movie;for(b=0;b<this.bJ.length;b++)c=this.bJ[b],a.hasOwnProperty(c)&&d.push(" ",c,\'="\',a[c],\'"\');d.push(">");for(b=0;b<this.cJ.length;b++)c=this.cJ[b],a.hasOwnProperty(c)&& d.push(\'<param name="\',c,\'" value="\',a[c],\'"/>\');d.push("</object>");return d.join("")}});function Fk(a,b){this.P=a;this.qS=b;this.Vh={};this.cA()}x.extend(Fk.prototype,{cA:function(){var a=this,b=a.P;b.addEventListener("add_overlay",function(b){b=b.overlay;b.ra(a.P,a.qS);a.Vh[b.kd]=b});b.addEventListener("remove_overlay",function(b){b=b.overlay;b.remove();delete a.Vh[b.kd]})}});x.extend(Ue.prototype,{ra:function(a,b){this.P=a;this.ia()||this.ta(this.P.ia());this.Ba=b;this.Ab()},Ab:function(){var a=this.ia(),a=bd.Xd.xy(a),a={markerId:this.kd,catalog:"FD01",name:this.Dk(),rank:this.pp(),x:a.x,y:a.y,color:this.Qm(),hoverColor:this.AM,backgroundHoverColor:this.DK,borderColor:this.borderColor,borderHoverColor:this.HK,backgroundColor:this.backgroundColor,padding:this.padding,fontSize:this.fontSize,borderWidth:this.borderWidth};if(this.KE||this.getImageData())a.imageUrl=this.KE, a.imageData=this.getImageData(),a.size=this.vb(),a.image=this.Px(),a.catalog="FD02",this.vb()&&(a.width=this.vb()[0],a.height=this.vb()[1]);this.Ba.pO(a)},hide:function(){this.Oa=q;this.Ba&&this.Ba.bp(this.kd,"visible",q)},show:function(){this.Oa=o;this.Ba&&this.Ba.bp(this.kd,"visible",o)},isVisible:v("Oa"),Mf:function(a,b){this.Ba&&("position"==a&&(b=bd.Xd.Fl(b),b={lng:b.x,lat:b.y}),this.Ba.bp(this.kd,a,b))},remove:function(){this.dispatchEvent(new N("onremove"),{type:"remove",target:this});this.Ba.kL([this.kd])}});var Gk={none:"",transit:"FE0A",hotel:"FE02",catering:"FE01",movie:"FE06",indoor_scene:"FEFE"},Hk={none:["-1",""],transit:["0","m_transit.png"],hotel:["1","m_hotel.png"],catering:["2","m_catering.png"],movie:["3","m_movie.png"],transit:["4","m_transit.png"],indoor_scene:["5","m_indoor_scene.png"]}; x.extend(Xe.prototype,{ra:function(a,b){this.P=a;this.Ba=b;this.Ab()},Ab:function(){var a=this.ia(),a=bd.Xd.Fl(a),b=this.MS(),c=this.vE();this.Ba.pO({markerId:this.kd,catalog:b,name:this.Ap(),rank:this.pp(),x:a.x,y:a.y,heading:c.heading,pitch:c.pitch,pid:c.panoId,panoIId:c.panoIId})},MS:function(){var a=this.sp().match(/.*\\/(.*)/)[1],b;for(b in Hk)if(Hk[b][1]==a)return Gk[b]},hide:function(){this.Oa=q;this.Ba.bp(this.kd,"visible",q)},show:function(){this.Oa=o;this.Ba.bp(this.kd,"visible",o)},isVisible:v("Oa"), Mf:function(a,b){"position"==a&&(b=bd.Xd.Fl(b),b={lng:b.x,lat:b.y});this.Ba.bp(this.kd,a,b)},remove:function(){this.dispatchEvent(new N("onremove"),{type:"remove",target:this});this.Ba.kL([this.kd])}});Dk.Ao=new bd(p,{of:"api"});function Dk(a){x.lang.Da.call(this);a&&(this.P=a,this.Og=p,this.XH=a.C.clientWidth,this.WH=a.C.clientHeight,new Fk(a,this))}Dk.uQ=B.Sf("pano");x.lang.ua(Dk,x.lang.Da,"PanoramaFlashWraper"); x.extend(Dk.prototype,{pO:function(a){this.Vs("addMarkers",[a])},kL:function(a){this.Vs("removeMarkers",[a])},bp:function(a,b,c){var d={};d.markerId=a;d[b]=c;this.set("markerProperty",d)},get:function(a){var b=p;"position"==a?(b=this.Og.get("mercatorPosition"),b=bd.Xd.Ej(new R(b.mercatorX,b.mercatorY))):b=this.Og.get(a);return b},set:function(a,b){var c=this;"position"==a?Dk.Ao.tj(b,function(a){a&&a.id?c.P.rc(a.id):c.dispatchEvent(new N("pano_error"))}):"id"==a?c.Og==p?c.tT(c.P):c.Og.set&&c.Og.set("panoOptions", {id:b.id,panoType:b.type,width:c.XH,height:c.WH}):c.Og&&c.Og.set&&c.Og.set(a,b)},Vs:function(a,b){return this.Og.doAction(a,b)},F3:v("Sr"),tT:function(a){var b=this,c=a.k.swfSrc.match(/.*\\//)[0]+"BDStreetScape.swf";b.Og=o;Dk.Ao.$x(function(d){var e="",f="";"inter"===a.Le?f=a.Ya:e=a.Ya;e={pid:e,iid:f,panoType:a.Le,heading:a.Ea.heading,pitch:a.Ea.pitch,width:b.XH,height:b.WH,panoUrl:c,panoTileUrl:Dk.uQ.join("|"),domain:bd.ev,jsInterfaceNamespace:"BMap.PanoramaFlashInterface",swfIndex:b.ba};f=a.k.swfSrc; d&&(d.panoUdt&&d.panoUdt.version&&e)&&(e.udtVersion=d.panoUdt.version);d&&(d.panoSwfAPI&&d.panoSwfAPI.version&&e)&&(e.panoUrl=e.panoUrl+"?version="+d.panoSwfAPI.version,f=f+"?version="+d.panoSwfAPI.version);b.Og=b.JR(a.C,e,f)})},JR:function(a,b,c){var d=new Ek,e="PanoramaFlash"+this.ba,f=p,f=H("div");f.style.position="absolute";f.id="PanoramaFlashWraper"+this.ba;f.style.top="0";f.style.left="0";f.style.height="100%";f.style.width="100%";f.style.zIndex=1200;this.Sr=f;a.appendChild(f);d.create({id:e, width:"100%",height:"100%",allowscriptaccess:"always",scale:"showall",wmode:"opaque",quality:"best",url:c,ver:"10.2",errorMessage:"\\u60a8\\u672a\\u5b89\\u88c5Flash Player\\u64ad\\u653e\\u5668\\u6216\\u8005\\u7248\\u672c\\u8fc7\\u4f4e",vars:b},f);return d.oM(e)}});var Ik=Dk.prototype;U(Ik,{get:Ik.get,set:Ik.set,doAction:Ik.Vs}); ');