route_ihe02g.js 59 KB

12345678
  1. /* 百度地图API V2 模块
  2. * 此模块必须配套使用baidumap_offline_v2_20160822.js对
  3. * 获取模块的方法:
  4. * http://api0.map.bdimg.com/getmodules?v=2.0&mod=模块1,模块2
  5. * 模块名称就是文件名
  6. * www.xiaoguo123.com 整理
  7. */
  8. _jsload2&&_jsload2('route', 'var eh={web:"http://api.map.baidu.com/direction?",android:"bdapp://map/direction?",ios:"baidumap://map/direction?"};function fh(a){this.city=a.city;this.Nv=a.start;this.$u=a.end;this.tr=a.Ct;this.moreResultsUrl=a.url;this.taxiFare=a.kO||p;this.pU=a.dO||dd;this.rR=a.TK||dd}x.extend(fh.prototype,{sj:t("Nv"),ih:t("$u"),BX:t("pU"),YW:t("rR"),qx:function(){return this.tr.length},mf:function(a){if(this.tr[a])return this.tr[a]}});function gh(a){fh.call(this,a);this.policy=a.ad}x.ta(gh,fh,"DrivingRouteResult"); function hh(a){fh.call(this,a)}x.ta(hh,fh,"WalkingRouteResult");function ih(a){fh.call(this,a);this.policy=a.ad}x.ta(ih,fh,"TransitRouteResult");var jh=fh.prototype;S(jh,{getStart:jh.sj,getEnd:jh.ih,getStartStatus:jh.BX,getEndStatus:jh.YW,getNumPlans:jh.qx,getPlan:jh.mf});function kh(a){this.ek=a.iF.slice(0);this.cg=a.nd||0;this.Nq=a.duration||0;this.aR=a.nW||[]}x.extend(kh.prototype,{kh:function(a){if(this.ek[a])return this.ek[a]},Vs:function(){return this.ek.length},Pe:function(a){return a===q?this.cg:lh(this.cg)},Ps:function(a){return a===q?this.Nq:mh(this.Nq,"nav")},XW:t("aR")});var nh=kh.prototype;S(nh,{getNumRoutes:nh.Vs,getRoute:nh.kh,getDistance:nh.Pe,getDuration:nh.Ps,getDragPois:nh.XW});function oh(a){kh.call(this,a);this.Ti=a.AY;this.dl=a.description;this.Nq=a.duration||0}x.ta(oh,kh,"TransitRoutePlan"); x.extend(oh.prototype,{px:function(){return this.Ti.length},ND:function(a){if(this.Ti[a])return this.Ti[a]},hh:function(a){return a===q?P.wN(this.dl):this.dl},Ps:function(a){return a===q?this.Nq:mh(this.Nq,"bustime")},hX:function(){for(var a="",b=this.Ti.length-1,c=0;c<b;c++)this.Ti[c]&&this.Ti[c].title&&(a+=this.hL(this.Ti[c].title)+" \\u2192 ");return a+=this.hL(this.Ti[b].title)},hL:function(a){return a.substring(0,a.indexOf("("))},NX:function(){for(var a=0,b=this.ek.length,c=0;c<b;c++)a+=this.ek[c].Pe(q); return lh(a)}});var rh=oh.prototype;S(rh,{getNumLines:rh.px,getLine:rh.ND,getNumRoutes:rh.Vs,getRoute:rh.kh,getDistance:rh.Pe,getDuration:rh.Ps,getDescription:rh.hh});function sh(a){this.Nr=a.Aj&&a.Aj.slice(0)||[];this.cg=a.nd||0;this.Tj=a.index||0;this.vr=a.ia.slice(0);this.cB=a.RE||0;this.WT=a.qy;0===this.cg&&2<this.vr.length&&(this.vr.length=2)}x.extend(sh.prototype,{sx:function(){return this.Nr.length},zL:function(a){if(this.Nr[a])return this.Nr[a]},Pe:function(a){return a===q?this.cg:lh(this.cg)},LD:t("Tj"),ap:t("Vi"),pe:t("vr"),cp:t("WT"),sX:t("cB")});var th=sh.prototype; S(th,{getNumSteps:th.sx,getStep:th.zL,getDistance:th.Pe,getIndex:th.LD,getPolyline:th.ap,getPath:th.pe,getRouteType:th.cp});function uh(a){this.title=a.title;this.uid=a.uid;this.type=a.type;this.Yi=a.o_.slice(0);this.vr=a.ia.slice(0);this.cg=a.nd||0;this.eT=a.SY||0;this.Bd=a.status||{}}x.extend(uh.prototype,{nX:t("eT"),KD:function(){return this.Yi[0]},JD:function(){return this.Yi[1]},pe:t("vr"),ap:t("Vi"),Pe:function(a){return a===q?this.cg:lh(this.cg)},dp:t("title")});var vh=uh.prototype;S(vh,{getNumViaStops:vh.nX,getGetOnStop:vh.KD,getGetOffStop:vh.JD,getPath:vh.pe,getPolyline:vh.ap,getDistance:vh.Pe,getTitle:vh.dp});function wh(a){this.Uh=a.point;this.Tj=a.index;this.dl=a.description;this.cg=a.nd||0;this.TT=a.R3||0;this.cB=a.RE||0}x.extend(wh.prototype,{ha:t("Uh"),LD:t("Tj"),hh:function(a){return a===q?P.wN(this.dl):this.dl},Pe:function(a){return a===q?this.cg:lh(this.cg)},D2:t("TT"),sX:t("cB")});var xh=wh.prototype;S(xh,{getPosition:xh.ha,getIndex:xh.LD,getDescription:xh.hh,getDistance:xh.Pe});x.extend(wd.prototype,{ua:function(a){window.RouteAddrInst=this;var b={},a=this.dc=this.eZ(this.dc,a);if(a.result){var c=this.$d=a.content.tpList.length+1,d=a.content,e=[],f=[],g=["sel_n","sel_n1","sel_y","sel_x","sel_x1"],i=[-1,-1],k=[],f=[];this.fu=[a.current_city.code,a.current_city.code];tempCode=a.current_city.code;for(var l=0;l<c+1;l++){var m=p;e.push([]);k.push("");f.push("");0==l?a.result.start_city&&(this.fu[0]=a.result.start_city.code||a.result.start_city[0].code,tempCode=this.fu[0]):a.result.end_city&& (this.fu[l]=a.result.end_city.code||a.result.end_city[l-1].code,tempCode=this.fu[l]);m=this.ki(l);if(0<a.result.count[l]&&1!=a.result.city_list[l]){13!=a.result.type&&24!=a.result.type&&(f[l]=\'<a href="javascript:void(0)" ></a>\');e[l].push(\'<div id="RADiv_ResItem\'+l+\'" class="sel_body_body_div sel_body_resitem">\');var n=[0,9];10>m.length&&(n[1]=m.length-1);e[l].push(this.DM(l,n));10<a.result.count[l]&&(e[l].push(\'<div id="RADiv_PAGE\'+l+\'" style="height:20px;" class="sel_body_body_page"></div>\'),this.tO[l]= Math.ceil(a.result.count[l]/10),this.fs[l]=1);e[l].push("</div>");1==a.result.prio_flag[l]?(i[l]=2,this.Ma[l].n=m[0].name,this.Ma[l].c=tempCode,this.Ma[l].u=m[0].uid,n=R.xb(P.tb(m[0].geo,o).point),this.Ma[l].x=n.lng,this.Ma[l].y=n.lat,this.Ma[l].t=m[0].poiType,this.xg=n=this.FJ(this.k.ka.map,n,m[0].name,l),this.CE.push(n.point),k[l]=m[0].name):i[l]=0}}for(var u,v,l=0;l<i.length;l++)if(m=i[l],3==m&&!u)this.hj=l,v&&(i[v-1]=1),u=l+1;else if(u){if(0==m||3==m)i[l]=m+1}else 0==m&&!v?(this.hj=l,v=l+1):v&& 0==m&&(i[l]=1);b.startPointClass=g[i[0]];this.Hy=a.result.s_query?a.result.s_query:a.result.s_wd;b.startPoint=""==k[0]?this.Hy:k[0];b.startBody=e[0].join("");b.endPointClass=g[i[c]];this.$w=a.result.e_query?"string"==typeof a.result.e_query?a.result.e_query:a.result.e_query[c-1]:"string"==typeof a.result.e_wd?a.result.e_wd:a.result.e_wd[c-1];b.endPoint=""==k[c]?this.$w:k[c];b.endBody=e[c].join("");b.startButton=f[0];b.endIndex=c;b.endButton=f[c];this.vO=[];u=[""];for(l=0;l<d.tpList.length;l++)v=l+ 1,c=k[v],""==c&&(c=a.result.J1[l]),this.vO.push(c),u.push([\'<div id="RouteAddress_DIV\'+v+\'" class="\'+g[i[v]]+\'">\',\' <div class="sel_body">\',\' <div class="sel_body_top" onclick="RouteAddrInst.showLst(\'+v+\')">\',\' <div class="sel_body_title">\\n <div class="sel_body_sign"></div>\',\' <div class="sel_body_name">\\u9014\\u7ecf\\u70b9\'+v+\'\\uff1a<b id="B_PointName\'+v+\'">\'+c+"</b></div>"," </div>",\' <div id="RD_TOP_BUT\'+v+\'" class="sel_body_button">\'+f[v]+"</div>"," </div>",\' <div class="sel_body_body" id="RADIV_BODY\'+ v+\'">\'+e[v].join("")+"</div>"," </div>\\n</div>"].join("\\n"));b.tpList=u.join("");return this.z_(b)}},XB:function(){var a;x.$("RouteAddress_DIV0")&&(a=x.$("RouteAddress_DIV0").getElementsByTagName("tr"),this.FN(a));x.$("RouteAddress_DIV1")&&(a=x.$("RouteAddress_DIV1").getElementsByTagName("tr"),this.FN(a));var b=this;this.zb&&this.zb.addEventListener("open",function(){var a=x.$("selInfoWndBtn");x.M(a,"click",function(){var c=a.getAttribute("data-uid").split("_");b.itmSelect(c[0],c[1])});x.M(a,"mouseover", function(){b._selBtnOver(a)});x.M(a,"mousedown",function(){b._selBtnDown(a)});x.M(a,"mouseout",function(){b._selBtnOut(a)})});var c,d;x.$("RouteAddress_DIV0")&&(c=x.$("RouteAddress_DIV0").firstChild.firstChild,x.M(c,"click",function(){var a=c.getAttribute("data-uid");b.showLst(a)}));x.$("RouteAddress_DIV1")&&(d=x.$("RouteAddress_DIV1").firstChild.firstChild,x.M(d,"click",function(){var a=d.getAttribute("data-uid");b.showLst(a)}))},FN:function(a){var b=this;this.Fb(a,function(a,d){x.M(d,"mouseover", function(a){var c=d.getAttribute("data-uid").split("_");n2=parseInt(c[1],10);Zf=parseInt(c[2],10);b._lstMouseOver(this,0,c[0],Zf-n2,a)});x.M(d,"mouseout",function(a){var c=d.getAttribute("data-uid").split("_");n2=parseInt(c[1],10);Zf=parseInt(c[2],10);b._lstMouseOut(this,0,c[0],Zf-n2,a)});x.M(d,"click",function(a){var c=d.getAttribute("data-uid").split("_"),e=parseInt(c[0],10);n2=parseInt(c[1],10);Zf=parseInt(c[2],10);b.select(e,Zf,a)});var e=d.childNodes[2].getElementsByTagName("div")[0];x.M(e,"click", function(){var a=e.getAttribute("data-uid").split("_");b.itmSelect(a[0],a[1])});x.M(e,"onmouseover",function(){b._selBtnOver(e)});x.M(e,"onmouseout",function(){b._selBtnOut(e)});x.M(e,"onmousedown",function(){b._selBtnDown(e)})})},eZ:function(a,b){a.content||(a.content={start:[],end:[]});a.content.tpList=[];if(19==a.result.type){this.fZ(a,b);var c=a.content,d=[],e=c.length;a.content={start:[],end:[]};if(2<e)for(var f=1;f<e-1;f++)d.push(c[f]);a.content.end=c[e-1];a.content.tpList=d;a.content.start= c[0]}return a},fZ:function(a,b){var c={},d,e=0,f=0,g=[],i,k=a.result;d=[];c.city_list=[];c.count=[];c.current_null=[];c.e_query=[];c.e_wd=[];c.end_city=[];c.wd2=[];c.prio_flag=[];c.sug_index=[];c.total=[];c.s_wd="";c.s_query="";this.yw=[];k.e_wd||(k.e_wd=[],k.e_query=[]);d=this.nN(b.start);i=d.type;c.s_wd=1==i?d.sb:k.s_wd;c.s_query=1==i?d.sb:k.s_query;1==i&&(this.Ma[e].o=c.s_wd,this.Ma[e].x=d.point.split(",")[0],this.Ma[e].y=d.point.split(",")[1]);this.yw.push(2==i);c.total.push(1==i?1:k.total[f]); c.count.push(1==i?1:k.count[f]);c.current_null.push(1==i?0:k.current_null[f]);c.prio_flag.push(1==i?1:k.prio_flag[f]);c.sug_index.push(1==i?"":k.sug_index[f]);g.push(1==i?[{name:d.sb,geo:"1|"+d.point+";"+d.point+"|"+d.point+";"}]:a.content[f]);c.city_list.push(1==i?0:k.city_list[f]);c.wd2.push(1==i?"":k.wd2[f]);2==i&&f++;e++;d=decodeURIComponent(b.end).split("to:");for(var l=0,m;m=d[l];l++){m=this.nN(m);i=m.type;2==i&&m.uid&&m.point&&(i=1);this.yw.push(2==i);var n=2==i?m.sb:0==f?k.s_wd:k.e_wd[f-1]; c.e_wd.push(n);c.e_query.push(n);c.end_city.push(1==i?a.current_city:0==f?k.start_city:k.end_city[f-1]);1==i&&(this.Ma[e].o=c.s_wd,this.Ma[e].x=m.point.split(",")[0],this.Ma[e].y=m.point.split(",")[1]);m.wj&&(this.hY(e-1,{ly:c.e_wd[e-1],Wr:c.wd2[e],point:1==i?P.vL(m.point):p,uid:m.uid}),this.hu.push({ly:c.e_wd[e-1],Wr:c.wd2[e],point:1==i?P.vL(m.point):p,uid:m.uid}));c.total.push(1==i?1:k.total[f]);c.count.push(1==i?1:k.count[f]);c.current_null.push(1==i?0:k.current_null[f]);c.prio_flag.push(1==i? 1:k.prio_flag[f]);c.sug_index.push(1==i?"":k.sug_index[f]);g.push(1==i?[{name:m.sb,geo:"1|"+m.point+";"+m.point+"|"+m.point+";"}]:a.content[f]);c.city_list.push(1==i?0:k.city_list[f]);c.wd2.push(1==i?"":k.wd2[f]);2==i&&f++;e++}x.extend(a.result,c);a.content=g},hY:function(a,b){var c=x.extend({},b);if(this.gu.length>a)this.gu[a]=b;else if(this.gu.length==a)this.gu.push(b);else return;this.gu[a]=c},nN:function(a){a=decodeURIComponent(a);a=a.split("$$");return{type:a[0],uid:a[1],point:a[2],sb:a[3],Q2:a[4], Z2:a[5],R1:a[6],wj:a[7]}},ki:function(a){return 0==a?this.dc.content.start:a==this.$d?this.dc.content.end:this.dc.content.tpList[a-1]},DM:function(a,b,c){this.fi=-1;var c=c?c:this.ki(a),d=[];d.push(\'<div id="RA_ResItem_\'+a+\'"><table border="0" cellspacing="0" cellpadding="0" style="width:100%">\');for(var e=b[0];e<=b[1];e++){d.push(\'<tr onmouseover="RouteAddrInst._lstMouseOver(this, 0,\'+a+", "+(e-b[0])+\', event)" onmouseout="RouteAddrInst._lstMouseOut(this, 0,\'+a+", "+(e-b[0])+\', event)" onclick="RouteAddrInst.select(\'+ a+","+e+\', event)" filter = "item" data-uid="\'+a+"_"+b[0]+"_"+e+\'" ><th><div title="\\u5728\\u56fe\\u4e0a\\u663e\\u793a\\u8be5\\u70b9" class="icon iconbg" id="no_\'+a+"_"+(e-b[0]+1)+\'"></div></th>\');var f=0==a?"\\u9009\\u4e3a\\u8d77\\u70b9":a==this.$d?"\\u9009\\u4e3a\\u7ec8\\u70b9":"\\u9009\\u4e3a\\u9014\\u7ecf\\u70b9";d.push(\'<td style="word-break:break-all;padding-right:24px">\');d.push(\'<a href="javascript:void(0)">\'+c[e].name+"</a>");c[e].addr&&""!=c[e].addr&&(d.push("<div>"),0==c[e].poiType?d.push(\'<span style="color:#999">\\u5730\\u5740: \'+ c[e].addr+"</span>"):1==c[e].poiType?d.push(\'<span style="color:#999">\\u9014\\u7ecf\\u516c\\u4ea4\\u8f66\\uff1a</span>\'+c[e].addr.split(";").join("; ")):3==c[e].poiType&&d.push(\'<span style="color:#999">\\u9014\\u7ecf\\u5730\\u94c1\\uff1a</span>\'+c[e].addr.split(";").join("; ")),d.push("</div>"));d.push("</td>");d.push(\'<td style="vertical-align:middle;width:106px"><div tid="selBtn_\'+a+"_"+e+\'" class="selBtn" onclick="RouteAddrInst.itmSelect(\'+a+","+e+\');return false;" onmouseover="RouteAddrInst._selBtnOver(this)" onmouseout="RouteAddrInst._selBtnOut(this)" onmousedown="RouteAddrInst._selBtnDown(this)" data-uid = "\'+ a+"_"+e+\'" >\'+f+"</div>");d.push(\'<a data-uid="\'+c[e].uid+\'" href="javascript:void(0);" class="list_street_view_poi" style="visibility:hidden"><img src="/static/images/transparent.gif" ></a>\');d.push("</td>");d.push("</tr>")}d.push("</table></div>");return d.join("")},FJ:function(a,b,c,d,e){0==d?a=U.vo(a,b,c,yh):d==this.$d?a=U.vo(a,b,c,zh):(c=this.hu[d-1],c.point=b,e&&(c.uid=e),a=U.KJ(a,b,d-1));return a},z_:function(a){var b=[];b.push(\'<div class="RouteAddressOuterBkg">\');b.push(\'<div class="RouteAddressTip"><span>\\u8bf7\\u9009\\u62e9\\u51c6\\u786e\\u7684\\u8d77\\u70b9\\u3001\\u9014\\u7ecf\\u70b9\\u6216\\u7ec8\\u70b9</span></div>\'); b.push(\'<div class="RouteAddressInnerBkg">\');b.push(\'<div id="pos5" style="display:none"></div>\');b.push(\'<div id="RouteAddress_DIV0" class="\'+a.startPointClass+\'"> \');b.push(\'<div class="sel_body">\');b.push(\'<div class="sel_body_top" data-uid="0" onclick="RouteAddrInst.showLst(0)" >\');b.push(\'<div class="sel_body_title">\');b.push(\'<div class="sel_body_sign"></div>\');b.push(\'<div class="sel_body_name">\\u8d77\\u70b9\\uff1a<b id="B_PointName0">\'+a.startPoint+"</b></div>");b.push("</div>");b.push(\'<div id="RD_TOP_BUT0" class="sel_body_button">\'+ a.startButton+"</div>");b.push("</div>");b.push(\'<div class="sel_body_body" id="RADIV_BODY0">\'+a.startBody+"</div>");b.push("</div>");b.push("</div>");b.push(a.tpList);b.push(\'<div id="RouteAddress_DIV\'+a.endIndex+\'" class="\'+a.endPointClass+\'">\');b.push(\'<div class="sel_body">\');b.push(\'<div class="sel_body_top" data-uid=\'+a.endIndex+\' onclick="RouteAddrInst.showLst(\'+this.$d+\')" >\');b.push(\'<div class="sel_body_title">\');b.push(\'<div class="sel_body_sign"></div>\');b.push(\'<div class="sel_body_name">\\u7ec8\\u70b9\\uff1a<b id="B_PointName\'+ a.endIndex+\'">\'+a.endPoint+"</b></div>");b.push("</div>");b.push(\'<div id="RD_TOP_BUT\'+a.endIndex+\'" class="sel_body_button">\'+a.endButton+"</div>");b.push("</div>");b.push(\'<div class="sel_body_body" id="RADIV_BODY\'+a.endIndex+\'">\'+a.endBody+"</div>");b.push("</div>");b.push("</div>");b.push(\'<div id="pos6" style="display:none"></div>\');b.push("</div>");b.push("</div>");return b.join("")},showLst:function(a){this.hj=a;var b=this.dc.content.tpList.length+1,c=this.ki(a);if(!c||!(1==c.length&&c[0].fE&& 1==c[0].fE)){var d=this.fs,e=x.$("RouteAddress_DIV"+a).className;if(!("sel_n"==e||"sel_x"==e||this.yw&&!this.yw[a])){if("sel_n1"==e||"sel_y"==e||"sel_x1"==e){for(var f=0;f<=b;f++){var g=x.$("RouteAddress_DIV"+f);ha.Ec("B_PointName"+f).innerHTML=this.VW(f);"sel_x"==g.className?g.className="sel_x1":"sel_n"==g.className&&(g.className="sel_n1")}this.jC();this.xg&&(this.map.Sb(this.xg),this.xg=p);"sel_y"==e&&(this.Ma[a]={o:"",Lf:0,tn:0,x:0,y:0,Ac:-1},this.Cp[a]=0);0>=this.dc.result.count[a]?x.$("RouteAddress_DIV"+ a).className="sel_x":(x.$("RouteAddress_DIV"+a).className="sel_n",1!=this.dc.result.city_list[a]&&(b=10*(d[a]-1)+9,c.length<b+1&&(b=c.length-1),this.xo(a,[10*(d[a]-1),b])))}this.fi=-1}}},qB:function(a,b){var c;x.$("RA_ResItem_"+a)&&(c=x.$("RA_ResItem_"+a).childNodes[0]);if(c&&(c=c.rows[b]))c.style.backgroundColor="#F4F4F4",c.getElementsByTagName("td")[1].childNodes[0].style.visibility="visible",c.getElementsByTagName("th")[0].childNodes[0].style.backgroundPosition=24*-b+"px -32px";this.Sf.length> b&&(this.Sf[b].Tb(new nc(F.YF,F.YO,{offset:F.XO,imageOffset:new L(-F.VO*b,-F.WO),infoWindowOffset:F.XF})),this.ZI(this.Sf[b],o,o))},_lstMouseOver:function(a,b,c,d){a=this.k.ka.map;this.fi!=d&&(a.Xc(),this.qB(c,d))},_lstMouseOut:function(a,b,c,d){this.fi!=d&&this.Xv(c,d)},Xv:function(a,b){var c=p;x.$("RA_ResItem_"+a)&&(c=x.$("RA_ResItem_"+a).childNodes[0]);c&&(c=c.rows[b],c.style.backgroundColor="#ffffff",c.getElementsByTagName("td")[1].childNodes[0].style.visibility="",c.getElementsByTagName("th")[0].childNodes[0].style.backgroundPosition= 24*-b+"px -64px");this.Sf.length>b&&(this.Sf[b].Tb(new nc(F.YF,F.aG,{offset:F.p0,imageOffset:new L(-F.$F*b,-F.ZF),infoWindowOffset:F.o0})),this.ZI(this.Sf[b],q))},ZI:function(a,b,c){a&&a.zi&&(b&&!a.XH&&a.Zc&&a.Zc.style?(a.XH=o,c?a.zi(o,1000100):a.zi(o)):!b&&(a.Zc&&a.Zc.style)&&(delete a.XH,a.zi(q)))},select:function(a,b,c){if(2<arguments.length&&(c=c||window.I1,"selBtn"==(c.srcElement||c.target).className))return;var d=this.ki(a);this.map.Xc();d&&(this.Bp[0]!=this.Bp[1]&&this.xg&&this.map&&this.map.Bh(this.Tm), this.lU(d,a,b),-1!=this.fi&&this.Xv(a,this.fi),this.fi=b%10,this.qB(a,this.fi))},jC:function(){var a=this;(function c(){0!==a.Sf.length&&(a.map.Sb(a.Sf.shift()),c())})();(function d(){0!==a.Tm.length&&(a.Tm.shift(),d())})()},itmSelect:function(a,b){var c=this.map,d=this.ki(a);this.Ma[a].n=d[b].name;this.Ma[a].c=this.Bp[a];this.Ma[a].u=d[b].uid;var e=R.xb(P.tb(d[b].geo_base64||d[b].geo,o).point);this.Ma[a].x=e.lng;this.Ma[a].y=e.lat;this.Ma[a].t=d[b].poiType;x.$("B_PointName"+a)&&(x.$("B_PointName"+ a).innerHTML=d[b].name);this.xg=this.FJ(c,e,d[b].name,a);0!=a&&a!=this.$d&&(this.hu[a-1].ly=d[b].name);this.jC();if(this.jY())this.xg&&(c.Sb(this.xg),this.xg=p),this.submit();else{x.$("RouteAddress_DIV"+a)&&(x.$("RouteAddress_DIV"+a).className="sel_y");for(c=0;1<=this.$d;){c=(a+1)%(this.$d+1);x.$("RouteAddress_DIV"+c)&&x.$("RouteAddress_DIV"+c);break}if(0==this.Cp[c]){x.$("RouteAddress_DIV"+c)&&(x.$("RouteAddress_DIV"+c).className="sel_n");var d=this.fs[c],e=10*(d-1)+9,f=this.ki(c);f.length<e+1&& (e=f.length-1);this.xo(c,[10*(d-1),e]);this.select(c,0)}else 2==this.Cp[c]?x.$("RouteAddress_DIV"+c)&&(x.$("RouteAddress_DIV"+c).className="sel_n"):x.$("RouteAddress_DIV"+c)&&(x.$("RouteAddress_DIV"+c).className="sel_x");this.hj=c}},submit:function(){var a=this.map,b=this.Ma[0].c,c=this.Ma[this.$d].c;if(b==c)var d=b;var e={},f=new N("onpoiselected");if(13==this.dc.result.type||23==this.dc.result.type||24==this.dc.result.type)23==this.dc.result.type&&b!=c?(e.c=d||this.dc.current_city.code,e.sc=b,e.ec= c,e.sn="1$$$$"+this.Ma[0].x+","+this.Ma[0].y+"$$"+this.Ma[0].n+"$$$$$$",e.en="1$$$$"+this.Ma[1].x+","+this.Ma[1].y+"$$"+this.Ma[1].o+"$$$$$$"):(e.c=d||this.dc.current_city.code,e.sc=b,e.ec=c,e.sn="1$$"+this.Ma[0].u+"$$"+this.Ma[0].x+","+this.Ma[0].y+"$$"+this.Ma[0].n+"$$$$$$",e.en="1$$"+this.Ma[1].u+"$$"+this.Ma[1].x+","+this.Ma[1].y+"$$"+this.Ma[1].n+"$$$$$$");else{for(var g=d="",i=this.$d,k=0,l=this.hu.length;k<l;k++)d+=this.xx(this.hu[k]),g+=this.Ma[k+1].c+"+to:";e.sc=b;e.ec=g+c;e.sn="1$$$$"+this.Ma[0].x+ ","+this.Ma[0].y+"$$"+this.Ma[0].n+"$$$$$$";e.en=d+"1$$$$"+this.Ma[i].x+","+this.Ma[i].y+"$$"+this.Ma[i].n+"$$$$$$"}e.sq=this.Hy;e.eq=this.$w;f.paramInfo=e;f.sType=this.ty;a.dispatchEvent(f)},xx:function(a,b){var c=2,d="",e="",f="",g="0",i="";if(a.point||a.tN)c=1,e=a.point?a.point.lng+","+a.point.lat:a.tN.lng+","+a.tN.lat,a.uid&&(c=2,d=a.uid);a.ly&&(f=a.ly);a.Wr&&(g="1",i=a.Wr);isNaN(b)||(c=b);return c+"$$"+d+"$$"+e+"$$"+f+"$$"+g+"$$"+i+"$$$$1$$+to:"},jY:function(){for(var a=0;a<=this.$d;a++)if(""== this.Ma[a].n&&!this.Ma[a].x&&!this.Ma[a].y||this.Ma[a].n==j)return q;return o},_selBtnOver:function(a){a.style.backgroundPosition="-100px -81px"},_selBtnOut:function(a){a.style.backgroundPosition="-21px -81px"},_selBtnDown:function(a){a.style.backgroundPosition="-220px -81px";a.style.fontWeight="bold"},qa:function(){var a=this,b=this.$d;this.VN(this.dc);a.RN();for(var c=0;c<=b;c++)x.$("RADiv_PAGE"+c)&&(pg0=new od("RADiv_PAGE"+c,function(b){var c=a.hj,d=[10*(b-1),10*b-1];a.Gt[c]<d[1]+1&&(d[1]=a.Gt[c]- 1);x.D.remove=function(a){var a=x.$(a),b=a.parentNode;b&&b.removeChild(a)};x.$("RA_ResItem_"+c)&&(x.D.remove(x.$("RA_ResItem_"+c)),ha.D.Hx(x.$("RADiv_ResItem"+c),"AFTERBEGIN",a.DM(c,d)));a.xo(c,d,o);x.$("RADiv_ResItem"+c).scrollTop=0;a.fs[c]=b},{Uf:5,Id:a.tO[c],page:a.fs[d]}));var d=[0,9],c=this.hj,e=ha.Ec("RouteAddress_DIV"+c),f=this.ki(c);"sel_n"==e.className?this.dc.content&&(this.dc.result.city_list&&1!=this.dc.result.city_list[c]&&f&&0<f.length)&&(f.length<d[1]+1&&(d[1]=f.length-1),a.xo(c,d), a.select(c,0)):this.xg&&"sel_x"==e.className&&this.map.Bh(this.CE);for(var d=0;d<=b;d++)"sel_y"==x.$("RouteAddress_DIV"+d).className&&(c=this.ki(d),0<c.length&&(c[0].fE&&1==c[0].fE)&&(ha.I3(ha.Ec("RD_TOP_BUT"+d),"sel_body_button"),x.$("RD_TOP_BUT"+d).innerHTML=""))},TO:function(){var a=this.$d;this.VN(this.dc);this.RN();for(var b=0;b<=a;b++){var c=this.hj,d=[0,9];this.Gt[c]<d[1]+1&&(d[1]=this.Gt[c]-1);this.xo(c,d,o)}a=[0,9];b=this.hj;ha.Ec("RouteAddress_DIV"+b);c=this.ki(b);1==b?this.dc.content&& (this.dc.result.city_list&&1!=this.dc.result.city_list[b]&&c&&0<c.length)&&(c.length<a[1]+1&&(a[1]=c.length-1),this.xo(b,a)):this.xg&&0==b&&this.map&&this.map.Bh(this.CE);this.select(b,0)},VN:function(a){var b=this.map;if(a.VV&&!(a.result.P3&1)&&(29==a.result.type||13==a.result.type)){var a=a.VV,c=["country","province","city","area"],c=a.type!=p?modelConfig.vg[c[a.type]]:j,a=a.Fd!=p?a=P.tb(a.Fd,o).point:j;b.vW?(c&&b.Fg(c),a&&b.Vf(a)):(b.vW=o,b.Cd(a||b.Ja(),c||b.fa()))}},RN:function(){this.Bp=this.fu; for(var a=0;a<=this.$d;a++)0<this.dc.result.count[a]?0==this.dc.result.city_list[a]?(this.Cp[a]=1==this.dc.result.prio_flag[a]?1:0,this.Gt[a]=this.dc.result.count[a]):this.Cp[a]=2:this.Cp[a]=3},xo:function(a,b){var c=this,d=this.ki(a),e=c.map;c.jC();if(d){for(var f=b[0];f<=b[1];f++){var g=P.tb(d[f].geo_base64||d[f].geo,o);c.Sf.push(U.OU(g.ia[0],f-b[0],d[f].name,e));c.Tm.push(g.ia[0])}d=c.Tm;c.xg&&c.Bp[0]==c.Bp[1]&&d.push(c.xg.point);if(this.map.oa()==Oa){var g=Rc[Oa].t1[e.Vb][1],i=getPointsBounds(d), k=e.Zs(i).zoom;g.ft(i)?(15>=k&&(k=15),e.Cd(d[0],k)):e&&e.Bh(d)}else e&&e.Bh(d);11==c.Tm.length&&c.Tm.pop();for(var l=this.Sf,f=b[0];f<=b[1];f++)(function(){var d=f;l[f-b[0]]&&(l[f-b[0]].addEventListener("click",function(){c.select(a,d)}),l[f-b[0]].addEventListener("mouseover",function(){var b=d%10;c.fi!=b&&c.qB(a,b)}),l[f-b[0]].addEventListener("mouseout",function(){var b=d%10;c.fi!=b&&c.Xv(a,b)}))})()}},lU:function(a,b,c){var d=this,e=a[c],a="<span class=\'iw_poi_title\' title=\'"+e.name+"\'>"+e.name+ "</span>",f=[],g="";e.addr&&""!=e.addr&&(0==e.poiType?g="\\u5730\\u5740: "+e.addr:1==e.poiType?g="\\u9014\\u7ecf\\u516c\\u4ea4\\u8f66\\uff1a"+e.addr.split(";").join("; "):3==e.poiType&&(g="\\u9014\\u7ecf\\u5730\\u94c1\\uff1a"+e.addr.split(";").join("; ")));f.push("<div style=\'padding:11px 11px 6px 11px;line-height:20px;word-break:break-all\'>"+g+"</div>");f.push("<div style=\'line-height:180%;margin-bottom:10px;\'>");e="\\u9009\\u4e3a\\u9014\\u7ecf\\u70b9";0==b&&(e="\\u9009\\u4e3a\\u8d77\\u70b9");b==this.$d&&(e="\\u9009\\u4e3a\\u7ec8\\u70b9"); f.push("<div style=\'text-align:center;\'><div id=\'selInfoWndBtn\' class=\'selInfoWndBtn\' data-uid = \'"+b+"_"+c+"\' />"+e+"</div>");f.push("</div>");this.zb?(this.zb.Dc(a),this.zb.bd(f.join(""))):(this.zb=new qc(f.join(""),{title:a,height:0,width:280,margin:[0,0,0,0]}),this.zb.addEventListener("open",function(){var a=x.$("selInfoWndBtn");x.M(a,"click",function(){var b=a.getAttribute("data-uid").split("_");d.itmSelect(b[0],b[1])});x.M(a,"mouseover",function(){d._selBtnOver(a)});x.M(a,"mousedown",function(){d._selBtnDown(a)}); x.M(a,"mouseout",function(){d._selBtnOut(a)})}),this.zb.addEventListener("close",function(){d.Xv(b,i)}));var i=c%10;this.Sf&&this.Sf[i]&&this.Sf[i].Mb(this.zb)},VW:function(a){a==j&&(a=this.hj);return 0==a?this.Hy:a==this.$d?this.$w:this.vO[a-1]},Fb:function(a,b){for(var c=0,d=a.length;c<d;c++)b(c,a[c])}});qd.qH=function(a,b,c){var d="";0===c&&(d+=";border-top:1px solid #e4e6e7");var e="nav-ed";0===c&&(e="nav-st");c=["<div style=\'"+d+"\'><div style=\'cursor:pointer;padding:8px 0 8px 10px;line-height:15px\'"];c.push("onclick=\'"+b+"\'>");c.push("<span class=\'navtrans-navlist-icon "+e+"\'></span>");c.push("<div style=\'overflow:hidden;line-height:20px;\'>"+a);c.push("</div></div></div>");return c.join("")}; qd.pH=function(a,b,c){return\'<h1 style="margin:0;border-top:1px solid #e4e6e7;\'+(c?"border-bottom:1px solid #e4e6e7;padding:10px 0 10px 7px;":"padding:10px 0 9px 7px;")+"font:bold 16px "+F.fontFamily+\'"> \'+b+"\\u524d\\u5f80 "+a+" \\u7684\\u8def\\u7ebf</h1>"}; x.extend(qd.prototype,{search:function(a,b){return!a||!b?(this.Me(),this.rb(5),this.Ra(V.Tc),q):o},Me:function(){delete this.ja;delete this.ga;delete this.Ea;delete this.wq;delete this.Fl;var a=this.k.ka;this.rb();a.Ga&&(a.Ga.innerHTML="");a.map&&a.map.Xc();this.Lj();this.jb=-1},Ye:function(a,b){var c,b=b||{};"string"===typeof a?c=[2,"","",a,0,""]:a instanceof H?(c=R.xb(a),c=[1,"",c.lng+","+c.lat,b.z4||"",0,""]):(c=R.xb(a.point),c=[1,""+a.uid,c.lng+","+c.lat,a.title,0,""]);return c.join("$$")+"$$"}, Mh:function(a,b){var c;"string"===typeof a?c=a:(c=a instanceof H?a:a.point,c=c.lat+","+c.lng);"string"!==typeof a&&(b&&""!==b&&"string"===typeof b)&&(c="name:"+b+"|latlng:"+c);return c},xx:function(a){return this.Ye(a)+"$$1$$"},N0:function(){var a;"string"===typeof dest?a=dest:(a=dest instanceof H?dest:dest.point,a=a.lat+","+a.lng);return a}});var yh=0,zh=1; function lh(a){"string"===typeof a&&(a=parseFloat(a));a=!a||0>a?"0\\u7c73":10>=a?"10\\u7c73":1E3>a?10*Math.round(a/10)+"\\u7c73":(a/1E3).toFixed(1)+"\\u516c\\u91cc";"1000\\u7c73"===a&&(a="1.0\\u516c\\u91cc");return a} function mh(a,b){if(!a||isNaN(a))return"";var c="",d=Math.ceil(a/60);if("bustime"===b)var e=d%10,f=parseInt(d/10,10),d=0!==e?5<e?10*++f:f?10*f:5:d;e=parseInt(d/1440,10);d%=1440;f=parseInt(d/60,10);d%=60;1<=e&&(c+=e+"\\u5929");1<=f&&(c+=f+"\\u5c0f\\u65f6");if(1<=d&&(!b||!("nav"===b&&1<=e)))c+=d+"\\u5206\\u949f";return c}S(lf,{clearResults:lf.Me});x.extend(rd.prototype,{Od:function(){for(var a=0,b=this.Oa.length;a<b;a++){var c=this.Oa[a];this[c.method].apply(this,c.arguments)}delete this.Oa;var d=this;this.k.ka.map&&this.k.ka.map.addEventListener("onpoiselected",function(a){d.YE(a)})},BA:function(a,b){function c(a){var a=a.split("$$"),b=a[0],c=p;/[0-2]/.test(b)&&7===a.length&&(c=a[+b+1]);return c}var d=this;this.Lg(this.zd,function(e){e={qt:d.vd,c:e,sn:a,M1:b,sy:d.k.ad||0,ext:1};4===e.sy&&(e.f="[0,2,4,7,5,8,9,10,11]");var f=c(a),g=c(b);$c.ab(function(a, b){d.Hf(a,b)},e,{start:f,end:g})})},search:function(a,b){if(qd.prototype.search.call(this,a,b)===o){var c=this;this.Lg(this.zd,function(d){d||(this.rb(5),this.Ra(V.Tc));var e;"object"===typeof a&&"string"===typeof b||"string"===typeof a&&"object"===typeof b?"string"===typeof a?e={qt:"bse",c:d,isSingle:o,wd:a,en:c.Ye(b),sy:c.k.ad||0,ex:1}:"string"===typeof b&&(e={qt:"bse",c:d,isSingle:o,wd:b,sn:c.Ye(a),sy:c.k.ad||0,ex:1}):e={qt:c.vd,c:d,sn:c.Ye(a),en:c.Ye(b),sy:c.k.ad||0,ex:1};4===e.sy&&(e.f="[0,2,4,7,5,8,9,10,11]"); $c.ab(function(a,b){c.Hf(a,b)},e,{start:a,end:b,oH:"search"})})}},YE:function(a){if(a.sType===this.vd){a=a.paramInfo;a.qt=this.vd;var b=this;a.sy=b.k.ad||0;var c={start:a.sq,end:a.eq,oH:"preciseSearch"};this.k.fd&&(c.AN=z.qp+"mobile/webapp/interface/wiseBus/",c.Fs=o);$c.ab(function(a){b.Hf(a,c)},a,c)}},Hf:function(a,b){var c=this.k.ka.map;this.Me();this.Ea=a;var d=a.result;this.ga=b;if(0!==d.error||d.type!==this.Bu||!a.content)23===d.type&&this.k.ka.map?(c=new wd(a,{ka:this.k.ka,ty:this.vd}),d=K("div", {style:"font:12px "+F.fontFamily+";background:#fff"}),d.innerHTML=c.ua(),this.k.ka.Ga?(this.k.ka.Ga.appendChild(d),c.qa()):c.TO(),c.XB()):(this.ja=new ih({city:a.current_city.name,Ct:[],ad:d.sy,dO:j,TK:j}),this.rb(3),this.Ra(V.Tc,this.ja));else if(this.k.fd&&"search"===b.oH){var e=new N("onpoiselected"),f={};f.qt=this.vd;f.sy=this.k.ad||0;f.sq=b.start;f.eq=b.end;f.sn=d.sn?d.sn:this.Ye(d.start.wd);f.en=d.en?d.en:this.Ye(d.end.wd);f.c=d.c;e.paramInfo=f;e.sType=this.vd;c.dispatchEvent(e)}else this.Cl(), this.Dl(),this._selectPlan(0)},mS:function(a,b){var c=dd;0===b&&(c=0<a?2:1);return c},Cl:function(){var a=this.Ea.result,b=this.Ea.content,c=this.Ea.current_city,d={},e={};if("object"===typeof this.ga.start&&!(this.ga.start instanceof H))x.extend(d,this.ga.start);else{d.title=a.start.wd||"\\u8d77\\u70b9";d.uid=a.start.uid;d.url=V.Nh(d.uid,c.code);if(this.k.fd){var f=a.start.pt.split(",");d.point=R.Eb(new H(parseFloat(f[0]),parseFloat(f[1])))}else d.point=P.tb(a.start.pt,o).point;d.city=c.name}"object"=== typeof this.ga.end&&!(this.ga.end instanceof H)?x.extend(e,this.ga.end):(e.title=a.end.wd||"\\u7ec8\\u70b9",e.uid=a.end.uid,e.url=V.Nh(e.uid,c.code),this.k.fd?(f=a.end.pt.split(","),e.point=R.Eb(new H(parseFloat(f[0]),parseFloat(f[1])))):e.point=P.tb(a.end.pt,o).point,e.city=c.name);var f=[],g=0;this.wq=[];for(var i=0;i<b.length&&!(g>this.k.Fk-1);i++)for(var k=0,l=b[i]&&b[i].stops&&b[i].stops.length;k<l&&!(g>this.k.Fk-1);k++){this.wq[g]=[];for(var m=b[i].stops[k],n=b[i].lines[k],u=0,v=0,w=n.length;v< w;v++)"object"===typeof n[v]&&u++;for(var u=n[u+1],v=[],w=[],y=0,C="<table class=\'trans-plan-content\'>",A=0;A<m.length-1&&n[A].geo;A++){var B=m[A].getOn,B={title:B.name,uid:B.uid,url:V.Nh(B.uid,c.code),city:c.name,point:P.tb(B.geo,o).point},D=m[A+1].getOff,D={title:D.name,uid:D.uid,url:V.Nh(D.uid,c.code),city:c.name,point:P.tb(D.geo,o).point},E=[];if(0===A)0<m[A].walk.distance&&m[A].walk.geo&&(E=P.tb(m[A].walk.geo,o).ia.concat(B.point));else if(0<m[A].walk.distance&&m[A].walk.geo)var E=P.tb(m[A].getOff.geo, o).point,J=P.tb(m[A].getOn.geo,o).point,E=[E].concat(P.tb(m[A].walk.geo,o).ia).concat(J);w.push(new sh({nd:m[A].walk.distance,ia:E.slice(0),qy:ad,index:A,RE:i}));y+=m[A].walk.distance;A===m.length-2&&(0<m[A+1].walk.distance&&m[A+1].walk.geo&&(E=[D.point].concat(P.tb(m[A+1].walk.geo,o).ia)),w.push(new sh({nd:m[A+1].walk.distance,ia:E.slice(0),qy:ad,index:A+1,RE:i})),y+=m[A+1].walk.distance);E=P.tb(n[A].geo,o);J=[];if(this.k.fd&&n[A].link_color&&0<n[A].link_color.length)for(var O=0,M=0,Y=n[A].link_color, oa=Y.length;O<oa;O++){var ka=Y[O],Qa=ka.status,cb=E.ia.slice(M,M+ka.geo_cnt+1);J.push({ia:cb,status:Qa});M+=ka.geo_cnt}v.push(new uh({title:n[A].name,uid:n[A].uid,nd:n[A].distance,ia:E.ia,status:J,o_:[B,D],type:this.ZR(n[A].type),SY:n[A].station_num}));J=E.gb;E=J.re();J=J.kf();E=[E,J];this.wq[g].push(E[0],E[1]);y+=n[A].distance;m[A].walk.distance&&(C+="<tr><td><span class=\'navtrans-bus-icon walk\'></span><div class=\'navtrans-bus-desc\'>\\u6b65\\u884c\\u7ea6"+lh(m[A].walk.distance)+"\\uff0c\\u5230\\u8fbe<span class=\'navtrans-busstation\'>"+ B.title+"</span></div></td></tr>");C+="<tr><td><span class=\'navtrans-bus-icon bus\'></span><div class=\'navtrans-bus-desc\'>\\u4e58\\u5750<span class=\'navtrans-busstation\'>"+this.iU(n[A].name)+"</span>\\uff0c\\u7ecf\\u8fc7"+n[A].station_num+"\\u7ad9\\uff0c\\u5230\\u8fbe<span class=\'navtrans-busstation\'>"+D.title+"</span></div></td></tr>";A<m.length-2?C+="":m[A+1].walk.distance&&(C+="<tr><td><span class=\'navtrans-bus-icon walk\'></span><div class=\'navtrans-bus-desc\'>\\u6b65\\u884c\\u7ea6"+lh(m[A+1].walk.distance)+ "\\uff0c\\u5230\\u8fbe<span class=\'navtrans-busstation\'>"+m[A+1].getOn.name+"</span></div></td></tr>")}C+="</table>";if(0===y)break;f.push(new oh({iF:w,nd:y,duration:u,AY:v,description:C}));g++}b=z.Hc+"direction?"+Fb({region:c.name,origin:this.Mh(this.ga.start,this.ga.start.title?this.ga.start.title:this.ga.start),destination:this.Mh(this.ga.end,this.ga.end.title?this.ga.end.title:this.ga.end)})+"&output=html&mode=transit&src=baidu_map_jsapi";this.ja=new ih({city:c.name,Ct:f,start:d,end:e,url:b,ad:a.sy}); this.rb(0);this.Ra(V.Tc,this.ja)},JT:function(a){var b=this.k.ka.map,c=[],d=this;if(b){var e=this.ja.mf(a);if(e){var f=this.ja.sj(),g=this.ja.ih(),i=U.vo(b,f.point,f.title,yh);f.marker=i;i.addEventListener("click",function(){d._select(0)});this.va.push(i);i=U.vo(b,g.point,g.title,zh);g.marker=i;this.va.push(i);i.addEventListener("click",function(){d._selectLast()});this.wq[a].push(f.point,g.point);for(var k=0,i=e.px();k<i;k++){var l=e.ND(k),m=U.wo(b,l.pe()),n=[];if(this.k.fd&&0<l.Bd.length){for(var u= 0,v=l.Bd.length;u<v;u++){var w=l.Bd[u];w.status&&(w=U.HJ(b,w.ia,w.status),n.push(w),this.va.push(w))}l.S0=n}l.Vi=m;this.va.push(m);m=l.KD();c.push(m);var y=U.JJ(b,m.point,l.type,m.title);m.marker=y;this.va.push(y);m=l.JD();c.push(m);var C=U.JJ(b,m.point,l.type,m.title);m.marker=C;(function(){var a=k;y.addEventListener("click",function(){d._select(2*(a+1)-1)});C.addEventListener("click",function(){d._select(2*(a+1))})})();this.va.push(C);l=e.kh(k);0<l.Pe(q)&&(m=U.Ql(b,l.pe(),l.cp()),l.Vi=m,this.va.push(m))}l= e.kh(k);m=U.Ql(b,l.pe(),l.cp());l.Vi=m;this.va.push(m);d=this;this.k.ka.Zg&&b.Bh(this.wq[a],{margins:[30,30,30,30]});this.Ra(V.vu,e.Ti,e.ek);this.Ra(V.Yp,[f,g],c)}}},Dl:function(){if(this.k.ka.Ga&&this.k.ka.Ga.appendChild&&this.ja&&0<this.ja.qx()){for(var a=K("div",{style:"font:12px "+F.fontFamily+";background:#fff"}),b=qd.pH(this.ja.ih().title,"\\u4e58\\u516c\\u5171\\u4ea4\\u901a\\u5de5\\u5177"),c=this.rH(this.ja.sj().title,\'Instance("\'+this.ba+\'")["_select"](0)\',0),d=this.rH(this.ja.ih().title,\'Instance("\'+ this.ba+\'")["_selectLast"]()\',1),e=["<table style=\'font:12px "+F.fontFamily+";border-collapse:collapse;width:100%;\' cellpadding=\'0\' cellspacing=\'0\' border=\'0\'>"],f=0,g=this.ja.qx();f<g;f++){var i=this.ja.mf(f),k=i.Pe().replace(/(\\d+(?:.\\d+)?)/,"$1 "),l=i.Ps().replace(/(\\d+)/,"$1 "),m=i.NX();bg="";var n="<p style=\'margin:0px 0px 5px 0px;font-size:14px;color: #36c;\'>"+i.hX()+"</p>",k="<p style=\'margin:5px 0px;font-size:12px;\'>"+k+" &nbsp;|&nbsp; "+l+" &nbsp;|&nbsp; \\u6b65\\u884c"+m+"</p>";e.push("<tr class=\'tranroute-plan-list\' style=\\"cursor:pointer"+ bg+\'" onclick=\\\'Instance("\'+this.ba+\'")._selectPlan(\'+f+")\'>");e.push("<td style=\'vertical-align:top;line-height:18px\' ><div style=\'margin:3px 0px;border:1px solid #e4e6e7;\'><div class=\'trans-title\' style=\'padding: 5px 10px;\'>"+n+k+"</div><div class=\'trans_plan_desc\' style=\'padding:0px 8px;margin:0px;display:none;position:relative;\'>"+c+i.hh()+d+"</div></div></td>");e.push("</tr>")}e.push("</table>");c="<div style=\'border-bottom:1px solid #ccc;margin-bottom:10px;color:#7777cc;background:#e5ecf9;overflow:hidden;padding:2px;text-align:right\'>"; this.ja.moreResultsUrl&&(c+="<a style=\'color:#7777cc\' href=\'"+this.ja.moreResultsUrl+"\' target=\'_blank\'>\\u5230\\u767e\\u5ea6\\u5730\\u56fe\\u67e5\\u770b&#187;</a>");a.innerHTML=b+e.join("")+(c+"&nbsp;</div>");this.k.ka.Ga.appendChild(a);this.Ra(V.wu,a)}},_select:function(a,b){var c=this.k.ka.map;if(c){var b=b||window.event,d=this.ja.mf(this.jb);if(d){var e=this,f=2*d.px();if(0===a||a===f+1){var g=0===a?this.ja.sj():this.ja.ih(),i=U.Kw({content:"<b>"+g.title+"</b>",total:f,Nw:a,Yx:function(a){e._select(a)}}); i.addEventListener("open",function(){e.Ra(V.Bn,g,U.Qs(c))});var k=0===a?0:1,e=this;c.K.lm?Yd.kp(i,c.getCurrentCity().code,{panoInstance:c.P,lngLat:g.point,titleTip:g.title,type:"busline",beforeDomId:"trans_nav"},function(){e.va[k].Mb(i)}):e.va[k].Mb(i)}else{var d=d.ND(Math.floor((a+1)/2)-1),l,m=d.dp();1===a%2?(l=d.KD(),d=m+"<b>"+l.title+"\\u7ad9\\u4e0a\\u8f66</b>"):(l=d.JD(),d=m+"<b>"+l.title+"\\u7ad9\\u4e0b\\u8f66</b>");i=U.Kw({content:d,total:f,Nw:a,Yx:function(a){e._select(a)}});i.addEventListener("open", function(){e.Ra(V.Bn,l,U.Qs(c))});e=this;c.K.lm?Yd.kp(i,c.getCurrentCity().code,{panoInstance:c.P,lngLat:l.point,titleTip:l.title,type:"busline",beforeDomId:"trans_nav"},function(){l.marker.Mb(i)}):l.marker.Mb(i)}ma(b)}}},_selectLast:function(a){a=a||window.event;if(this.ja&&-1<this.jb){var b=this.ja.mf(this.jb);if(!b)return;this._select(2*b.px()+1)}ma(a)},_selectPlan:function(a){if(this.ja||this.V0.mf(a)){this.ja.mf(a);var b=this.k.ka.map;b&&(b.Xc(),this.Lj(),this.JT(a));if(this.k.ka.Ga){var c=this.k.ka.Ga.getElementsByTagName("table")[0]; if(!c)return;for(var b=x.getElementsByClassName(c,"tranroute-plan-list"),c=x.getElementsByClassName(c,"trans_plan_desc"),d=0;d<c.length;d++)d!==a&&(c[d].style.display="none");for(c=0;c<b.length;c++)x.Rb(b[c],"expand");c=x.getElementsByClassName(b[a],"trans_plan_desc")[0];"none"===c.style.display?(c.style.display="block",x.Ta(b[a],"expand")):c.style.display="none"}this.jb=a}},Lj:function(){for(var a=0;a<this.va.length;a++)this.va[a]&&this.va[a].ZA&&(this.va[a].ZA.remove(),this.va[a].ZA=p),this.va[a]&& this.va[a].remove(),this.va[a]=p;this.va.length=0},ZR:function(a){return rd.kP[a]},rH:function(a,b,c){var d="";0===c&&(d+="padding-top:5px;");var e="nav-ed";0===c&&(e="nav-st");c=["<div style=\'"+d+"\'><div style=\'cursor:pointer;padding:2px 0 2px 0px;line-height:15px\'"];c.push("onclick=\'"+b+"\'>");c.push("<span class=\'navtrans-navlist-icon "+e+"\'></span>");c.push("<div style=\'overflow:hidden;line-height:20px;\'>"+a);c.push("</div></div></div>");return c.join("")}});sd=rd.prototype;S(sd,{_internalSearch:sd.BA});td.nP=20;td.hP=50;td.gP=10; x.extend(td.prototype,{mE:function(){this.aa={xp:[],Jb:[],Di:[],bh:[],he:p,rd:p,QC:q,zw:p,Do:p,gM:q,Mw:p,RC:1,PC:1,bK:"\\u8d77\\u70b9",aK:"\\u7ec8\\u70b9",Vx:q,ns:[]}},Od:function(){this.mE();for(var a=0,b=this.Oa.length;a<b;a++){var c=this.Oa[a];this[c.method].apply(this,c.arguments)}delete this.Oa;var d=this;this.k.ka.map&&this.k.ka.map.addEventListener("onpoiselected",function(a){d.YE(a)})},search:function(a,b,c){this.aa.gM=q;var c=c||{},d=c.waypoints;"[object Array]"==Object.prototype.toString.call(d)||(d= []);this.RO=d;if(qd.prototype.search.call(this,a,b)===o){var e=this;this.Lg(this.zd,function(f){var f=f||1,g;if(("object"===typeof a&&"string"===typeof b||"string"===typeof a&&"object"===typeof b)&&0===d.length&&!e.k.fd)"string"===typeof a?g={qt:"nse",c:f,isSingle:o,wd:a,en:e.Ye(b),sy:e.k.ad||0}:"string"===typeof b&&(g={qt:"nse",c:f,isSingle:o,wd:b,sn:e.Ye(a),sy:e.k.ad||0}),this.vd=e.k.fd?e.vd:"nse",f={start:a,end:b,Fs:e.k.fd};else{var i=e.Ye(a);en="";if(0<d.length){for(var k=0;k<d.length;k++)en+= e.xx(d[k])+"+to:";en+=e.Ye(b)}else en=e.Ye(b);g={qt:e.vd,c:f,sn:i,en:en,sy:e.k.ad||0};f={start:i,end:en,Fs:e.k.fd}}0<d.length&&(f.FO=o);c.startCity&&(g.sc=c.startCity);if(c.endCity){i="";if(0<d.length){for(k=0;k<d.length;k++)i+=c.endCity+"+to:";i+=c.endCity}else i=c.endCity;g.ec=i}e.k.fd&&(g.route_traffic=1,g.version=4,g.mrs=0<e.RO.length?0:1);$c.ab(function(a,b){e.Hf(a,b)},g,f)})}},Tz:function(a,b){var c=this;c.aa.gM=o;c.Lg(c.zd,function(d){for(var d=d||1,e=R.xb(c.aa.Jb[0]),e="1$$$$"+e.lng+","+e.lat+ "$$$$",f=c.aa.RC||d,g="",i="",k=1,l=c.aa.Jb.length;k<l;k++){var m=c.aa.Jb[k];k===l-1?(g+=c.Ye(m),i+=c.aa.PC||d):(g=m.wj?g+(c.xx(m)+"+to:"):g+(c.Ye(m)+"+to:"),i+="0 +to:")}d={qt:c.vd,c:d,drag:1,sc:f,ec:i,sn:e,en:g,sy:c.k.ad||0};c.k.fd&&(d.route_traffic=1,d.version=4,d.mrs=0);e={start:a,end:b,Fs:c.k.fd};x.extend(e,{FO:o});$c.ab(function(a,b){c.Hf(a,b)},d,e)})},YE:function(a){var b=this;if(a.sType===this.vd){a=a.paramInfo;a.qt=this.vd;var b=this,c={start:a.sq,end:a.eq,Fs:b.k.fd};a.sy=b.k.ad||0;b.k.fd&& (a.route_traffic=1,a.version=4,a.mrs=0<b.RO.length?0:1);$c.ab(function(a){b.Hf(a,c)},a,c)}},Hf:function(a,b){this.Me();this.Ea=a;var c=a.result;this.ga=b;if(0!==c.error||c.type!==this.Bu)if(23===c.type||19===c.type){var c=new wd(a,{ka:this.k.ka,ty:this.vd}),d=K("div",{style:"font:12px "+F.fontFamily+";background:#fff"});d.innerHTML=c.ua(b);this.k.ka.Ga?(this.k.ka.Ga.appendChild(d),c.qa()):c.TO()}else this.ja=this.Wu({city:a.current_city.name,Ct:[],ad:c.sy,dO:j,TK:j}),this.rb(3),this.Ra(V.Tc,this.ja); else this.k.fd?this.DT():this.Cl(),this.IT(),this.Dl()},mS:function(a,b){var c=dd;0===b&&(c=0<a?2:1);return c},CB:function(){this.aa.rd&&this.aa.rd.KC();for(var a=0,b=this.aa.bh.length;a<b;a++){var c=this.aa.bh[a];c instanceof T&&c.KC()}},DT:function(){var a=this.Ea.result,b=this.Ea.content,c=this.Ea.current_city,d=a.waypoints,e=b.taxis&&b.taxis[0]&&b.taxis[0].total_price||0,f=[],g=[],i=0,k=0,l=b.routes[0].legs,m=b.steps,n=b.stepts,u=[],v=[];this.Fl=[];var w=this.aa.Di.slice(0);this.aa.Di.length= 0;var y={},C={},A=[],b=[],B=[],D=[];if("object"===typeof this.ga.start&&!(this.ga.start instanceof H))x.extend(y,this.ga.start);else{y.title=a.start.wd||"\\u8d77\\u70b9";y.uid=a.start.uid;y.url=V.Nh(y.uid,a.start_city.code);var E=a.start.pt.split(",");y.point=R.Eb(new H(parseFloat(E[0]),parseFloat(E[1])));y.city=a.start_city.cname}this.aa.RC=a.start_city.code;if("object"===typeof this.ga.end&&!(this.ga.end instanceof H))x.extend(C,this.ga.end);else{var J,E=a.end[a.end.length-1];J=a.end_city[a.end_city.length- 1];this.aa.PC=J.code;C.title=E.wd||"\\u7ec8\\u70b9";C.uid=E.uid;"null"===C.uid&&(C.uid="");C.url=V.Nh(E.uid,J.code);E=E.pt.split(",");C.point=R.Eb(new H(parseFloat(E[0]),parseFloat(E[1])));C.city=J.cname}J=E=0;for(var O=l.length;J<O;J++){var M=l[J],i=i+M.distance,k=k+M.duration;f.push(M.distance);g.push(M.duration);for(var Y=[],oa=[],ka=[],Qa=[],M=M.stepis,cb=0,Ya=M.length;cb<Ya;cb++){for(var Ea=M[cb],cd=Ea.s,Ea=Ea.n,vg=m.slice(cd,Ea+cd),di=n.slice(cd,Ea+cd),oe=0;oe<Ea;oe++){for(var Cd=vg[oe],hf=di[oe], wg=hf.end,xg=hf.status,Dd=P.tb(Cd.path,o).ia,Ue=0,ph=[],Ve=0,Ki=wg.length;Ve<Ki;Ve++){var qh=wg[Ve];ph[Ve]=Dd.slice(Ue,Ue+qh+1);Ue+=qh}this.Fl[E]=Dd;oa=oa.concat(Dd);ka.push(Dd);Qa.push(xg);Cd.gy=Dd;Cd.p4=hf;Cd.NF=xg;Cd.M_=ph;E++}Y=Y.concat(vg);v=v.concat(n.slice(cd,Ea+cd+1))}u.push(Y);B.push(ka);D.push(Qa);b.push(oa)}l=[];J=0;for(g=b.length;J<g;J++)m=new sh({Aj:u[J],nd:f[J],index:J,ia:B[J],NF:D[J],qy:this.Cu}),l.push(m);J=new kh({iF:l,nd:i,duration:k});f="";i={};B=p;B=k="string";u=this.k.ka.map; this.ga.start instanceof H&&(k="point");this.ga.end instanceof H&&(B="point");"point"===k&&"string"===B||"string"===k&&"point"===B?(B="nse",u.Gd(),x.extend(i,{region:c.name,zoom:u.fa()}),"string"===k?(i.origin=this.ga.start,i.destination=this.Mh(this.ga.end,this.ga.end.title?this.ga.end.title:this.ga.end)):(i.destination=this.ga.end,i.origin=this.Mh(this.ga.start,this.ga.start.title?this.ga.start.title:this.ga.start))):(B=fd,i.region=c.name,i.origin_region=a.start_city.cname,i.destination_region= a.end_city[0].cname,i.origin=this.Mh(this.ga.start,this.ga.start.title?this.ga.start.title:this.ga.start),i.destination=this.Mh(this.ga.end,this.ga.end.title?this.ga.end.title:this.ga.end));B!==p&&(f=z.Hc+"direction?"+Fb(i)+"&output=html&mode=driving&src=baidu_map_jsapi");this.ja=this.Wu({city:c.name,Ct:[J],start:y,end:C,url:f,ad:a.sy,kO:e});this.aa.Jb.length=0;this.aa.xp.length=0;c=1;for(J=0;J<d.length;J++)e=d[J],f=(e.pt?e.pt:a.end[J].pt).split(","),f=R.Eb(new H(parseFloat(f[0]),parseFloat(f[1]))), f.wj=e.if_wp?e.if_wp:a.end[J].pt,A.push(f),this.aa.Di.push({title:e.wd?e.wd:w[J]&&w[J].title?w[J].title:"\\u672a\\u77e5\\u8def\\u6bb5",curNo:c,point:f}),c++;this.aa.Jb.push(y.point);J=0;for(g=A.length;J<g;J++)this.aa.Jb.push(A[J]);this.aa.Jb.push(C.point);J=0;for(g=b.length;J<g;J++)a=b[J],a.Rk=J,a.mj=J+1,this.aa.xp.push(a);this.rb(0);this.Ra(V.Tc,this.ja)},Cl:function(){var a=this.Ea.result,b=this.Ea.content,c=this.Ea.current_city,d=b.kps,e=b.rss,f=a.waypoints,g={},i={};"object"===typeof this.ga.start&& !(this.ga.start instanceof H)?x.extend(g,this.ga.start):(g.title=a.start.wd||"\\u8d77\\u70b9",g.uid=a.start.uid,g.url=V.Nh(g.uid,a.start_city.code),g.point=P.tb(a.start.pt,o).point,g.city=a.start_city.cname);this.aa.RC=a.start_city.code;if("object"===typeof this.ga.end&&!(this.ga.end instanceof H))x.extend(i,this.ga.end);else{var k,l;k=a.end[a.end.length-1];l=a.end_city[a.end_city.length-1];this.aa.PC=l.code;i.title=k.wd||"\\u7ec8\\u70b9";i.uid=k.uid;"null"===i.uid&&(i.uid="");i.url=V.Nh(k.uid,l.code); i.point=P.tb(k.pt,o).point;i.city=l.cname}var m=[],n=[],u=[],v=0,w=[];this.Fl=[];l=[];k=[];var y=[],C=0;this.aa.Di.length=0;for(var A=1,B=0,D=d.length-1;B<D;B++){var E=d[B],J=d[B+1],O=e[B],M=e[B-1]||{},Y=e[B+1],oa=P.tb(E.pt,o).point,ka=P.tb(O.g,o);ka&&(y=y.concat(ka.ia));v+=Y.d;3===E.rt?(1===f[A-1].if_wp&&(oa.wj=1),l.push(oa),k.push(y.slice(0)),y=[],m.push(n.slice(0)),n=[],u.push(v),v=0,this.aa.Di.push({title:M.n||Y.n||"\\u672a\\u77e5\\u8def\\u6bb5",curNo:A,point:oa}),A++):(n.push(new wh({point:oa,index:n.length, description:this.RR(E,O,Y,B,D,M,J),nd:Y.d})),ka&&(this.Fl[C]=1<B?[w[w.length-1]].concat(ka.ia):ka.ia,w=w.concat(ka.ia)),C++)}0<y.length&&k.push(y);0<n.length&&m.push(n);0<v&&u.push(v);d=[];B=0;for(D=k.length;B<D;B++)e=new sh({Aj:m[B],nd:u[B],index:B,ia:k[B],qy:this.Cu}),d.push(e);B=b.time;this.vd===gd&&(B=Math.round(b.dis/1.35));b=new kh({iF:d,nd:b.dis,duration:B,nW:this.aa.Di});B="";D={};f=p;f=d="string";e=this.k.ka.map;this.ga.start instanceof H&&(d="point");this.ga.end instanceof H&&(f="point"); "point"===d&&"string"===f||"string"===d&&"point"===f?(f="nse",e.Gd(),x.extend(D,{region:c.name,zoom:e.fa()}),"string"===d?(D.origin=this.ga.start,D.destination=this.Mh(this.ga.end,this.ga.end.title?this.ga.end.title:this.ga.end)):(D.destination=this.ga.end,D.origin=this.Mh(this.ga.start,this.ga.start.title?this.ga.start.title:this.ga.start))):(f=fd,D.region=c.name,D.origin_region=a.start_city.cname,D.destination_region=a.end_city[0].cname,D.origin=this.Mh(this.ga.start,this.ga.start.title?this.ga.start.title: this.ga.start),D.destination=this.Mh(this.ga.end,this.ga.end.title?this.ga.end.title:this.ga.end));f!==p&&(B=z.Hc+"direction?"+Fb(D)+"&output=html&mode=driving&src=baidu_map_jsapi");this.ja=this.Wu({city:c.name,Ct:[b],start:g,end:i,url:B,ad:a.sy,kO:this.oS()});this.aa.Jb.length=0;this.aa.xp.length=0;this.aa.Jb.push(g.point);B=0;for(D=l.length;B<D;B++)this.aa.Jb.push(l[B]);this.aa.Jb.push(i.point);B=0;for(D=k.length;B<D;B++)a=k[B],a.Rk=B,a.mj=B+1,this.aa.xp.push(a);this.rb(0);this.Ra(V.Tc,this.ja)}, tH:function(){for(var a=0,b=this.ja.mf(0),c=0,d=b.Vs();c<d;c++)var e=b.kh(c),a=a+e.sx();return a},Vq:function(a){for(var b=0,c=this.ja.mf(0),d=0,e=c.Vs();d<e;d++)for(var f=c.kh(d),g=0,i=f.sx();g<i;g++){var k=f.zL(g);if(b===a)return k;b++}},RR:function(a,b,c,d,e,f,g){var i="",i=parseInt(b.d,10),k=b.poi;k&&(i-=k.pd);var i=lh(i),f=this.mA(f.t,f.n),k=this.mA(b.t,b.n),l=this.mA(b.t,c.n),m=this.zH(a.dw)||"",m=a.dr?m+"<span>"+a.dr+"</span>\\uff0c":"";3===g.rt&&(m+="\\u5230\\u8fbe<span>"+this.lA(g.rt)+"</span>\\uff0c"); c=k===l?"":this.kS(c.t,c.n)+"<span>"+l+"</span>";g=this.LH(a.ett||a.extt||a.tt);i=g+"<div class=\'navtrans-navlist-content\'>"+((""!==k&&f===k?"\\u7ee7\\u7eed":"")+this.lS(b.t,b.n))+k+this.lA(a.rt)+i+"\\uff0c"+this.hS(b)+this.pS(a)+m;0===d?i=g+"<div class=\'navtrans-navlist-content\'>\\u4ece\\u8d77\\u70b9\\u5411"+this.gv(a.ett||a.extt||a.tt)+"\\u51fa\\u53d1</div>":0<d&&d<e-1?((a=this.gv(a.ett||a.extt||a.tt))||(a=this.gv(1)),i=i+a+c+"</div>"):i+="\\u5230\\u8fbe\\u7ec8\\u70b9</div>";return i},GS:function(a,b,c){if(b&& c&&0<c.length)for(var d=0,e=c.length;d<e;d++){var f=a.ac(c[d]);if(U.WW(b,f)<=td.nP)return o}return q},IT:function(){this.k.ka.map&&this.ja&&(this.NT(),this.KT())},KT:function(){for(var a=this.k.ka.map,b=this.ja.mf(0),c=b.kh(0),d=this.ja.sj(),e=this.ja.ih(),f=this,g=this.aa.Jb.length,i=[],k=[],l,m=0,n=this.aa.xp.length;m<n;m++){var u=this.aa.xp[m];l=U.Ql(a,u,c.cp());b.ek[m].Vi=l;l.Rk=u.Rk;l.mj=u.mj;u=l.Gd();i.push(u.re());i.push(u.kf());this.Vz&&g<td.gP+2&&(l.addEventListener("mousemove",function(b){f.aa.Vx? f.aa.rd&&f.aa.rd.U():(f.aa.Mw=this,f.aa.rd?f.GS(a,b.pixel,f.aa.Jb)?f.aa.rd.U():(f.aa.rd.show(),f.aa.rd.sa(b.point),f.aa.he.bd("\\u62d6\\u52a8\\u4ee5\\u66f4\\u6539\\u8def\\u7ebf"),f.aa.he.show(),f.aa.rd.fn(f.aa.he)):(f.aa.rd=U.EJ(a,b.point),f.aa.rd.Xb(),f.aa.rd.addEventListener("dragging",function(){f.KI(this,a,f.aa.Mw.Rk,f.aa.Mw.mj)}),f.aa.rd.addEventListener("dragend",function(){var a=f.aa.zw,b=a.name,c=f.aa.Mw.mj;a.wj=p;f.aa.Jb.splice(c,0,a);f.aa.Di.splice(c,0,{title:b?b:"\\u672a\\u77e5\\u8def\\u6bb5",curNo:c, point:a});this.sa(a);f.CB();f.Tz(d,e)}),f.aa.he||(f.aa.he=U.sK()),a.Ia(f.aa.rd)))}),l.addEventListener("mouseout",function(){f.aa.rd&&f.aa.rd.U()}));f.aa.bh.push(l);if(this.k.fd){c=b.kh(m);l=0;for(u=c.Nr.length;l<u;l++)for(var v=c.Nr[l],w=v.M_,v=v.NF,y=0,C=w.length;y<C;y++){if(v[y])var A=U.HJ(a,w[y],v[y]);k.push(A);f.aa.bh.push(A)}c.d1=k}}this.k.ka.Zg&&a.Bh(i,{margins:[30,30,30,30]});this.Ra(V.vu,b.ek)},NT:function(){var a=this.k.ka.map;this.ja.mf(0);for(var b=this.ja.sj(),c=this.ja.ih(),d=this,e= 0,f=0,g=this.aa.Jb.length;f<g;f++){var i=this.aa.Jb[f];if(0===f)i=U.vo(a,i,b.title,yh),b.marker=i,i.addEventListener("click",function(){d._select(0)}),this.va.push(i);else if(f===this.aa.Jb.length-1)i=U.vo(a,i,c.title,zh),c.marker=i,i.addEventListener("click",function(){d._select(d.tH()+1)}),this.va.push(i);else{i.wj?(i=U.KJ(a,i,e),e++,i.wj=1):i=U.EJ(a,i);this.aa.Di[f-1].Lm=i;var k=new cc;k.ow(new fc("\\u5220\\u9664\\u8be5\\u70b9",function(a,b,c){d._delVia(c.Ow)},{width:60}));i.uo(k);d.aa.ns.push(k)}i.Ow= f;this.Vz&&(i.Xb(),i.addEventListener("mouseover",function(){d.aa.Vx=o;d.aa.he?(d.aa.he.bd("\\u62d6\\u52a8\\u4ee5\\u66f4\\u6539\\u8def\\u7ebf"),d.aa.he.show()):d.aa.he=U.sK();this.fn(d.aa.he)}),i.addEventListener("mouseout",function(){this.MD()&&this.MD().U();d.aa.Vx=q}),i.addEventListener("dragging",function(){d.KI(this,a)}),i.addEventListener("dragend",function(){var a=d.aa.zw,e=this.Ow;this.wj&&(a.wj=1);d.aa.Jb[e]=a;this.sa(a);var a=d.aa.Jb[0],f=d.aa.Jb[d.aa.Jb.length-1];0===e&&(b.point=a,b.title=d.aa.bK); e===d.aa.Jb.length-1&&(c.point=f,c.title=d.aa.aK);d.CB();d.Tz(b,c)}));d.aa.bh.push(i)}e=[b];e=e.concat(this.aa.Di);e=e.concat([c]);this.Ra(V.Yp,e)},KI:function(a,b,c,d){var e=this;if(e.aa.QC!==o){e.aa.QC=o;setTimeout(function(){e.aa.QC=q},td.hP);var f;f=R.xb(a.ha());var g=b.fa(),i=a.Ow,k=e.k.ad;if("undefiend"!==typeof c&&"undefined"!==typeof d){var l=e.aa.Jb[c],l=R.xb(l),i=e.aa.Jb[d],i=R.xb(i);f={qt:"drag",pt:f.lng+","+f.lat,sn:l.lng+","+l.lat,en:i.lng+","+i.lat,r:5E3,st:1,et:1,sy:k,l:g}}else 0=== i?(i=e.aa.Jb[i+1],i=R.xb(i),f={qt:"drag",pt:f.lng+","+f.lat,sn:"",en:i.lng+","+i.lat,r:5E3,st:1,et:1,sy:k,l:g}):i===this.aa.Jb.length-1?(l=e.aa.Jb[i-1],l=R.xb(l),f={qt:"drag",pt:f.lng+","+f.lat,sn:l.lng+","+l.lat,en:"",r:5E3,st:1,et:1,sy:k,l:g}):(l=e.aa.Jb[i-1],l=R.xb(l),i=e.aa.Jb[i+1],i=R.xb(i),f={qt:"drag",pt:f.lng+","+f.lat,sn:l.lng+","+l.lat,en:i.lng+","+i.lat,r:5E3,st:1,et:1,sy:k,l:g});$c.ab(function(a,b){e.QT(a,b)},f,{UV:a,map:b,Rk:c,mj:d})}},QT:function(a,b){if(a&&a.content){this.aa.zw=P.tb(a.content.dragpt, o).point;var c,d=b.map,e=b.Rk,f=b.mj,g=b.UV.Ow;"undefiend"!==typeof e&&"undefined"!==typeof f?c=P.lN(a.content.geo).ia:0===g?(c=P.tb(a.content.geo,o).ia,this.aa.bK=a.content.name?a.content.name:"\\u8d77\\u70b9"):g===this.aa.Jb.length-1?(c=P.tb(a.content.geo,o).ia,this.aa.aK=a.content.name?a.content.name:"\\u7ec8\\u70b9"):c=P.lN(a.content.geo).ia;c&&(this.yQ(g,d,e,f),this.aa.Do?this.aa.Do.ge(c):(e=this.ja.mf(0).kh(0),this.aa.Do=U.Ql(d,c,e.cp())));c=a.content.name?a.content.name:"\\u672a\\u77e5\\u8def\\u6bb5"; this.aa.zw.name=c;d="("+lh(a.content.dis)+")";this.aa.he&&this.aa.he.show();this.aa.he&&this.aa.he.bd(c+d)}},yQ:function(a,b,c,d){for(var e=0,f=this.aa.bh.length;e<f;e++){var g=this.aa.bh[e];if(g instanceof Ac)if("undefiend"!==typeof c&&"undefined"!==typeof d){if(g.Rk===c&&g.mj===d){b.Sb(g);break}}else(g.Rk===a||g.mj===a)&&b.Sb(g)}this.dg&&this.dg.U()},_select:function(a){var b=this.jb,c=this.k.ka;if(c.Ga){var d=c.Ga.getElementsByTagName("table"),d=d[d.length-1].getElementsByTagName("tr");0<=b-1&& d[b-1]&&(d[b-1].style.background="");0<=a-1&&d[a-1]&&(d[a-1].style.background="#f0f0f0")}var e=c.map;if(e){var b=this.ja.mf(0).kh(0),d=this.tH(),f=this;e.Xc();if(0===a||a===d+1){var g=0===a?this.ja.sj():this.ja.ih(),i=U.Kw({content:"<b>"+g.title+"</b>",total:d,Nw:a,Yx:function(a){f._select(a)},TX:1===c.bt?q:o});i.addEventListener("open",function(){f.Ra(V.Bn,g,U.Qs(e))});i.addEventListener("close",function(){if(f.k.ka.Ga){var a=c.Ga.getElementsByTagName("table");if(a=a[a.length-1])a=a.getElementsByTagName("tr"), 0<=f.jb-1&&a[f.jb-1]&&(a[f.jb-1].style.background="")}f.jb=-1});var k=0===a?0:1,f=this;e.K.lm?Yd.kp(i,e.getCurrentCity().code,{panoInstance:e.P,lngLat:g.point,titleTip:g.title,type:"busline",beforeDomId:"trans_nav"},function(){f.va[k].Mb(i)}):f.va[k].Mb(i);this.dg&&this.dg.U()}else{var l=c.bt;if(1===l){var m=this.Vq(a-1),i=U.Kw({content:m.hh()?m.hh(q):m.instructions,total:d,Nw:a,Yx:function(a){f._select(a)}});i.addEventListener("open",function(){f.Ra(V.Bn,m,U.Qs(e))});i.addEventListener("close",function(){if(f.k.ka.Ga){var a= c.Ga.getElementsByTagName("table");if(a=a[a.length-1])a=a.getElementsByTagName("tr"),0<=f.jb-1&&a[f.jb-1]&&(a[f.jb-1].style.background="")}f.jb=-1});var n=m.ha?m.ha():m.gy[m.gy.length-1],f=this;e.K.lm?Yd.kp(i,e.getCurrentCity().code,{panoInstance:e.P,lngLat:n,titleTip:m.hh?m.hh(q):m.instructions,type:"driving",beforeDomId:"trans_nav"},function(){e.Mb(i,n)}):e.Mb(i,n)}else if(2===l)if(1===a&&!this.k.fd)m=this.Vq(0),e.Vf(m.ha?m.ha():m.gy[m.gy.length-1]),c.Zg&&e.Oc(17),this.dg&&this.dg.U();else if(this.Fl[a- 1]&&(this.dg?(this.dg.ge(this.Fl[a-1]),this.dg.show()):this.dg=U.Ql(e,this.Fl[a-1],b.cp()+2),c.Zg))b=e.Zs(this.dg.Gd()),17<b.zoom&&(b.zoom=17),e.Bh(b)}}this.jb=a},_toggle:function(){var a=this.k.ka;if(a.Ga){var b=x.getElementsByClassName(a.Ga,"navtrans-res");b&&0<b.length&&(b=b[0],b.style.display=b&&"none"===b.style.display?"":"none");if((a=x.getElementsByClassName(a.Ga,"navtrans-view"))&&0<a.length)a=a[0],x.D.D_(a)}},Lj:function(){var a=this.k.ka.map;if(a){for(var b=0,c=this.va.length;b<c;b++)a.Sb(this.va[b]), this.va[b]=p;this.va.length=0;a.Sb(this.dg);this.dg=p;if(this.aa){this.aa.rd&&(a.Sb(this.aa.rd),this.aa.rd=p);this.aa.he&&(a.Sb(this.aa.he),this.aa.he=p);b=0;for(c=this.aa.bh.length;b<c;b++)a.Sb(this.aa.bh[b]),this.aa.bh[b]=p;this.aa.bh.length=0;this.aa.Do&&(a.Sb(this.aa.Do),this.aa.Do=p);b=0;for(c=this.aa.ns.length;b<c;b++)a.zp(this.aa.ns[b]),this.aa.ns[b]=p;this.aa.ns.length=0;this.aa.Vx=q}}},_delVia:function(a){if(this.ja){var b=this.ja.sj(),c=this.ja.ih();this.aa.Jb.splice(a,1);this.CB();this.Tz(b, c)}},Dl:function(){if(this.k.ka.Ga&&this.k.ka.Ga.appendChild&&this.ja&&0<this.ja.qx()){var a=this.ja.mf(0),b=K("div",{style:"font:12px "+F.fontFamily+";background:#fff"}),c=this.aa.Di,d=c.length,e=[],f=this.vd===fd,f=qd.pH(this.ja.ih().title,f?"\\u9a7e\\u8f66":"\\u6b65\\u884c",0<d);if(0<d){e.push("<table style=\'width:100%;margin-left:4px;font:12px "+F.fontFamily+";border-collapse:collapse\' cellpadding=\'0\' cellspacing=\'0\' border=\'0\'>");for(var g=0;g<d;g++)e.push("<tr>"),0===g&&(1===d?e.push(\'<td style="padding:2px 5px;line-height:20px">\\u9014\\u7ecf\\u70b9</td>\'): e.push(\'<td valign="top" rowspan="\'+d+\'" style="padding:2px 5px;line-height:18px">\\u9014\\u7ecf\\u70b9</td>\')),e.push(\'<td style="padding:2px 5px;line-height:20px">\'+c[g].title+"</td>"),e.push(\'<td style="padding:2px 10px;line-height:20px;cursor:pointer;color:#0000ff" onclick=\\\'Instance("\'+this.ba+\'")._delVia(\'+c[g].curNo+")\'>\\u5220\\u9664</td>"),e.push("</tr>");e.push("</table>")}for(var c=qd.qH(this.ja.sj().title,\'Instance("\'+this.ba+\'")._select(0)\',0),d=["<table class=\'navtrans-table\' style=\'width:100%;font:12px "+ F.fontFamily+";border-collapse:collapse\' cellpadding=\'0\' cellspacing=\'0\' border=\'0\'>"],i=0,k=0,l=a.Vs();k<l;k++)for(var m=a.kh(k),g=0,m=m.sx();g<m;g++){var n="";this.jb===i+1&&(n=";background:#f0f0f0");d.push(\'<tr style="cursor:pointer\'+n+\'" onclick=\\\'Instance("\'+this.ba+\'")._select(\'+(i+1)+")\'>");d.push("<td style=\'border-bottom:1px solid #E4E6E7;padding:10px;line-height:20px;\' >"+(this.Vq(i).hh?this.Vq(i).hh():this.Vq(i).instructions)+"</td>");d.push("</tr>");i++}d.push("</table>");g=qd.qH(this.ja.ih().title, \'Instance("\'+this.ba+\'")._select(\'+(i+1)+")",1);a="<div class=\'navtrans-view expand\' style=\'position:relative;color:#7777cc;background:#e5ecf9;height:53px;overflow:hidden;text-align:right\' onclick=\'Instance(\\""+this.ba+"\\")._toggle()\'><span class=\'suggest-plan\'>\\u63a8\\u8350</span><div class=\'suggest-plan-des\'>"+a.Pe().replace(/(\\d+(?:.\\d+)?)/,"$1 ")+"&nbsp;&nbsp;|&nbsp;&nbsp;"+a.Ps().replace(/(\\d+)/,"$1 ")+"</div>";this.ja.moreResultsUrl&&(a+="<a style=\'color:#7777cc;position:absolute;top:5px;right:20px;\' href=\'"+ this.ja.moreResultsUrl+"\' target=\'_blank\'>\\u5230\\u767e\\u5ea6\\u5730\\u56fe\\u67e5\\u770b&#187;</a>");b.innerHTML=f+(a+"&nbsp;<span class=\'navtrans-arrow\'></span></div>")+("<div class=\'navtrans-res\'>"+e.join("")+c+d.join("")+g+"</div>");this.k.ka.Ga.appendChild(b);this.Ra(V.wu,b)}},mA:function(a,b){if(""===b||!b)if(9===a||12===a||1===a||16===a)b=td.xP[a];return b},hS:function(a){var b="",c=a.poi;c&&(b=this.IH(c.ps)||"",b=(this.JH(c.pw)||"")+b+"<b>"+c.pn+"</b>"+(c.pd<(13===a.Ac||4===a.Ac?1E3:50)?"":"\\u7ea6"+ lh(c.pd)+"\\u540e")+(""===b?"":"\\uff0c"));return b},pS:function(a){var b=a.iw;return!a.ic?"":(this.EH(b)||"")+"<b>"+a.ic+"</b>"+(this.FH(b)||"")},lS:function(a,b){var c="\\u6cbf";if(0===a||!b&&1!==a&&16!==a&&9!==a&&12!==a)c="";return c},kS:function(a,b){var c="\\u8fdb\\u5165";if(!b&&(9===a||12===a))c="\\u4e0a";else if(0===a||!b&&1!==a&&16!==a)c="";return c},oS:function(){if(this.Ea&&this.Ea.content&&this.Ea.content.taxi){var a=this.Ea.content.taxi,b={distance:a.dis,remark:a.remark};if(a.detail[0]){var c= a.detail[0];b.day={initialFare:parseFloat(c.startPrice),unitFare:parseFloat(c.kmPrice),totalFare:parseFloat(c.totalPrice)}}a.detail[1]&&(a=a.detail[1],b.night={initialFare:parseFloat(a.startPrice),unitFare:parseFloat(a.kmPrice),totalFare:parseFloat(a.totalPrice)});return b}return p}});ud.jz=" \\u76f4\\u884c \\u53f3\\u524d\\u65b9\\u8f6c\\u5f2f \\u53f3\\u8f6c \\u53f3\\u540e\\u65b9\\u8f6c\\u5f2f \\u8c03\\u5934 \\u5de6\\u540e\\u65b9\\u8f6c\\u5f2f \\u5de6\\u8f6c \\u5de6\\u524d\\u65b9\\u8f6c\\u5f2f \\u9760\\u5de6 \\u76f4\\u884c \\u9760\\u53f3 \\u6b63\\u5317\\u65b9\\u5411 \\u4e1c\\u5317\\u65b9\\u5411 \\u6b63\\u4e1c\\u65b9\\u5411 \\u4e1c\\u5357\\u65b9\\u5411 \\u6b63\\u5357\\u65b9\\u5411 \\u897f\\u5357\\u65b9\\u5411 \\u6b63\\u897f\\u65b9\\u5411 \\u897f\\u5317\\u65b9\\u5411".split(" "); ud.hz=["","\\u4ece\\u8d77\\u70b9\\u51fa\\u53d1","\\u5230\\u8fbe\\u76ee\\u7684\\u5730","\\u9014\\u7ecf\\u70b9","\\u884c\\u9a76"];ud.hq="s-1 s-1 s-2 s-3 s-4 s-5 s-6 s-7 s-8 s-9 s-1 s-10 ".split(" ");ud.az=["\\u5728","\\u4ece","\\u4ece"];ud.bz=["","","\\u79bb\\u5f00"];ud.fz=["\\u8fc7","\\u5728"];ud.ez=["\\u5de6\\u4fa7\\u7684","\\u53f3\\u4fa7\\u7684",""];ud.Wy=["","\\u671d"]; x.extend(ud.prototype,{Wu:function(a){return new gh(a)},gv:function(a){return ud.jz[a]},LH:function(a){return\'<span class="navtrans-navlist-icon \'+(ud.hq[a]?ud.hq[a]:"")+\'"></span>\'},lA:function(a){return ud.hz[a]},EH:function(a){return ud.az[a]},FH:function(a){return ud.bz[a]},JH:function(a){return ud.fz[a]},IH:function(a){return ud.ez[a]},zH:function(a){return ud.Wy[a]}});vd.jz=" \\u76f4\\u8d70 \\u5411\\u53f3\\u524d\\u65b9\\u8f6c \\u53f3\\u8f6c \\u5411\\u53f3\\u540e\\u65b9\\u8f6c \\u5411\\u540e\\u8f6c \\u5411\\u5de6\\u540e\\u65b9\\u8f6c \\u5de6\\u8f6c \\u5411\\u5de6\\u524d\\u65b9\\u8f6c \\u5de6\\u8f6c\\u7a7f\\u8fc7\\u9a6c\\u8def\\u5e76\\u7ee7\\u7eed\\u5411\\u524d \\u53f3\\u8f6c\\u7a7f\\u8fc7\\u9a6c\\u8def\\u5e76\\u7ee7\\u7eed\\u5411\\u524d \\u5de6\\u8f6c\\u7a7f\\u8fc7\\u9a6c\\u8def\\u5e76\\u5f80\\u56de\\u8d70 \\u53f3\\u8f6c\\u7a7f\\u8fc7\\u9a6c\\u8def\\u5e76\\u5f80\\u56de\\u8d70 \\u6b63\\u5317\\u65b9\\u5411 \\u4e1c\\u5317\\u65b9\\u5411 \\u6b63\\u4e1c\\u65b9\\u5411 \\u4e1c\\u5357\\u65b9\\u5411 \\u6b63\\u5357\\u65b9\\u5411 \\u897f\\u5357\\u65b9\\u5411 \\u6b63\\u897f\\u65b9\\u5411 \\u897f\\u5317\\u65b9\\u5411 ".split(" "); vd.hq="s-1 s-1 s-2 s-3 s-4 s-5 s-6 s-7 s-8 s-7 s-3 s-7 s-3 ".split(" ");vd.hz=["","\\u4ece\\u8d77\\u70b9\\u51fa\\u53d1","\\u5230\\u8fbe\\u76ee\\u7684\\u5730","\\u9014\\u7ecf\\u70b9","\\u8d70"];vd.az=["\\u5728","\\u4ece","\\u4ece"];vd.bz=["","","\\u79bb\\u5f00"];vd.fz=["\\u8fc7","\\u5728"];vd.ez=["\\u5de6\\u4fa7\\u7684","\\u53f3\\u4fa7\\u7684",""];vd.Wy=["","\\u671d"]; x.extend(vd.prototype,{Wu:function(a){delete a.url;return new hh(a)},gv:function(a){return vd.jz[a]},LH:function(a){return\'<span class="navtrans-navlist-icon \'+(vd.hq[a]?vd.hq[a]:"")+\'"></span>\'},lA:function(a){return vd.hz[a]},EH:function(a){return vd.az[a]},FH:function(a){return vd.bz[a]},JH:function(a){return vd.fz[a]},IH:function(a){return vd.ez[a]},zH:function(a){return vd.Wy[a]}});x.extend(zd.prototype,{Od:function(a,b,c){this.JL("web",this.FL(a,b,c))},GN:function(a,b,c){this.JL("web",this.FL(a,b,c))},TN:function(a,b){var c=this.uh,d="";a&&a.pM&&a.name?(d=a.pM,d="latlng:"+d.lat+","+d.lng,d+="|name:"+a.name):d=(d=a.pM)?d.lat+","+d.lng:a.name?a.name:"";c[b]=d},FL:function(a,b,c){this.TN(a,"origin");this.TN(b,"destination");var c=this.uh=x.object.extend(this.uh,c),a=[],d="";if("undefined"===typeof c.origin||""===c.origin)c.origin="";var b={destination:q,mode:q},e;for(e in c)d= e+"="+c[e],a.push(d),"undefined"!==typeof b[e]&&(b[e]=o);this.mode=c.mode;b.mode===q&&(this.mode="driving",a.push("mode=driving"),b.mode=o);e=o;for(var f in b)e=e&&b[f];return e?a.join("&"):q},JL:function(a,b,c){b&&(b=eh[a]+b+"&src=baidu|jsapi",Pa(7E3,{mode:this.mode}),"web"===a&&(b+="&output=html"),location.href=b,c&&c())}}); ');