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

1 year ago
/**/_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.