/* 百度地图API V2 模块 * 此模块必须配套使用baidumap_offline_v2_20160822.js对 * 获取模块的方法: * http://api0.map.bdimg.com/getmodules?v=2.0&mod=模块1,模块2 * 模块名称就是文件名 * www.xiaoguo123.com 整理 */ _jsload2&&_jsload2('local', 'bb.fM=function(a,b){return!a||"undefined"==typeof b||"s"==a&&11!=b&&7!=b&&2!=b&&26!=b&&28!=b||"nb"==a&&12!=b||"bd"==a&&21!=b||"bda"==a&&45!=b||"sa"==a&&46!=b||"nba"==a&&47!=b?q:o}; x.extend(bb.prototype,{Bz:function(){for(var a=0,b=this.Oa.length;aa.length||10a.length||10a.length||10c?bb.jG:c>bb.qG?bb.qG:c,e=this,f=d||{};if(b instanceof H){var g=R.xb(b),d=new H(g.lng-c,g.lat-c),g=new H(g.lng+c,g.lat+c),d=R.Eb(d),g=R.Eb(g),d=new fb(new H(d.lng,d.lat),new H(g.lng,g.lat));f.Fa=b;f.wa=c;this.bn(a,d, f)}else this.Lg(this.zd,function(d){d=d||1;e.Gc=e.DA(a);d=e.Gc?{qt:"nba",c:d,wd:a.join("$$"),wdn:a.length,rn:e.lf(),uid:b.uid,r:c}:{qt:"nb",c:d,wd:a,rn:e.lf(),uid:b.uid,r:c};if("string"==typeof b){if(e.Gc){d.qt="sa";for(var g=[],l=0;lb.total?b.total:760,A=0==f?b.spec_dispnum||0:0);if(2!=e)if(this.Gc){C=b.result_array;f=a.td.length;for(y=0;y","").replace("",""),B.unshift(O);D={title:D.name,uid:D.uid,point:P.tb(D.geo,o).point, url:V.Nh(D.uid,d.code),detailUrl:"http://api.map.baidu.com/place/detail?uid="+D.uid+"&output=html&source=jsapi",address:E,city:d.name,province:d.up_province_name||"",phoneNumber:D.tel,postcode:D.zip,type:D.poiType||0,isAccurate:D.acc_flag&&1==D.acc_flag?o:q,tags:B};n[y].push(D);l.push(D.point);this.sf.push(D)}}}else for(y=A;y","").replace("",""); B.unshift(O)}D={title:D.name,uid:D.uid,point:P.tb(D.geo,o).point,url:V.Nh(D.uid,d.code),detailUrl:"http://api.map.baidu.com/place/detail?uid="+D.uid+"&output=html&source=jsapi",address:E,city:d.name,province:d.up_province_name||"",phoneNumber:D.tel,postcode:D.zip,type:D.poiType||0,isAccurate:D.acc_flag&&1==D.acc_flag?o:q};0b&&(a=e,b=e.Zo())}return a},Me:function(){delete this.Ea;delete this.Bd;delete this.ja;this.Gc&&delete this.Ki;delete this.ga;this.jb=-1;this.rb();this.Lj();this.k.ka.Ga&&(this.k.ka.Ga.innerHTML="")},zm:function(a){if(this.Nl)this.ks.zm(a);else if(this.ga){var b;b=this.Gc?this.fA():this.ja;if("number"==typeof a&&!isNaN(a)&&0<=a&&a<=b.Zo()-1)switch(this.ga.$c.pn=a,this.ga.$c.qt){case "s":case "con":this.search(this.ga.$c.wd,this.ga.options, this.ga);break;case "bd":this.bn(this.ga.$c.wd,this.ga.gb,this.ga);break;case "nb":this.Gp(this.ga.$c.wd,this.ga.Fa,this.ga.wa,this.ga);break;case "bda":this.bn(this.ga.td,this.ga.gb,this.ga);break;case "sa":this.search(this.ga.td,this.ga.options,this.ga);break;case "nba":this.Gp(this.ga.td,this.ga.Fa,this.ga.wa,this.ga)}else this.rb(5),this.Ra(V.Tc)}},Lz:function(){this.ks||(this.ks=new ch(this))},select:function(a){this.Zm.select(a);this.Ym.select(a);this.jb=a}}); S(pd,{gotoPage:pd.zm,searchNearby:pd.Gp,searchInBounds:pd.bn,search:pd.search,clearResults:pd.Me});function bh(a){this.keyword=a.sb||"";this.mT=a.OE||0;this.XQ=a.count||0;this.WA=a.total||0;this.dT=Math.ceil(a.total/a.wp);this.center=a.Fa;this.radius=a.wa;this.bounds=a.gb;this.city=a.city;this.province=a.province;this.viewport=a.viewport;this.moreResultsUrl=a.ri;this.wr=a.Gk&&a.Gk.slice(0)||[];this.tQ=a.fC&&a.fC.slice(0);this.suggestions=a.gO||[]}x.extend(bh.prototype,{xk:function(a){if(this.wr[a])return this.wr[a]},Us:t("WA"),Zo:t("dT"),mL:t("XQ"),tL:t("mT"),gx:t("tQ"),toString:ca("LocalResult")}); var dh=bh.prototype;S(dh,{getPoi:dh.xk,getCurrentNumPois:dh.mL,getNumPois:dh.Us,getNumPages:dh.Zo,getPageIndex:dh.tL,getCityList:dh.gx});function ch(a){x.lang.Ba.call(this);this.na=a;this.na.jb=-1}x.lang.ta(ch,x.lang.Ba,"CustomSearch"); x.extend(ch.prototype,{search:function(a){this.Hp=a.Hp;this.na.Gc=q;if(this.Bz(a)){var b=this;this.na.Lg(this.na.zd,function(c){a.region=c;c=b.dS(a);b.JN(c,{$c:c,options:a})})}},Bz:function(){var a=o;pa||(this.na.rb(4),this.na.Ra(V.Tc),a=q);return a},dS:function(a){var b=this.Qw=a.Qw;b&&b.geotableId&&(this.kt=o);var c={region:a.region,page_size:this.na.lf(),ak:pa};a.YY&&(c.page_index=a.YY);a.sb&&(c.q=a.sb);if(a.gb){var d=a.gb.re(),e=a.gb.kf();c.bounds=this.kt?d.lng+","+d.lat+";"+e.lng+","+e.lat:d.lat+ ","+d.lng+";"+e.lat+","+e.lng}if(a.Fa&&(a.Fa instanceof H||a.Fa.point instanceof H))d=p,a.Fa instanceof H?d=a.Fa:a.Fa.point instanceof H&&(d=a.Fa.point),c.location=this.kt?d.lng+","+d.lat:d.lat+","+d.lng;"string"==typeof a.Fa&&(c.q=a.Fa+" "+a.sb,this.Hp="local");a.wa&&(c.radius=a.wa);this.kt?c.geotable_id=b.geotableId:b&&b.databoxId&&(c.filter="databox:"+b.databoxId);b.tags&&(c.tags=b.tags);b.filter&&(c.filter=b.filter);return c},JN:function(a,b){var c=this,d="geosearch/poi";this.kt&&(d="geosearch/v2/"+ this.Hp);$c.ab(function(a,b){c.Hf(a,b)},a,b,d)},Hf:function(a,b){this.na.Me();this.na.ga=b;if(0!=a.status)this.ja=new bh({sb:b.options.sb,wp:this.na.lf(),Fa:b.options.Fa||"",wa:b.options.wa||"",gb:b.options.gb||"",ri:""}),5==a.status?this.na.rb(4):this.na.rb(2),this.na.ja=this.ja,this.na.Ra(V.Tc,this.ja),this.na.Ym.dispatchEvent("render");else{this.Cl(a,b);this.na.Zm.dispatchEvent("render");this.na.Ym.dispatchEvent("render");var c=b.options.Fa;c&&("string"!=typeof c&&!(c instanceof H)&&0==this.na.um())&& this.na.Zm.kw(c);c={};c.ia=this.na.oz;this.na.Zm.gL(c);c=this.na.ja;if(this.na.k.ka.It&&c&&0bb.aq||this.na.Gc)d="-275px";var d=[" "],e,f=RegExp(this.na.Gc?this.na.ga.td.join("|"):this.na.ja.keyword,"ig");b.title&&(e=b.title.replace(f,"$&"));1==b.type?e+= "-\\u516c\\u4ea4\\u8f66\\u7ad9":3==b.type&&(e+="-\\u5730\\u94c1\\u7ad9");d.push("
");d.push("
"+e+"");b.detailUrl&&d.push("\\u8be6\\u60c5»");d.push("
");b.address&&(e=b.address.replace(f,"$&"),d.push("
\\u5730\\u5740:"+ e+"
"));b.phoneNumber&&d.push("
\\u7535\\u8bdd:"+b.phoneNumber+"
");d.push("
");c.innerHTML=d.join("");var g=this;c.onclick=function(){g.na.select(a)};return c}},RQ:function(){var a=this,b=K("div",{style:"white-space:nowrap;text-align:right;background:#e5ecf9;margin-top:5px;padding:2px;overflow:hidden;zoom:1;"}); if(!this.na.Gc&&!this.na.Nl){var c=K("a",{style:"color:#7777cc;float:right;",href:this.na.ja.moreResultsUrl,target:"_blank",title:"\\u5230\\u767e\\u5ea6\\u5730\\u56fe\\u67e5\\u770b\\u66f4\\u591a\\u7ed3\\u679c"});c.innerHTML="\\u66f4\\u591a\\u7ed3\\u679c»";b.appendChild(c)}var c=K("div",{style:"float:left;margin-right:5px"}),d=this.na.fA();0"+c[a].city+" (\\u5171"+c[a].numResults+"\\u6761\\u7ed3\\u679c)";var d=this.na,e=d.ja;b.onclick=function(){d.gn(e.gx()[a].city);d.search(e.keyword)};return b}}); ');