_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=5this.Zc[1]?!1:!0},yT:function(){this.he?this.Zy():this.$y()},F4:function(a,b){var c=V.q.ec+"/v3/assistant/coordinate/convert?coordsys=gps&s=rsv3&output=json", c=c+"&locations="+a.toString()+"&key="+V.q.key,c=new V.ra.Ca(c,{callback:"callback"});c.e("complete",b,this);c.e("error",b,this)},$y:function(){if(navigator.geolocation){this.Xj||(this.h.Jc||(this.h.Jc=V.f.create("img",this.h.Qc),this.h.Jc.src=this.q_,V.f.na(this.h.Jc,{margin:(this.Xj?10:4)+"px"})),this.h.Qc.appendChild(this.h.Jc));V.f.tb(this.h.Qc,"amap-locate-loading");var a=this;V.Ra.load("AMap.Geolocation",function(){a.geolocation||(a.geolocation=new V.mD({useNative:this.d3,showButton:!1,showMarker:!1, showCircle:!1,panToLocation:!1,maximumAge:6E5}));a.geolocation.getCurrentPosition(function(b,c){V.f.Ab(a.h.Qc,"amap-locate-loading");"complete"===b?(a.GS(c),V.event.I(a,"location-success",c)):(a.ES(),V.event.I(a,"location-failed",c))})})}},Zy:function(){this.Xj?V.f.Ab(this.h.Qc,"amap-toolbar-geo-secc"):V.f.na(this.h.Qc,{backgroundPosition:"-130px -185px"});this.OR();this.he=null},wV:function(){var a=this;if(this.he)if(this.Oa=this.rj,this.Oa.setMap(this.map),this.rj instanceof Z&&this.rj.setPosition(this.he), this.hp&&(this.qa=new Ac({isCustom:!0,content:"\\u5b9a\\u4f4d\\u7cbe\\u5ea6:"+this.hp+"\\u7c73",offset:new V.K(25,0)}),this.Oa.e("mouseover",function(){a.qa.open(a.map,a.Oa.getPosition())}),this.Oa.e("mouseout",function(){a.qa.close()})),this.hp){this.Ja=new Cc({center:this.he,radius:this.hp,strokeColor:"#0093FF",strokeOpacity:0.3,strokeWeight:1,fillColor:"#02B0FF",fillOpacity:0.25}); this.Ja.ga=!0;this.Ja.setMap(this.map);var b=this.map.getSize(),b=Math.min(b.width,b.height)/4,b=Math.floor(Math.LOG2E*Math.log(b*Math.cos(this.he.getLat()*Math.PI/180)*12756274*Math.PI/256/this.hp));this.map.setZoomAndCenter(b,this.he)}else this.map.setCenter(this.he);V.event.I(this,"location",{type:"location",lnglat:this.he})},OR:function(){this.Oa&&(this.Oa.setMap(null),this.Oa=null);this.Ja&&(this.Ja.setMap(null),this.Ja=null);this.rj.setMap(null)},vV:function(){this.$M&&this.h.labels&&V.f.na(this.h.labels, {display:"block"})},NR:function(){this.h.labels&&V.f.na(this.h.labels,{display:"none"})},Wo:function(a,b){var c=b-a;c&&V.event.I(this,"zoomchanged",{type:0===c?void 0:0c[1]&&(a=c[1]);ab-10&&(a=b-10);V.f.na(this.h.cursor,{top:a+"px"}).na(this.h.Ku,{height:a+"px"});a=this.map.get("zoom");b=this.xF();this.map.setZoom(b);this.Wo(a,b)}},KT:function(a){this.map&&this.map.getStatus().zoomEnable&&(V.B.stopPropagation(a).preventDefault(a),this.map.setZoom(17),a=this.map.get("zoom"),this.Wo(a,17))},fT:function(a){this.map&&this.map.getStatus().zoomEnable&&(V.B.stopPropagation(a).preventDefault(a),this.map.setZoom(11),a=this.map.get("zoom"),this.Wo(a,11))},CT:function(a){this.map&& this.map.getStatus().zoomEnable&&(V.B.stopPropagation(a).preventDefault(a),this.map.setZoom(7),a=this.map.get("zoom"),this.Wo(a,7))},kT:function(a){this.map&&this.map.getStatus().zoomEnable&&(V.B.stopPropagation(a).preventDefault(a),this.map.setZoom(3),a=this.map.get("zoom"),this.Wo(a,3))},DT:function(){this.fb({locate:this.Qc})},GS:function(a){try{this.he=a.position,this.hp=a.accuracy,this.h.Jc&&this.h.Jc.parentNode&&this.h.Jc.parentNode.removeChild(this.h.Jc),this.Xj?V.f.tb(this.h.Qc,"amap-toolbar-geo-secc"): V.f.na(this.h.Qc,{backgroundPosition:"-130px -211px"}),this.wV({locations:this.he+""})}catch(b){}},ES:function(){this.he=null;try{this.h.Qc.removeChild(this.h.Jc),this.Xj||V.f.na(this.h.Qc,{backgroundPosition:"-130px -185px"})}catch(a){}},getOffset:function(){V.a.add(this.CLASS_NAME,"getOffset");return this.offset},setOffset:function(a){V.a.add(this.CLASS_NAME,"setOffset");this.fb({offset:a})},hideRuler:function(){V.a.add(this.CLASS_NAME,"hideRuler");this.fb({ruler:!1})},showRuler:function(){V.a.add(this.CLASS_NAME, "showRuler");this.fb({ruler:!0})},hideDirection:function(){V.a.add(this.CLASS_NAME,"hideDirection");this.fb({direction:!1})},showDirection:function(){V.a.add(this.CLASS_NAME,"showDirection");this.fb({direction:!0})},hideLocation:function(){V.a.add(this.CLASS_NAME,"hideLocation");this.fb({locate:!1})},showLocation:function(){V.a.add(this.CLASS_NAME,"showLocation");this.fb({locate:!0})},hide:function(){V.a.add(this.CLASS_NAME,"hide");this.fb({visible:!1});V.event.I(this,"hide")},show:function(){V.a.add(this.CLASS_NAME, "show");this.fb({visible:!0});V.event.I(this,"show")},doLocation:function(){V.a.add(this.CLASS_NAME,"doLocation");this.he&&this.Zy();this.$y()},getLocation:function(){V.a.add(this.CLASS_NAME,"getLocation");return this.he},Wn:function(){var a=[0,0,0,0];if(this.h.C){var b=V.f.Ic(this.h.C,"width"),c=V.f.Ic(this.h.C,"height"),b=this.offset.cd()+parseFloat(b),c=this.offset.Fc()+parseFloat(c)+5;-1!==this.position.indexOf("T")&&(a[0]=c);-1!==this.position.indexOf("R")&&(a[1]=b);-1!==this.position.indexOf("B")&& (a[2]=c);-1!==this.position.indexOf("L")&&(a[3]=b)}return a}});window.AMap.ToolBar||(window.AMap.ToolBar=V.IO); ')