/* 百度地图API V2 模块 * 此模块必须配套使用baidumap_offline_v2_20160822.js对 * 获取模块的方法: * http://api0.map.bdimg.com/getmodules?v=2.0&mod=模块1,模块2 * 模块名称就是文件名 * www.xiaoguo123.com 整理 */ _jsload2&&_jsload2('vectordrawlib', '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;this.VJ={road:"rd",water:"wt",building:"bd",land:"ld",government:"gv",point:"pts"};this.SE={market:"mt",food:"fd",communications:"cm",hotel:"ht",attractions:"at",recreation:"rc"}}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;b.Tw=q;b.vK=p;b.ne="df";b.k.poiElements&&b.k.poiElements.name&&(b.ne=b.SE[b.k.poiElements.name]);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.Md=this.bb.Mn(10);b.bb.md.appendChild(this.vb);b.bb.md.appendChild(this.Md);b.bb.vb=b.vb;b.bb.Md=this.Md;b.Ib=new z.VectorDrawLib;b.es="";b.k.features&&(b.es=b.TW(b.k.features));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||"";d.ZV("click",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")}, ZV:function(a,b,c,d){var e=this;c.Mm||(c.Mm=[],c.handle={});c.Mm.push({filter:d,mm:b});c.handle[a]||(c.addEventListener(a,function(a){for(var b=a.target;b!=c;){e.Fb(c.Mm,function(c,d){RegExp(d.filter).test(b.getAttribute("filter"))&&d.mm.call(b,a,b.getAttribute("filter"))});b=b.parentNode}},q),c.handle[a]=o)},Fb:function(a,b){for(var c=0,d=a.length;ca?"_":"")+ (0>b?"$":"")+parseInt(Math.abs(a)+""+Math.abs(b)+""+d,10).toString(36);if(c&&e)if(g.bi)if("no"==g.bi)v="&layers=&features="+g.bi,c.Wd=p,e.Wd=p,this.Zl?(f=c.getContext("2d"),a=e.getContext("2d"),f.canvas.width=f.canvas.width,a.canvas.width=a.canvas.width,a=f=p):(g.oj(c),g.oj(e)),g.Ue=0;else if(-1=this.Ue-this.lj&&this.map.dispatchEvent(new N("onallvectorloaded"))},DV:function(a,b){var c=q;if(a.length&&b.length&&a.length==b.length){for(var d=0,e=a.length;dd&&this.OF(a,C,A,d);var D=1;z.Bb.$L(v)&&(z.Bb.XK(a,C-e/2,A-B/2,e,B,{fillStyle:l(m)}),D=0);f?(a.save(),a.scale(0.9,0.9),k&&a.strokeText(n[u],(C-e/2+1)/0.9,(A+B/2+1)/0.9),a.fillText(n[u],(C-e/2+1)/0.9,(A+B/2+1)/0.9),a.restore()):(D=i?2:D,k&&a.strokeText(n[u],C-e/2,A+B/2+D),a.fillText(n[u],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){if(16>=c)for(var c=0,e=b.length;c=d?1:0;default:return 0}},ht:function(a,b){return a&&0