2 lines
214 KiB
JavaScript
2 lines
214 KiB
JavaScript
|
|
/**/_jsload2&&_jsload2('tile', 'function Cg(){this.Fd=this.Sp=this.Ep=this.Sj=p;this.JE=q;this.ii=p}x.lang.ua(Cg,fd,"MobileInfoWindow"); x.extend(Cg.prototype,{initialize:function(a){this.D=a;this.ii=document.createElement("div");this.ii.className="iw";this.ii.style.cssText="position:absolute; line-height:28px; text-align:center; border:0px;";var b=this.Sj=document.createElement("div");this.ii.appendChild(b);this.Ep=document.createElement("div");this.Ep.className="iw_l";b.appendChild(this.Ep);this.Sp=document.createElement("div");this.Sp.className="iw_r";b.appendChild(this.Sp);this.rk=document.createElement("a");this.rk.setAttribute("target", "_blank");this.rk.className="iw_s iw_s0 iw_c";this.rk.innerHTML="<div class=\'iw_bg iw_cc\'></div>";b.appendChild(this.rk);a.Rf().LD.appendChild(this.ii);this.bind();this.Fd=this.rk.getElementsByTagName("DIV")[0];this.Ep.style.display="block";this.Sp.style.display="block";return this.ii},bind:function(){var a=this;x.M(a.Ep,"click",function(b){a.nZ();b.preventDefault();b.stopPropagation()});x.M(a.Sp,"click",function(b){a.WY();b.preventDefault();b.stopPropagation()});x.M(a.rk,"click",function(a){a.stopPropagation()}); x.Fb("touchstart touchmove touchend gesturestart gesturechange mousedown mouseout mouseover click mousewheel keydown selectstart".split(" "),function(b){x.M(a.rk,b,na);x.M(a.Ep,b,na);x.M(a.Sp,b,na)})},rJ:t(),hJ:t(),ia:function(){return new K(this.BI.lng,this.BI.lat)},ta:t(),Va:v("JE"),U:function(){x.K.U(this.V);this.ii.style.display="none";this.JE=q},show:function(a){a&&(this.point=a);x.K.show(this.V);this.ii.style.display="block";this.JE=o;this.D.R.ob=this},s_:function(){var a=this.D,b=this.Yh,c= this.Sj.offsetWidth,d=this.Sj.offsetHeight,e=a.vb(),c=c/2+16,d=d/2+78;if(this.Yh){var f=new R(0,0);b.x<c?f.x=c-b.x:e.width-b.x-8<c&&(f.x=e.width-b.x-8-c);b.y<d?f.y=d-b.y:60>e.height-b.y&&(f.y=e.height-b.y-60);0==f.x&&0==f.y||a.zg(f.x,f.y)}},switchTo:function(a){this.Yh=a.point;this.ff=a.name;this.nk=a.uid;this.gk=a.Aa;this.OT=parseInt(this.D.platform.style.left);this.PT=parseInt(this.D.platform.style.top);this.BI=this.D.Rb(this.Yh);this.show();this.QZ();this.mO()},A4:function(){this.Sj.className= "iw_rt";this.show();this.mO()},QZ:function(){this.rk.setAttribute("href","http://map.baidu.com/place/detail?uid="+this.nk+"&output=html&source=jsapi&operate=mapclick&clicktype=vector");this.Sj.className="iw_rt";this.Fd.innerHTML="<div class=\'iw_poir\'><div class=\'crl_ar\' style=\'white-space:nowrap;text-overflow:ellipsis;overflow:hidden;\'>"+this.ff+"</div></div>";this.draw()},mO:function(){var a=this;a.yE||(a.yE=setTimeout(function(){a.s_();clearTimeout(a.yE);a.yE=p},100))},r5:function(){var a=$("popList"); 43<this.Fd.textContent.length&&(58<=this.Fd.textContent.length?a.Ta("zoom2"):a.Ta("zoom1"))},g2:function(){this.Fd.innerHTML=""},draw:function(){if(this.Yh){var a=this.Yh,b=a.y;this.ii.style.left=a.x-98-this.OT+"px";this.ii.style.top=b-62-this.PT+"px"}},L3:function(){Va()&&(location.href="http://map.baidu.com/detail?qt=ninf&wd=&detail=scope&uid="+this.nk);J()&&(location.href="http://map.baidu.com/mobile/#place/detail/qt=inf&c=131&uid="+this.nk)},nZ:function(){this.D.Rb(this.Yh);var a=this.D.ga(), a=Math.pow(2,18-a),b=this.D.vb(),c=this.D.dc,a="http://map.baidu.com/mobile/?third_party=uri_api#index/searchnearby/foo=bar/"+this.TY({nb_x:c.lng+a*(this.Yh.x-b.width/2),nb_y:c.lat-a*(this.Yh.y-b.height/2),center_name:this.ff,from:"searchnearby"});window.open(a,"_blank")},WY:function(){var a=this.D.bh,b=this.D.Wb()?"&operate=vectorclick":"&operate=mapclick",a=B.oc+"direction?origin=\\u6211\\u7684\\u4f4d\\u7f6e&destination="+this.ff+"&mode=navigation&output=html&src=jsapi"+b+"®ion="+a;Ra("navlinkmobile"); window.open(a,"_blank")},TY:function(a){if(!a)return"";var b=[],c;for(c in a)b.push(c+"="+encodeURIComponent(a[c]));return b.join("&")}});B.NG=Cg;window.Eb={1:[3,-1497178369,[2,-1497178369,1,0,0,[],0,0]],10:[2,-1365210369,2,2,2,[4,3],1,0],100:[2,-237677057,8,2,2,[],2,0],1E3:[2,-843149313,8,0,2,[],1,0],1001:[2,-843149313,12,0,2,[],1,0],1002:[2,-237677057,3,0,2,[],1,0],1003:[2,-2376770
|