_jsload_('AMap.ToolBar', 'V.IO=V.W.extend({ka:[V.ea],D:function(a){this.CLASS_NAME="AMap.ToolBar";V.a.Za(this.CLASS_NAME,a);this.Hf(a||{});this.h={};this.h.C=V.f.create("div",null,"amap-toolbar");this.h.pm=V.f.create("div",this.h.C,"amap-pancontrol");this.h.left=V.f.create("div",this.h.pm,"amap-pan-left");this.h.top=V.f.create("div",this.h.pm,"amap-pan-top");this.h.right=V.f.create("div",this.h.pm,"amap-pan-right");this.h.bottom=V.f.create("div",this.h.pm,"amap-pan-bottom");this.h.Qc=V.f.create("div",this.h.C,"amap-locate"); this.h.zoom=V.f.create("div",this.h.C,"amap-zoomcontrol");this.h.wj=V.f.create("div",this.h.zoom,"amap-zoom-plus");this.h.xe=V.f.create("div",this.h.zoom,"amap-zoom-ruler");this.h.sj=V.f.create("div",this.h.zoom,"amap-zoom-minus");this.h.Ku=V.f.create("div",this.h.xe,"amap-zoom-mask");this.h.cursor=V.f.create("div",this.h.xe,"amap-zoom-cursor");this.h.labels=V.f.create("div",this.h.xe,"amap-zoom-labels");this.h.street=V.f.create("div",this.h.labels,"amap-zoom-label-street");this.h.city=V.f.create("div", this.h.labels,"amap-zoom-label-city");this.h.lM=V.f.create("div",this.h.labels,"amap-zoom-label-province");this.h.country=V.f.create("div",this.h.labels,"amap-zoom-label-country");(this.Xj=(this.GV=V.j.U)||a&&a.liteStyle)?(this.Z1(),this.position="RB",this.offset=new V.K(10,110)):V.f.na(this.h.pm,{position:"relative"}).na(this.h.Qc,{position:"relative",left:"17px"}).na(this.h.zoom,{position:"relative",left:"14px"});this.fb(a);this.kz&&this.$y()},Hf:function(a){this.d3=a.useNative||!1;this.kh="toolbar"; this.$M=this.Qc=this.direction=this.xe=this.visible=!0;this.position="LT";this.offset=new V.K(10,10);this.kz=!1;this.timeout=a.timeout||5E3;this.q_=V.q.pb+"/theme/v1.3/small_loading.gif";this.rj=new Z({position:this.he,offset:new V.K(-11,-11),content:"
"});this.rj.ga=!0},Dn:function(a,b){this.map=a;b.appendChild(this.h.C);this.ld=b;this.nI(); this.$i();var c=this;setTimeout(function(){c.map&&c.YG()},0)},xo:function(){this.dj();this.ld.removeChild(this.h.C);this.map=this.ld=null;this.Zy()},Z1:function(){var a=V.f.create("div",this.h.wj);a.innerHTML="+";V.f.Ab(this.h.wj,"amap-zoom-plus");V.f.tb(this.h.wj,"amap-zoom-touch-plus");V.f.Ab(this.h.Qc,"amap-locate");V.f.tb(this.h.Qc,"amap-geo amap-toolbar-geo");a=V.f.create("div",this.h.sj);a.innerHTML="−";V.f.Ab(this.h.sj,"amap-zoom-minus");V.f.tb(this.h.sj,"amap-zoom-touch-minus"); V.f.tb(this.h.C,"amap-touch-toolbar")},a2:function(a){a.direction=!1;!0!==a.locate&&(a.locate=!1);a.ruler=!1;return a},fb:function(a){a=a||{};this.Xj&&(a=this.a2(a));for(var b in a)a.hasOwnProperty(b)&&"_"!==b.substr(0,1)&&void 0!==this[b]&&(this[b]=a[b]);this.offset=void 0!==a.offset?a.offset:this.offset;this.position=void 0!==a.position?a.position:this.position;this.xe=void 0!==a.ruler?a.ruler:this.xe;this.Qc=void 0!==a.locate?a.locate:this.Qc;this.direction=void 0!==a.direction?a.direction:this.direction; this.kz=void 0!==a.autoPosition?a.autoPosition:this.kz;void 0!==a.locationMarker&&(this.rj.getMap===this.map&&(this.rj.setMap(null),a.locationMarker.setPosition(this.rj.getPosition()),a.locationMarker.setMap(this.map)),this.rj=a.locationMarker);this.FS();this.position&&this.offset&&this.Yp(this.position,this.offset);this.direction?V.f.na(this.h.pm,{display:"block"}):V.f.na(this.h.pm,{display:"none"});this.Qc?V.f.na(this.h.Qc,{display:"block"}):V.f.na(this.h.Qc,{display:"none"});!this.xe||this.map&& 270>this.map.getSize().getHeight()?V.f.na(this.h.xe,{display:"none"}):V.f.na(this.h.xe,{display:"block"});this.visible?V.f.na(this.h.C,{visibility:"visible"}):V.f.na(this.h.C,{visibility:"hidden"})},uA:function(a){return this[a]},Yp:function(a,b){switch(a){case "LT":V.f.na(this.h.C,{left:b.cd()+"px",top:b.Fc()+"px",right:"",bottom:""});break;case "RT":V.f.na(this.h.C,{right:b.cd()+"px",top:b.Fc()+"px",left:"",bottom:""});break;case "LB":V.f.na(this.h.C,{left:b.cd()+"px",bottom:b.Fc()+"px",right:"", top:""});break;case "RB":V.f.na(this.h.C,{right:b.cd()+"px",bottom:b.Fc()+"px",left:"",top:""})}this.ld&&(this.ld.removeChild(this.h.C),this.ld.appendChild(this.h.C))},YG:function(){this.Zc=null;this.nI();this.Oy(this.map.get("zoom"))},$i:function(){this.Oy(this.map.get("zoom"));this.zb={Zc:V.event.addListener(this.map,"zooms",this.YG,this),left:V.event.V(this.h.left,"click",this.vT,this),top:V.event.V(this.h.top,"click",this.LT,this),right:V.event.V(this.h.right,"click",this.ET,this),bottom:V.event.V(this.h.bottom, "click",this.bT,this),Qc:V.event.V(this.h.Qc,"click",this.yT,this),X6:V.event.V(this.h.C,"mousedown",function(a){V.B.preventDefault(a)},this),t5:V.event.V(this.h.cursor,"mousedown",this.sl,this),n5:V.event.V(this.h.cursor,"mouseover",this.mT,this),m5:V.event.V(this.h.cursor,"mouseout",this.nT,this),r5:V.event.V(document,"mousemove",this.ql,this),s5:V.event.V(document,"mouseup",this.rl,this),cursor:V.event.V(this.h.cursor,"click",this.lT,this),wj:V.event.V(this.h.wj,"click",this.BT,this),sj:V.event.V(this.h.sj, "click",this.zT,this),q7:V.event.V(this.h.xe,"mouseover",this.RG,this),j8:V.event.V(this.h.zoom,"mouseout",this.QG,this),r6:V.event.V(this.h.labels,"mouseover",this.RG,this),q6:V.event.V(this.h.labels,"mouseout",this.QG,this),xe:V.event.V(this.h.xe,"click",this.IT,this),street:V.event.V(this.h.street,"click",this.KT,this),city:V.event.V(this.h.city,"click",this.fT,this),lM:V.event.V(this.h.lM,"click",this.CT,this),country:V.event.V(this.h.country,"click",this.kT,this),QN:V.event.addListener(this.map, "zoomend",this.Pj,this),N7:V.event.V(this.h.C,"touchstart",V.g.BJ,V.B.stopPropagation),resize:V.event.addListener(this.map,"resize",this.DT,this)};V.j.Mg&&(this.zb.t6=V.event.V(this.h.left,"mouseover",this.xT,this),this.zb.L7=V.event.V(this.h.top,"mouseover",this.NT,this),this.zb.n7=V.event.V(this.h.right,"mouseover",this.GT,this),this.zb.T4=V.event.V(this.h.bottom,"mouseover",this.dT,this),this.zb.s6=V.event.V(this.h.left,"mouseout",this.wT,this),this.zb.K7=V.event.V(this.h.top,"mouseout",this.MT, this),this.zb.m7=V.event.V(this.h.right,"mouseout",this.FT,this),this.zb.S4=V.event.V(this.h.bottom,"mouseout",this.cT,this))},mT:function(){this.h.cursor.style.top=parseInt(this.h.cursor.style.top)-2+"px"},nT:function(){this.h.cursor.style.top=parseInt(this.h.cursor.style.top)+2+"px"},dj:function(){if(this.zb)for(var a in this.zb)this.zb.hasOwnProperty(a)&&V.event.removeListener(this.zb[a])},vT:function(){this.map.panBy(this.map.getSize().width/2-1,0)},bT:function(){this.map.panBy(0,-this.map.getSize().height/ 2+1)},ET:function(){this.map.panBy(-this.map.getSize().width/2+1,0)},xT:function(){this.h.left.className+=" amap-pan-left-hover"},GT:function(){this.h.right.className+=" amap-pan-right-hover"},NT:function(){this.h.top.className+=" amap-pan-top-hover"},dT:function(){this.h.bottom.className+=" amap-pan-bottom-hover"},wT:function(){this.h.left.className=this.h.left.className.replace(" amap-pan-left-hover","")},FT:function(){this.h.right.className=this.h.right.className.replace(" amap-pan-right-hover", "")},MT:function(){this.h.top.className=this.h.top.className.replace(" amap-pan-top-hover","")},cT:function(){this.h.bottom.className=this.h.bottom.className.replace(" amap-pan-bottom-hover","")},LT:function(){this.map.panBy(0,this.map.getSize().height/2-1)},FS:function(){navigator.geolocation||(this.Qc=!1)},nI:function(){this.Zc||(this.Zc=this.map?this.map.get("zooms"):[3,18]);this.$M=5