/* 百度地图API V2 模块 * 此模块必须配套使用baidumap_offline_v2_20160822.js对 * 获取模块的方法: * http://api0.map.bdimg.com/getmodules?v=2.0&mod=模块1,模块2 * 模块名称就是文件名 * www.xiaoguo123.com 整理 */ _jsload2&&_jsload2('newvectordrawlib', 'function zf(a){this.ZH=o;this.k=x.object.extend(a||{},{Xf:o});Ec.call(this,this.k);this.zg={};this.loaded=q;this.Bt=p;this.YB=q}zf.prototype=new Ec; zf.prototype.qa=function(a){if(!this.loaded){this.loaded=o;var b=this;b.map=a;b.bb=b.map.bb;b.map=a;this.Hb=this.map.oa();this.Ob=this.Hb.k.Ob;this.yc=this.map.K.devicePixelRatio;b.Tw=q;b.vK=p;b.Oe=b.k.style||"normal";b.ln=b.k.styleStr||p;b.bq=200;b.Dg=p;b.Yd=0;b.vb=this.bb.Mn(0);b.bb.md.appendChild(this.vb);b.bb.vb=b.vb;b.Ib=new z.NewVectorDrawLib(a);b.Ib.Ob=this.Hb.k.Ob;b.es="";b.Ib.nC=b.Oe;b.Yl();b.Oe&&"normal"!==b.Oe||b.ln&&0d.map.height?b=o:(f=[],f.push("
"), f.push("\'"+e.name+"\\u5916\\u666f\'"),f.push("
\\u8fdb\\u5165\\u5168\\u666f>>"),f.push("
"),l.innerHTML= f.join("")));i&&(f=K("p",{style:"padding:0;margin:0;line-height:18px;font-size:12px;color:#4d4d4d;"}),f.innerHTML="\\u5730\\u5740\\uff1a"+i,l.appendChild(f));k&&(f=K("p",{style:"padding:0;margin:0;line-height:18px;font-size:12px;color:#4d4d4d;"}),f.innerHTML="\\u7535\\u8bdd\\uff1a"+k,l.appendChild(f));e.tag&&(k=K("p",{style:"padding:0;margin:0;line-height:18px;font-size:12px;color:#4d4d4d;color:#7f7f7f;"}),k.innerHTML="\\u6807\\u7b7e\\uff1a"+e.tag,l.appendChild(k));a="http://api.map.baidu.com/place/detail?uid="+ a+"&output=html&source=jsapi&operate=mapclick&clicktype=vector";k="
"+e.name+"";a=new qc(l,{width:322,enableSearchTool:o,title:k+("\\u8be6\\u60c5»")+ "
",enableParano:b});b&&(a.street_id=g);a.addEventListener("open",function(){var a=x.$("panoInfoBox");if(a){var b=e.street_id||"";Ob(function(){Pa(5052);d.Bq(b)},a,"pano_thumnail_img|panoInfoBoxTitleBg|panoInfoBoxTitleContent")}});this.map.Mb(a,c)}},Bq:function(a){var b=z.tg("pano","scape/")[0],c=this,d=(new Date).getTime(),e="Pano"+d;z[e]=function(a){var b=c.map.rm(),a=a.content[0];b.rc(a.poiinfo.PID);b.show();b.Nc({heading:a.poiinfo.Dir,pitch:a.poiinfo.Pitch})};d=(new Date).getTime();Qb(b+ ("?qt=poi&udt=20131021&uid="+a+"&t="+d+"&fn=BMap."+e),q)},Tq:function(a){for(var b=[],c=0,d=a.length;ck.left&&c<=k.left+f&&d>k.top&&d<=k.top+f){e=b[g];break}}if(e==j||e.Wd==j)return q;f=e.Wd;b=0;for(i=f.length;b=iconX-15&&a.offsetX<=iconX+15&&a.offsetY>=iconY-15&&a.offsetY<=iconY+15))return{type:c[5].c||"",name:d,uid:n.u||"",point:{x:iconX,y:iconY},clickFea:{tileId:e.id,tile:e,fea:c}}}return q},Lx:function(){return/M040/i.test(navigator.userAgent)},Pf:function(a){for(var b=a.offsetLeft,c=a.offsetTop,a=a.offsetParent;a&& a!=this.map.Na();)b+=a.offsetLeft,c+=a.offsetTop,a=a.offsetParent;return{top:c,left:b}},oC:function(a){if(this.map.Ub()){this.map.oa().k.Zb=18;var a=this.Bt=a,b;for(b in a)switch(b){case "style":this.Ip(a);break;case "styleStr":this.Ip(a);break;case "features":this.KN(a[b]);break;case "poiElements":this.SN(a[b])}}},cE:function(){this.lu();"dark"==this.Oe?x.D.Ta(this.vb,"light_gray_background"):x.D.Ta(this.vb,"gray_background")},lu:function(){x.D.Rb(this.vb,"gray_background");x.D.Rb(this.vb,"light_gray_background")}}); window.VectorLayer=zf;var Af=1,Bf=2,Cf=3,Df=4,Ef=5; function Ff(a){this.Hm=q;this.ct=[z.url.proto+z.url.domain.TILE_ONLINE_URLS[1]+"/"];this.QF=[z.url.proto+z.url.domain.TILE_ONLINE_URLS[1]+"/gvd/?",z.url.proto+z.url.domain.TILE_ONLINE_URLS[2]+"/gvd/?",z.url.proto+z.url.domain.TILE_ONLINE_URLS[3]+"/gvd/?",z.url.proto+z.url.domain.TILE_ONLINE_URLS[4]+"/gvd/?"];this.bb=p;this.qk={};this.map=a;this.Ue=this.lj=0;this.bi=p;this.Db=window.Db;this.nz=x.extend({},window.Db);this.dm={dark:{backColor:"#2D2D2D",textColor:"#bfbfbf",iconUrl:"vector/dicons"},normal:{backColor:"#F3F1EC", textColor:"#c61b1b",iconUrl:"vector/nicons_hd"},light:{backColor:"#EBF8FC",textColor:"#017fb4",iconUrl:"vector/licons"}};this.Js={};this.Ck=o;this.nk=p;this.Zl=/.*GT-I9300.*Version\\/\\d+.*Safari\\/\\d+\\.\\d+$/ig.test(navigator.userAgent)||/baiduboxapp/ig.test(navigator.userAgent)} Ff.prototype={As:function(a){var b=this.map,c=b.fa();this.Ue=a.length;this.lj=0;this.yc=this.map.K.devicePixelRatio;this.Hu=this.Iu=this.Gu=this.oq=0;b=b.Ja();new H(b.lng,b.lat);this.Ck?(ua.pc("vector_begin"),ua.MP=+new Date):this.map.Ka!=this.map.Cc&&(G()?(this.rf=$a.Fi.ok(104),this.JB=(new Date).getTime()):this.rf=$a.Fi.ok(4),this.rf.kz=+new Date,this.rf.cu());this.map.dispatchEvent(new N("onvectorbegin"));for(var b=0,d=this.Ue;ba?"_":"")+(0>b?"$":"")+parseInt(Math.abs(a)+""+Math.abs(b)+""+c,10).toString(36),g=g[i]+"qt=lgvd&layers=bg,df&"+k+"&styles=pl&f=jsapi&v=002&udt=20150526",g=g+("&fn=BMap."+l),f=f.Ja(),m=new H(f.lng,f.lat),n=e.map.fa();z[l]=function(f){if(f=f.content){d.lq=(new Date).getTime();var g=e.map,i=g.Ja(),g=g.fa(); if(!i.mb(m)||g!=n){delete z[l];return}f=(f.bg||[]).concat(f.df||[]);d.Wd=f;d.Xa="#c"+a+"r"+b+"z"+c;f&&e.Ko(f,d,m,n)}delete z[l]};Qb(g)},oj:function(a){var a=a.getContext("2d"),b=this.Ob*this.yc;this.Zl||(a.save(),a.clearRect(0,0,b,b),a.restore())},VC:function(a,b,c){a.fillStyle=c||"#F5F3F0";a.fillRect(0,0,b,b)},Ko:function(a,b,c,d){function e(){b.LP=+new Date;var e=i.map.Ja(),f=i.map.fa();if(e.mb(c)&&f==d){for(i.map.K.NF&&a.L_&&i.F1(g,a.L_);l=d&&f[5]&&0d&&this.OF(a,C,A, d);var D=1;z.Bb.$L(u)&&(z.Bb.XK(a,C-e/2,A-B/2,e,B,{fillStyle:k(l)}),D=0);f?(a.save(),a.scale(0.9,0.9),m&&a.strokeText(n[v],(C-e/2+1)/0.9,(A+B/2+1)/0.9),a.fillText(n[v],(C-e/2+1)/0.9,(A+B/2+1)/0.9),a.restore()):(D=i?2:D,m&&a.strokeText(n[v],C-e/2,A+B/2+D),a.fillText(n[v],C-e/2,A+B/2+D))}}},Ss:function(a,b){var c=[Af,"",[]];a&&(a[0]==Ef?c[2]=a:c=a);b&&(b[0]==Ef?c[2]=b:c[1]=b[1]);return c},OF:function(a,b,c,d){d=d/180*Math.PI;cv=Math.cos(d);sv=Math.sin(d);yy=xx=cv;xy=sv;yx=-sv;x0=b-b*cv-c*sv;y0=c+b* sv-c*cv;a.transform(xx,yx,xy,yy,x0,y0)},gF:function(a,b,c,d,e){if(16>=e)for(var f=c;f=e?"228,218,201,1"!=i[1]&&this.oe(a,m,i,q):this.oe(a,m,i,q)}for(g=f;g=e&&"228,218,201,1"==i[1]&&(k[1]="231,231,157,1"),this.oe(a,m,k,q));f=c}else{for(f=c;f=d?1:0;default:return 0}},ht:function(a,b){return a&&0