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.

2 lines
10 KiB

3 months ago
/**/_jsload2&&_jsload2('tile', 'function lg(){this.Dd=this.ep=this.So=this.yj=s;this.BD=t;this.Nh=s}z.lang.wa(lg,mc,"MobileInfoWindow"); z.extend(lg.prototype,{initialize:function(a){this.M=a;this.Nh=document.createElement("div");this.Nh.className="iw";this.Nh.style.cssText="position:absolute; line-height:28px; text-align:center; border:0px;";var b=this.yj=document.createElement("div");this.Nh.appendChild(b);this.So=document.createElement("div");this.So.className="iw_l";b.appendChild(this.So);this.ep=document.createElement("div");this.ep.className="iw_r";b.appendChild(this.ep);this.Zj=document.createElement("a");this.Zj.setAttribute("target", "_blank");this.Zj.className="iw_s iw_s0 iw_c";this.Zj.innerHTML="<div class=\'iw_bg iw_cc\'></div>";b.appendChild(this.Zj);a.Mf().BC.appendChild(this.Nh);this.bind();this.Dd=this.Zj.getElementsByTagName("DIV")[0];this.So.style.display="block";this.ep.style.display="block";return this.Nh},bind:function(){var a=this;z.V(a.So,"click",function(b){a.vY();b.preventDefault();b.stopPropagation()});z.V(a.ep,"click",function(b){a.cY();b.preventDefault();b.stopPropagation()});z.V(a.Zj,"click",function(a){a.stopPropagation()}); z.Nb("touchstart touchmove touchend gesturestart gesturechange mousedown mouseout mouseover click mousewheel keydown selectstart".split(" "),function(b){z.V(a.Zj,b,na);z.V(a.So,b,na);z.V(a.ep,b,na)})},bI:u(),RH:u(),ja:function(){return new J(this.nH.lng,this.nH.lat)},ua:u(),Za:x("BD"),aa:function(){z.R.aa(this.ba);this.Nh.style.display="none";this.BD=t},show:function(a){a&&(this.point=a);z.R.show(this.ba);this.Nh.style.display="block";this.BD=p;this.M.$.rb=this},DZ:function(){var a=this.M,b=this.Gh, c=this.yj.offsetWidth,e=this.yj.offsetHeight,f=a.Hb(),c=c/2+16,e=e/2+78;if(this.Gh){var g=new R(0,0);b.x<c?g.x=c-b.x:f.width-b.x-8<c&&(g.x=f.width-b.x-8-c);b.y<e?g.y=e-b.y:60>f.height-b.y&&(g.y=f.height-b.y-60);0==g.x&&0==g.y||a.tg(g.x,g.y)}},switchTo:function(a){this.Gh=a.point;this.jd=a.name;this.Vj=a.uid;this.Nj=a.Da;this.qS=parseInt(this.M.platform.style.left);this.rS=parseInt(this.M.platform.style.top);this.nH=this.M.Ib(this.Gh);this.show();this.fZ();this.bN()},w4:function(){this.yj.className= "iw_rt";this.show();this.bN()},fZ:function(){this.Zj.setAttribute("href","http://map.baidu.com/place/detail?uid="+this.Vj+"&output=html&source=jsapi&operate=mapclick&clicktype=vector");this.yj.className="iw_rt";this.Dd.innerHTML="<div class=\'iw_poir\'><div class=\'crl_ar\' style=\'white-space:nowrap;text-overflow:ellipsis;overflow:hidden;\'>"+this.jd+"</div></div>";this.draw()},bN:function(){var a=this;a.rD||(a.rD=setTimeout(function(){a.DZ();clearTimeout(a.rD);a.rD=s},100))},x5:function(){var a=$("popList"); 43<this.Dd.textContent.length&&(58<=this.Dd.textContent.length?a.eb("zoom2"):a.eb("zoom1"))},F1:function(){this.Dd.innerHTML=""},draw:function(){if(this.Gh){var a=this.Gh,b=a.y;this.Nh.style.left=a.x-98-this.qS+"px";this.Nh.style.top=b-62-this.rS+"px"}},y3:function(){Xa()&&(location.href="http://map.baidu.com/detail?qt=ninf&wd=&detail=scope&uid="+this.Vj);I()&&(location.href="http://map.baidu.com/mobile/#place/detail/qt=inf&c=131&uid="+this.Vj)},vY:function(){this.M.Ib(this.Gh);var a=this.M.ka(), a=Math.pow(2,18-a),b=this.M.Hb(),c=this.M.fc,a="http://map.baidu.com/mobile/?third_party=uri_api#index/searchnearby/foo=bar/"+this.$X({nb_x:c.lng+a*(this.Gh.x-b.width/2),nb_y:c.lat-a*(this.Gh.y-b.height/2),center_name:this.jd,from:"searchnearby"});window.open(a,"_blank")},cY:function(){var a=this.M.Tg,b=this.M.Nd()?"&operate=vectorclick":"&operate=mapclick",a=D.Cd+"direction?origin=\\u6211\\u7684\\u4f4d\\u7f6e&destination="+this.jd+"&mode=navigation&output=html&src=jsapi"+b+"&region="+a;Ta("navlinkmobile"); window.open(a,"_blank")},$X:function(a){if(!a)return"";var b=[],c;for(c in a)b.push(c+"="+encodeURIComponent(a[c]));return b.join("&")}});D.p0=lg;z.extend(Jc.prototype,{YO:function(){this.QF(this.map);this.To(0)},uD:function(a){this.Ot=new Kc(this);this.Ot.Me(new Lc(this.map,this.Ot,a.Te))},To:function(){this.map.ka();this.loaded||(this.ax(),this.loaded=p);this.Rf()},xa:function(