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/vector_kpdvlx.js

1 line
8.9 KiB

/**/_jsload2 && _jsload2('vector', 'x.extend(Pd.prototype,{ra:function(a,b){Hd.prototype.ra.call(this,a,b);this.Hg={};this.Fr(a);this.Qq();this.nr()},remove:function(){var a=this.D;Hd.prototype.remove.call(this);a&&(a.removeEventListener("zoomend",this.kl),a.removeEventListener("moveend",this.Mk),a.removeEventListener("resize",this.Tk),a.removeEventListener("hotspotclick",this.zM),a.rm(this.k.Kk))},Fr:function(a){this.D=a;this.nC=this.Pb;this.Ac=this.D.B.devicePixelRatio;this.Fn=62;a.rm(this.k.Kk);for(var b in this.Fp)delete this.Fp[b]}, Qq:function(){var a=this,b=this.D;a.kl=function(b){a.nr(b)};a.Mk=function(b){a.nr(b)};a.Tk=function(b){a.nr(b)};a.zM=function(b){0<b.spots.length&&a.GU(b.spots[0].getUserData().uid)};b.addEventListener("zoomend",a.kl);b.addEventListener("moveend",a.Mk);b.addEventListener("resize",a.Tk);b.addEventListener("hotspotclick",a.zM)},GU:function(a){var b=this,c=(1E5*Math.random()).toFixed(0);!B._rd&&(B._rd={});B._rd["_cbk"+c]=function(a){b.RR(a);delete B._rd["_cbk"+c]};var d=b.UW;this.k.ih&&(d=b.VW);a=d+ a+"?scope=2&ak="+this.k.hm+"&callback=BMap._rd._cbk"+c;this.k.ih&&(a+="&geotable_id="+this.k.ih);sa(a)},RR:function(a){var b=a.content;this.k.ih&&(b=a.contents[0]);if(a&&0==a.status&&b){var a={poiId:b.uid||"",databoxId:b.databox_id||"",title:this.k.ih?b.title:b.name,address:this.k.ih?b.address:b.addr,phoneNumber:b.tel||"",postcode:b.zip||"",provinceCode:1*b.province_id||-1,province:b.province||"",cityCode:1*b.city_id||-1,city:b.city||"",districtCode:1*b.district_id||-1,district:b.district||"",point:this.k.ih? new K(b.location[0],b.location[1]):new K(b.longitude,b.latitude),tags:b.tag&&b.tag.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,"").split(/\\s+/),typeId:1*b.cla||-1,extendedData:b.ext||{}},c=new N("onhotspotclick");c.customPoi=a;c.content=b;this.pG&&this.pG.dispatchEvent(c);this.dispatchEvent(c)}},nr:function(){var a=this.D,b=a.ga(),c=a.fb.Rm(this.nC,"yun",this.Fn);if(a.Wb()){this.Zm||(this.Zm=o,0<c.length&&(this.Ob=a.oa().k.Ob));this.wn=Math.pow(2,18-b);this.uh=c.length;a=0;for(b=c.length;a<b;a++)this.Ur(c[a][0], c[a][1],c[a][2])}},Ur:function(a,b,c){var d=this,e=d.map,f=e.wc(),g=new K(f.lng,f.lat),i=e.ga(),e=Sd[Math.abs(a+b)%Sd.length]+"/data?grids="+a+"_"+b+"_"+i+"&q="+this.k.qn+"&tags="+this.k.uz+"&filter="+this.k.filter+"&sortby="+this.k.oz+"&ak="+this.k.hm+"&age="+this.k.Uw,e=this.k.ih?e+("&geotable_id="+this.k.ih):e+("&databox_id="+this.k.gL);c.af=q;sa(e,function(e){var e=0==e.status?e.content[0].data:[],f=d.map,m=f.wc(),f=f.ga();m.ab(g)&&f==i&&(d.ko(e,c,a,b,i),d.uh--,0==d.uh&&d.pG.dispatchEvent("oncustomlayerloaded"))})}, ko:function(a,b,c,d,e){var f=b.getContext("2d");1<this.Ac&&!b.ng&&(f.scale(this.Ac,this.Ac),b.ng=o);b.mC||(b.mC=o,f.translate(this.Fn/2,this.Fn/2));for(var e="hotSpotTile_"+c+"_"+d+"_"+e,g=0,i=a.length;g<i;g++)this.jX(f,a[g],c,d,e,b)},jX:function(a,b,c,d,e,f){var g=this,i=b[0],j=b[1],l=b[2],m=b[3],g=this,n=this.Ob,b=this.wn,c=c*b*n,d=(d+1)*b*n;/^POINT\\((.*)\\)$/.test(l);var l=RegExp.$1.split(","),s=l[0],u=l[1],w=(s-c)/b,y=(d-u)/b,D=new Image;D.onload=function(){var b=this.width,c=this.height;a.drawImage(this, w-b/2,y-c);g.Fp[e]||(b={userData:{name:i,uid:j},offsets:[c,b/2,0,b/2]},b=new mb(T.ub(new K(s,u)),b),g.D.Qw(b,g.k.Kk));setTimeout(function(){g.Fp[e]=o;f.af=o},1E3);delete this.onload};this.yY(m,function(a){""==m&&(m="sid1");D.src=a&&a.content&&a.content[m]&&""!=a.content[m]?"data:image/png;base64,"+a.content[m]:I.pa+"madian.png"})},f5:function(){if(this.Pb){for(var a=this.Pb,b=0,c=a.childNodes.length;b<c;b++)a.childNodes[b].af=q;this.D.rm(this.k.Kk);for(var d in this.Fp)delete this.Fp[d];this.nr()}}, yY:function(a,b){var c=this,d=this.k.gL,e=this.k.j0,f=this.k.hm;""==a&&(a="sid1");if(this.Hg[a]&&this.Hg[a].data)b(this.Hg[a].data);else{this.Hg[a]||(this.Hg[a]={},this.Hg[a].FC=[]);this.Hg[a].FC.push(b);var g=B.jc+"style/poi/rangestyle?method=getstyle";this.k.ih&&(d=this.k.ih);g+="&databox="+d+"&sid="+a+"&ak="+f;e&&(g+="&self_id="+e);this.Hg[a].gZ||(setTimeout(function(){sa(g,function(b){var d=c.Hg[a].FC;c.Hg[a].data=b;for(var e=0;e<d.length;e++)d[e](b);c.Hg[a].FC.length=0})},10),c.Hg[a].gZ=o)}}});x.extend(Qd.prototype,{ra:function(a,b){Hd.prototype.ra.call(this,a,b);this.Fr(a);this.Qq();this.Av()},remove:function(){var a=this.D;Hd.prototype.remove.call(this);a.removeEventListener("zoomend",this.kl);a.removeEventListener("moveend",this.Mk);a.removeEventListener("resize",this.Tk)},Fr:function(a){this.D=a;this.nC=this.Pb;this.Ac=this.D.B.devicePixelRatio;this.Fn=0},Qq:function(){var a=this,b=this.D;a.kl=function(b){a.Av(b)};a.Mk=function(b){a.Av(b)};a.Tk=function(b){a.Av(b)};b.addEventListener("zoomend", a.kl);b.addEventListener("moveend",a.Mk);b.addEventListener("resize",a.Tk)},Av:function(){var a=this.D,b=a.fb.Rm(this.nC,"traffic",this.Fn);this.Zm||(this.Zm=o,0<b.length&&(this.Ob=a.oa().k.Ob));for(var a=0,c=b.length;a<c;a++)this.Ur(b[a][0],b[a][1],b[a][2])},Ur:function(a,b,c){var d=this,e=d.map,f=e.wc(),g=new K(f.lng,f.lat),i=e.ga(),j="_t"+parseInt(a+""+b+""+i).toString(36),e=this.G0+"&x="+a+"&y="+b+"&z="+i+"&fn=BMap."+j+"&t="+(new Date).getTime();c.af=q;B[j]=function(e){var f=d.map,n=f.wc(),f= f.ga();n.ab(g)&&f==i&&e.content&&e.content.tf&&d.ko(e.content.tf,c,a,b);delete B[j]};sa(e,q)},ko:function(a,b){var c=b.getContext("2d"),d=this.we,e=this.Rx,f=this.Sx;1<this.Ac&&!b.ng&&(c.scale(this.Ac,this.Ac),b.ng=o);b.mC||(b.mC=o,c.translate(this.Fn/2,this.Fn/2));for(var g=0,i=a.length;g<i;g++){var j=a[g],l=j[1],m=this.Eb[j[3]],j=this.Eb[j[4]],n=l[0]/10,s=l[1]/10;c.beginPath();c.moveTo(n,s);for(var u=2,w=l.length;u<w;u+=2)n+=l[u]/10,s+=l[u+1]/10,c.lineTo(n,s);c.strokeStyle=d(m[1]);c.lineWidth=m[2]; c.lineCap=e(m[3]);c.lineJoin=f(m[4]);c.stroke();c.strokeStyle=d(j[1]);c.lineWidth=j[2];c.lineCap=e(j[3]);c.lineJoin=f(j[4]);c.stroke()}b.af=o},we:function(a){a>>>=0;return"rgba("+(a>>24&255)+","+(a>>16&255)+","+(a>>8&255)+","+(a&255)/256+")"},Rx:function(a){return["butt","square","round"][a]},Sx:function(a){return["miter","bevel","round"][a]}});x.extend(gb.prototype,{Ee:function(){this.ra(this.D,this.C)},ra:function(a,b){this.D=a;this.C=b;this.D&&this.C&&(this.Fr(),this.sT(),this.Qq(),this.mr())},remove:function(){var a=this.D;this.C.removeChild(this.Xa);a.removeEventListener("zoomend",this.kl);a.removeEventListener("moving",this.CN);a.removeEventListener("moveend",this.Mk);a.removeEventListener("resize",this.Tk)},Fr:function(){var a=this.D,b=a.B.devicePixelRatio,c=a.oa().k.Ob,d=a.vb(),a=d.width,d=d.height;this.di={};this.Ob=c;this.Ac=b; this.lF=a;this.kF=d;this.YC=a*b;this.XC=d*b},sT:function(){var a=this.D,b=this.C,c=document.createElement("canvas"),d=c.style;d.position="absolute";d.zIndex=5;d.left=-a.offsetX+"px";d.top=-a.offsetY+"px";d.width=this.lF+"px";d.height=this.kF+"px";c.setAttribute("width",this.YC);c.setAttribute("height",this.XC);b.appendChild(c);this.Xa=c;this.Mh=c.getContext("2d");a=this.Ac;1<a&&!c.ng&&(this.Mh.scale(a,a),c.ng=o)},Qq:function(){function a(){b.Xa.style.left=-c.offsetX+"px";b.Xa.style.top=-c.offsetY+ "px"}var b=this,c=b.D,d=b.Ac;b.kl=function(c){b.Xa.style.display=18>this.ga()?"none":"block";a();b.mr(c)};b.CN=function(c){var d=(new Date).getTime();100>d-b.YM||(b.YM=d,a(),b.mr(c))};b.Mk=function(c){a();b.mr(c)};b.Tk=function(e){var f=c.vb(),g=f.width,f=f.height,i=g*d,j=f*d;b.Xa.style.width=g+"px";b.Xa.style.height=f+"px";b.Xa.setAttribute("width",i);b.Xa.setAttribute("height",j);b.lF=g;b.kF=f;b.YC=i;b.XC=j;a();b.mr(e)};c.addEventListener("zoomend",b.kl);c.addEventListener("moving",b.CN);c.addEventListener("moveend", b.Mk);c.addEventListener("resize",b.Tk)},mr:function(a){var b=this.D,c=b.ga();if(!(18>c)){var d=b.fb.XL(),e=d[0],b=d[1],f=d[2],d=d[3],a=a?q:o,g;for(g in this.di)for(var i=e;i<f;i++)for(var j=b;j<d;j++)g==i+"_"+j+"_"+c&&(this.di[g].DI=o);for(g in this.di)this.di[g].DI?delete this.di[g].DI:(this.di[g]=p,delete this.di[g]);this.Mh.clearRect(0,0,this.YC,this.XC);for(i=e;i<f;i++)for(j=b;j<d;j++)(g=this.di[i+"_"+j+"_"+c])?this.ko(g,i,j,c,a):this.Ur(i,j,c,a)}},Ur:function(a,b,c,d){var e=this,f=e.D,g=e.dW, i=(a+b)%g.length,j="x="+a+"&y="+b+"&z="+c,l=f.ba.replace(/^TANGRAM_/,"")+"building"+parseInt(a+""+b+""+c).toString(36),g=g[i]+"qt=hjpgvd&"+j+"&styles=pl&layers=bg&features=bd&f=mwebapp&v=001&udt=20130501&fn=BMap."+l,i=f.wc(),m=new K(i.lng,i.lat),n=f.ga();B[l]=function(g){if(g=g.content){var i=f.wc(),j=f.ga();if(!i.ab(m)||j!=n){delete B[l];return}if(g=window.SZ(g))e.ko(g,a,b,c,d),e.di[a+"_"+b+"_"+c]=g}delete B[l]};sa(g)},ko:function(a,b,c,d,e){e&&this.k.JL?this.YR(a,b,c,d):this.SH(a,b,c,d,1)},YR:function(a, b,c,d){var e=this;a.KQ=new wb({Hc:50,duration:200,va:function(f){e.SH(a,b,c,d,f)},finish:function(){a.KQ=p}})},SH:function(a,b,c,d,e){var f=this.D,g=this.lF,i=this.kF,d=f.oa().yc(d),f=f.dc,j=this.Ob,b=b*j-f.lng/d,c=(-1-c)*j+f.lat/d,d=this.Mh,f=a.length,j=0,l=window.Eb;d.save();for(d.translate(b+g/2,c+i/2);j<f;j++){var m=a[j],n=l[m[3]];if(4==n[0]){var s=m[7];window.VectorDrawUtils.BD(d,m[1],6*(m[2]*n[3])*e,90*((b+(s[0]+s[2])/2)/(g/2)),90*((c+(s[1]+s[3])/2)/(i/2)),"rgba(212,205,197,1)","rgba(235,233,228,1)", "rgba(170,170,170,1)",1)}}d.restore()}}); ');