window.TMAP_AUTHKEY="b5311fc44ebe2d76a7738ae3b351fe28";window.T=window.T||{};(function(){ function each(t,i){for(var n in t)t.hasOwnProperty(n)&&i(t[n],n,t)}function find(t,i){if(t.length){for(var n=0;n1}}(),T.Point=function(t,i,n){this.x=n?Math.round(t):t,this.y=n?Math.round(i):i},T.Point.prototype={pQ:function(){return new T.Point(this.x,this.y)},AQ:function(t){return this.pQ().aQ(T.SQ(t))},aQ:function(t){return this.x+=t.x,this.y+=t.y,this},sQ:function(t){return this.pQ().DQ(T.SQ(t))},DQ:function(t){return this.x-=t.x,this.y-=t.y,this},dQ:function(t){return this.pQ().FQ(t)},FQ:function(t){return this.x/=t,this.y/=t,this},fQ:function(t){return this.pQ().GQ(t)},GQ:function(t){return this.x*=t,this.y*=t,this},gQ:function(t){return new T.Point(this.x*t.x,this.y*t.y)},HQ:function(t){return new T.Point(this.x/t.x,this.y/t.y)},hQ:function(){return this.pQ().JQ()},JQ:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},jQ:function(){return this.pQ().KQ()},KQ:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},kQ:function(){return this.pQ().LQ()},LQ:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},distanceTo:function(t){t=T.SQ(t);var i=t.x-this.x,n=t.y-this.y;return Math.sqrt(i*i+n*n)},equals:function(t){return t=T.SQ(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=T.SQ(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},lQ:function(){return"Point("+T.S.h(this.x)+", "+T.S.h(this.y)+")"}},T.SQ=function(t,i,n){return t instanceof T.Point?t:T.S.l(t)?new T.Point(t[0],t[1]):void 0===t||null===t?t:"object"==typeof t&&"x"in t&&"y"in t?new T.Point(t.x,t.y):new T.Point(t,i,n)},T.ZQ=function(t,i){if(t)for(var n=i?[t,i]:t,e=0,o=n.length;e=this.min.x&&n.x<=this.max.x&&i.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=T.cQ(t);var i=this.min,n=this.max,e=t.min,o=t.max,s=o.x>=i.x&&e.x<=n.x,r=o.y>=i.y&&e.y<=n.y;return s&&r},BQ:function(t){t=T.cQ(t);var i=this.min,n=this.max,e=t.min,o=t.max,s=o.x>i.x&&e.xi.y&&e.y0&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(n)},Rq:function(t,i){if(void 0!==t.classList)for(var n=T.S.j(i),e=0,o=n.length;e=e.lat&&n.lat<=o.lat&&i.lng>=e.lng&&n.lng<=o.lng},intersects:function(t){t=T.jq(t);var i=this.kq,n=this.Lq,e=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=i.lat&&e.lat<=n.lat,r=o.lng>=i.lng&&e.lng<=n.lng;return s&&r},BQ:function(t){t=T.jq(t);var i=this.kq,n=this.Lq,e=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>i.lat&&e.lati.lng&&e.lngthis.options.maxZoom?this.setZoom(t):(this.wQ("maxzoom",{minZoom:this.options.minZoom,maxZoom:this.options.maxZoom}),this)},Ew:function(t,i){this.ew=!0;var n=this.getCenter(),e=this.Rw(n,this.fW,T.jq(t));return n.equals(e)||this.panTo(e,i),this.ew=!1,this},rw:function(t){if(!this.CW)return this;t=T.extend({Tw:!1,qw:!0},t===!0?{Tw:!0}:t);var i=this.getSize();this.kW=!0,this.tw=null;var n=this.getSize(),e=i.dQ(2).hQ(),o=n.dQ(2).hQ(),s=e.sQ(o);return s.x||s.y?(t.Tw&&t.qw?this.panBy(s):(t.qw&&this.Ww(s),this.wQ("move"),t.Yw?(clearTimeout(this.Uw),this.Uw=setTimeout(T.D(this.wQ,this,"moveend"),200)):this.wQ("moveend")),this.wQ("resize",{oldSize:i,newSize:n})):this},checkResize:function(){this.rw()},uw:function(){return this.setZoom(this.GW(this.fW)),this.options.AW||this.wQ("viewreset"),this.Iw()},iw:function(t,i){if(!i)return this;var n=this[t]=new i(this);return this.HW.push(n),this.options[t]&&n.enable(),this},Qq:function(){this.FW(!0);try{delete this.Ow._tdt}catch(AO){this.Ow._tdt=void 0}T._Q.Qq(this.ow),this.Pw&&this.Pw(),this.pw(),this.CW&&this.wQ("unload");for(var t in this.hW)this.hW[t].Qq();return this},Aw:function(t,i){var n="tdt-pane"+(t?" tdt-"+t.replace("Pane","")+"-pane":""),e=T._Q.s("div",n,i||this.ow);return t&&(this.aw[t]=e),e},getCenter:function(){return this.Sw(),this.tw&&!this.sw()?this.tw:this.Dw(this.dw())},getZoom:function(){return this.fW},getBounds:function(){var t=this.Fw(),i=this._q(t.CQ()),n=this._q(t.VQ());return new T.Kq(i,n)},getMinZoom:function(){return void 0===this.options.minZoom?this.fw||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this.Gw?1/0:this.Gw:this.options.maxZoom},nW:function(t,i,n){t=T.jq(t),n=T.SQ(n||[0,0]);var e=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.Zq(),h=t.cq(),a=this.getSize().sQ(n),u=this.nq(h,e).sQ(this.nq(r,e)),c=T.oQ.any3d?this.options.AW:1,l=Math.min(a.x/u.x,a.y/u.y);return e=this.gw(l,e),c&&(e=Math.round(e/(c/100))*(c/100),e=i?Math.ceil(e/c)*c:Math.floor(e/c)*c),Math.max(o,Math.min(s,e))},getSize:function(){return this.Hw&&!this.kW||(this.Hw=new T.Point(this.Ow.clientWidth,this.Ow.clientHeight),this.kW=!1),this.Hw.pQ()},Fw:function(t,i){var n=this.hw(t,i);return new T.ZQ(n,n.AQ(this.getSize()))},Jw:function(){return this.Sw(),this.jw},Kw:function(t){return this.options.IW.eW(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this.aw[t]:t},getPanes:function(){return this.aw},getContainer:function(){return this.Ow},cW:function(t,i){var n=this.options.IW;return i=void 0===i?this.fW:i,n.scale(t)/n.scale(i)},gw:function(t,i){var n=this.options.IW;return i=void 0===i?this.fW:i,n.zoom(t*n.scale(i+T.gq.EW))},setCrs:function(t){if(t==this.getCode())return!1;var i=this.getCenter();"EPSG:900913"==t?(this.options.IW=T.gq.UW,this.SW=t,T.gq.EW=0):(this.options.IW=T.gq.uW,this.SW=t,T.gq.EW=1),this.setMapType(this.getMapType()),this.ZW(i,this.getZoom())},switchingMaps:function(t){this.setCrs(t)},nq:function(t,i){return i=void 0===i?this.fW:i,this.options.IW.qW(T.fq(t),i)},_q:function(t,i){return i=void 0===i?this.fW:i,this.options.IW.wW(T.SQ(t),i)},Dw:function(t){var i=T.SQ(t).AQ(this.Jw());return this._q(i)},kw:function(t){var i=this.nq(T.fq(t)).JQ();return i.DQ(this.Jw())},layerPointToLngLat:function(t){return this.Dw(t)},lngLatToLayerPoint:function(t){return this.kw(t)},hq:function(t){return this.options.IW.hq(T.fq(t))},distance:function(t,i){return this.options.IW.distance(T.fq(t),T.fq(i))},getDistance:function(t,i){return this.distance(t,i)},Lw:function(t){return T.SQ(t).sQ(this.lw())},Zw:function(t){return T.SQ(t).AQ(this.lw())},vW:function(t){var i=this.Lw(T.SQ(t));return this.Dw(i)},BW:function(t){return this.Zw(this.kw(T.fq(t)))},containerPointToLngLat:function(t){return this.vW(t)},lngLatToContainerPoint:function(t){return this.BW(t)},Cw:function(t){return T.oq.Vw(t,this.Ow)},cw:function(t){return this.Lw(this.Cw(t))},Bw:function(t){return this.Dw(this.cw(t))},sW:function(t){var i=this.Ow=T._Q.mQ(t);i&&i._tdt,T.oq.addListener(i,"scroll",this.vw,this),i._tdt=!0},DW:function(){var t=this.Ow;this.Nw=this.options.OW&&T.oQ.any3d,T._Q.Rq(t,"tdt-container"+(T.oQ.touch?" tdt-touch":"")+(T.oQ.retina?" tdt-retina":"")+(T.oQ.ielt9?" tdt-oldie":"")+(T.oQ.safari?" tdt-safari":"")+(this.Nw?" tdt-fade-anim":""));var i=T._Q.getStyle(t,"position");"absolute"!==i&&"relative"!==i&&"fixed"!==i&&(t.style.position="relative"),this.bw(),this.Mw&&this.Mw()},bw:function(){var t=this.aw={};this.nw={},this.ow=this.Aw("mapPane",this.Ow),T._Q.setPosition(this.ow,new T.Point(0,0)),this.Aw("tilePane"),this.Aw("_w"),this.Aw("overlayPane"),this.Aw("markerPane"),this.Aw("infoWindowPane"),this.options.PW||(T._Q.Rq(t.markerPane,"tdt-zoom-hide"),T._Q.Rq(t._w,"tdt-zoom-hide"))},ZW:function(t,i){T._Q.setPosition(this.ow,new T.Point(0,0));var n=!this.CW;this.CW=!0,i=this.GW(i),this.wQ("viewprereset");var e=this.fW!==i;this.qE(e).QE(t,i).mw(e),this.wQ("viewreset"),n&&this.wQ("load")},qE:function(t){return t&&this.wQ("zoomstart"),this.wQ("movestart")},QE:function(t,i,n){void 0===i&&(i=this.fW);var e=this.fW!==i;return this.fW=i,this.tw=t,this.jw=this.WE(t),(e||n&&n.pinch)&&this.wQ("zoom",n),this.wQ("move",n)},mw:function(t){return t&&this.wQ("zoomend"),this.wQ("moveend")},Iw:function(){return T.S.V(this.wE),this.EE&&this.EE.uw(),this},Ww:function(t){T._Q.setPosition(this.ow,this.lw().sQ(t))},eE:function(){return this.getMaxZoom()-this.getMinZoom()},ww:function(){this.ew||this.Ew(this.options.maxBounds)},Sw:function(){!this.CW},FW:function(t){if(T.oq){this.RE={},this.RE[T.d(this.Ow)]=this;var i=t?"off":"on";T.oq[i](this.Ow,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress",this.rE,this),this.options.oW&&T.oq[i](window,"resize",this.dW,this),T.oQ.any3d&&this.options.pW&&this[i]("moveend",this.TE)}},dW:function(){T.S.V(this.tE),this.tE=T.S.C(function(){this.rw({Yw:!0})},this)},vw:function(){this.Ow.scrollTop=0,this.Ow.scrollLeft=0},TE:function(){var t=this.lw();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.pW&&this.ZW(this.getCenter(),this.getZoom())},YE:function(t,i){for(var n,e=[],o="mouseout"===i||"mouseover"===i,s=t.target||t.srcElement,r=!1;s;){if(n=this.RE[T.d(s)],n&&("click"===i||"UE"===i)&&!t.uE&&this.IE(n)){r=!0;break}if(n&&n.EQ(i,!0)){if(o&&!T.oq.iE(s,t))break;if(e.push(n),o)break}if(s===this.Ow)break;s=s.parentNode}return e.length||r||o||!T.oq.iE(s,t)||(e=[this]),e},rE:function(t){if(this.CW&&!T.oq.OE(t)){var i="keypress"===t.type&&13===t.keyCode?"click":t.type;"mousedown"===i&&T._Q.Sq(t.target||t.srcElement),this.oE(t,i)}},oE:function(t,i,n){if("click"===t.type){var e=T.S.extend({},t);e.type="UE",this.oE(e,e.type,n)}if(!t._stopped&&(n=(n||[]).concat(this.YE(t,i)),n.length)){var o=n[0];"contextmenu"===i&&o.EQ(i,!0)&&T.oq.preventDefault(t);var s={originalEvent:t};if("keypress"!==t.type){var r=o instanceof T.Marker;s.containerPoint=r?this.BW(o.PE()):this.Cw(t),s.layerPoint=this.Lw(s.containerPoint),s.lnglat=r?o.PE():this.Dw(s.layerPoint)}for(var h=0;h0?Math.round(t-i)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(i))},GW:function(t){var i=this.getMinZoom(),n=this.getMaxZoom(),e=T.oQ.any3d?this.options.AW:1;return e&&(t=Math.round(t/e)*e),Math.max(i,Math.min(n,t))},enableAutoResize:function(){this.options.oW=!0,T.oq.on(window,"resize",this.dW,this)},disableAutoResize:function(){this.options.oW=!1,T.oq.off(window,"resize",this.dW,this)},getOverlays:function(){var t=[];for(var i in this.hW)"undefined"!=typeof this.hW[i].options.type&&t.push(this.hW[i]);return t},setStyle:function(t){t=t||"black","black"==t?this.Ow.style.backgroundColor="#000000":this.Ow.style.backgroundColor="#466399",this.defaultMapType.getLayers()[0].on("tileload",function(t){T._Q.Rq(t.tile,"tdtTileImage")}),this.defaultMapType.getLayers()[1].on("tileload",function(t){T._Q.Rq(t.tile,"tdtTileImage")}),this.ZW(this.getCenter(),this.getZoom())},removeStyle:function(){this.Ow.style.backgroundColor="",this.defaultMapType.getLayers()[0].off("tileload"),this.defaultMapType.getLayers()[1].off("tileload"),this.ZW(this.getCenter(),this.getZoom())}}),T.gE=function(t,i){return new T.Map(t,i)},T.HE=T.m.extend({options:{hE:"overlayPane",pE:[]},addTo:function(t){return t.addLayer(this),this},Qq:function(){return this.JE(this.jE||this.KE)},JE:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this.jE.getPane(t?this.options[t]||t:this.options.hE)},kE:function(t){return this.jE.RE[T.d(t)]=this,this},LE:function(t){return delete this.jE.RE[T.d(t)],this},lE:function(t){var i=t.target;if(i.hasLayer(this)){if(this.jE=i,this.ZE=i.ZE,this.CE){var n=this.CE();i.on(n,this),this.rQ("remove",function(){i.off(n,this)},this)}this.onAdd(i),this.VE&&this.jE.cE&&this.jE.cE.BE(this.VE()),this.wQ("AQ"),i.wQ("layeradd",{layer:this})}}}),T.Map.M({addLayer:function(t){var i=T.d(t);return this.hW[i]?this:(this.hW[i]=t,"undefined"!=typeof this.hW[i].options.type&&this.JW.push(this.hW[i]),t.KE=this,t.vE&&t.vE(this),this.sE(t.lE,t),this)},removeLayer:function(t){var i=T.d(t);return this.hW[i]?(this.CW&&t.onRemove(this),t.VE&&this.cE&&this.cE.NE(t.VE()),delete this.hW[i],this.CW&&(this.wQ("layerremove",{layer:t}),t.wQ("remove")),t.jE=t.KE=null,this):this},getLayers:function(){var t=[];for(layer in this.hW)"function"==typeof this.hW[layer].getTileUrl&&"tilePane"==this.hW[layer].options.hE&&t.push(this.hW[layer]);return t},clearLayers:function(){for(var t=0;t=0;t--)this.jW.splice(t,1);return this},addOverLay:function(t){this.addLayer(t),this.wQ("addoverlay",{addoverlay:t})},removeOverLay:function(t){this.removeLayer(t),this.wQ("removeoverlay",{removeoverlay:t})},clearOverLays:function(){for(var t=0;t1e-7;a++)i=s*Math.sin(h),i=Math.pow((1-i)/(1+i),s/2),u=Math.PI/2-2*Math.atan(r*i)-h,h+=u;return new T.dq(h*n,t.x*n/e)}},T.gq.ee=T.extend({},T.gq.Gq,{code:"Re",projection:T.bq.we,WW:function(){var t=.5/(Math.PI*T.bq.we.R);return new T.NQ(t,.5,-t,.5)}()}),T.re=T.HE.extend({options:{hE:"tilePane",Te:256,opacity:1,zIndex:1,te:T.oQ.mobile,updateWhenZooming:!0,Ye:200,Ue:null,bounds:null,minZoom:0,maxZoom:void 0,ue:!1,className:"",keepBuffer:2},initialize:function(t){t=T.setOptions(this,t)},onAdd:function(){this.sW(),this.Ie={},this.ie={},this.ZW(),this.Oe()},vE:function(t){t.ME(this)},onRemove:function(t){this.oe(),T._Q.Qq(this.Ow),t._E(this),this.Ow=null,this.Pe=null},pe:function(){return this.jE&&(T._Q.Wq(this.Ow),this.Ae(Math.max)),this},ae:function(){return this.jE&&(T._Q.wq(this.Ow),this.Ae(Math.min)),this},VE:function(){return this.options.Ue},getContainer:function(){return this.Ow},setOpacity:function(t){return this.options.opacity=t,this.Se(),this},setZIndex:function(t){return this.options.zIndex=t,this.se(),this},De:function(){return this.de},redraw:function(){return this.jE&&(this.oe(),this.Oe()),this},refresh:function(){this.redraw()},CE:function(){var t={viewprereset:this.Fe,viewreset:this.ZW,zoom:this.ZW,moveend:this.TE};return this.options.te||(this.fe||(this.fe=T.S.G(this.TE,this.options.Ye,this)),t.move=this.fe),this.ZE&&(t.Ge=this.ge),t},He:function(){return document.createElement("div")},he:function(){var t=this.options.Te;return t instanceof T.Point?t:new T.Point(t,t)},se:function(){this.Ow&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this.Ow.style.zIndex=this.options.zIndex)},Ae:function(t){for(var i,n=this.getPane().children,e=-t(-(1/0),1/0),o=0,s=n.length;othis.options.maxZoom||ne&&this.Ve(o,s,r,e))},ce:function(t,i,n,e){for(var o=2*t;o<2*t+2;o++)for(var s=2*i;s<2*i+2;s++){var r=new T.Point(o,s);r.z=n+1;var h=this.ve(r),a=this.ie[h];a&&a.active?a.retain=!0:(a&&a.loaded&&(a.retain=!0),n+1this.options.maxZoom||void 0!==this.options.minZoom&&o1)return void this.be(t,n);for(var l=o.min.y;l<=o.max.y;l++)for(var f=o.min.x;f<=o.max.x;f++){var d=new T.Point(f,l);if(d.z=this.Pe,this.rR(d)){var p=this.ie[this.ve(d)];p?p.Je=!0:r.push(d)}}if(r.sort(function(t,i){return t.distanceTo(s)-i.distanceTo(s)}),0!==r.length){this.de||(this.de=!0,this.wQ("loading"));var m=document.createDocumentFragment();for(f=0;fn.max.x)||!i.wrapLat&&(t.yn.max.y))return!1}if(!this.options.bounds)return!0;var e=this.tR(t);return T.jq(this.options.bounds).BQ(e)},YR:function(t){return this.tR(this.UR(t))},tR:function(t){var i=this.jE,n=this.he(),e=t.gQ(n),o=e.AQ(n),s=i.hq(i._q(e,t.z)),r=i.hq(i._q(o,t.z));return new T.Kq(s,r)},ve:function(t){return t.x+":"+t.y+":"+t.z},UR:function(t){var i=t.split(":"),n=new T.Point(+i[0],+i[1]);return n.z=+i[2],n},Be:function(t){var i=this.ie[t];i&&(T._Q.Qq(i.el),delete this.ie[t],this.wQ("tileunload",{tile:i.el,coords:this.UR(t)}))},uR:function(t){T._Q.Rq(t,"tdt-tile");var i=this.he();t.style.width=i.x+"px",t.style.height=i.y+"px",t.onselectstart=T.S.H,t.onmousemove=T.S.H,T.oQ.ielt9&&this.options.opacity<1&&T._Q.setOpacity(t,this.options.opacity),T.oQ.android&&!T.oQ.android23&&(t.style.WebkitBackfaceVisibility="hidden")},TR:function(t,i){var n=this.IR(t),e=this.ve(t),o=this.He(this.iR(t),T.D(this.OR,this,t));this.uR(o),this.He.length<2&&T.S.C(T.D(this.OR,this,t,null,o)),T._Q.setPosition(o,n),this.ie[e]={el:o,coords:t,Je:!0},i.appendChild(o),this.wQ("tileloadstart",{tile:o,coords:t})},OR:function(t,i,n){if(this.jE){i&&this.wQ("tileerror",{error:i,tile:n,coords:t});var e=this.ve(t);n=this.ie[e],n&&(n.loaded=+new Date,this.jE.Nw?(T._Q.setOpacity(n.el,0),T.S.V(this.ke),this.ke=T.S.C(this.Se,this)):(n.active=!0,this.Ke()),T._Q.Rq(n.el,"tdt-tile-loaded"),this.wQ("tileload",{tile:n.el,coords:t}),this.oR()&&(this.de=!1,this.wQ("load"),T.oQ.ielt9||!this.jE.Nw?T.S.C(this.Ke,this):setTimeout(T.D(this.Ke,this),250)))}},IR:function(t){return t.gQ(this.he()).sQ(this.Ce.origin)},iR:function(t){var i=new T.Point(this.WR?T.S.g(t.x,this.WR):t.x,this.wR?T.S.g(t.y,this.wR):t.y);return i.z=t.z,i},qR:function(t){var i=this.he();return new T.ZQ(t.min.HQ(i).jQ(),t.max.HQ(i).kQ().sQ([1,1]))},oR:function(){for(var t in this.ie)if(!this.ie[t].loaded)return!1;return!0}}),T.PR=function(t){return new T.re(t)},T.TileLayer=T.re.extend({options:{minZoom:0,maxZoom:18,pR:"abc",errorTileUrl:"",AR:0,aR:null,SR:!1,sR:!1,DR:!1,dR:!1},initialize:function(t,i){this.FR="",t&&(this.FR=t),i=T.setOptions(this,i),i.DR&&T.oQ.retina&&i.maxZoom>0&&(i.Te=Math.floor(i.Te/2),i.sR?(i.AR--,i.minZoom++):(i.AR++,i.maxZoom--),i.minZoom=Math.max(0,i.minZoom)),"string"==typeof i.pR&&(i.pR=i.pR.split("")),T.oQ.android||this.on("tileunload",this.fR)},setUrl:function(t,i){return this.FR=t,i||this.redraw(),this},He:function(t,i){var n=document.createElement("img");return T.oq.on(n,"load",T.D(this.GR,this,i,n)),T.oq.on(n,"error",T.D(this.gR,this,i,n)),this.options.dR&&(n.dR=""),n.Fq="",n.src=this.getTileUrl(t),n},getTileUrl:function(t){var i={r:T.oQ.retina?"@2x":"",s:this.HR(t),x:t.x,y:t.y,z:this.hR()};if(this.jE&&!this.jE.options.IW.RW){var n=this.QR.max.y-t.y;this.options.SR&&(i.y=n),i["-y"]=n}return this._url_temp=this.FR,T.S.k(this._url_temp,T.extend(i,this.options))},GR:function(t,i){T.oQ.ielt9?setTimeout(T.D(t,this,null,i),0):t(null,i)},gR:function(t,i,n){var e=this.options.errorTileUrl;e&&(i.src=e),t(n,i)},he:function(){var t=this.jE,i=T.re.prototype.he.call(this),n=this.Pe+this.options.AR,e=this.options.aR;return null!==e&&n>e?i.dQ(t.cW(e,n)).hQ():i},fR:function(t){t.tile.onload=null},hR:function(){var t=this.options,i=this.Pe;return t.sR&&(i=t.maxZoom-i),i+=t.AR,null!==t.aR?Math.min(i,t.aR):i},HR:function(t){var i=Math.abs(t.x+t.y)%this.options.pR.length;return this.options.pR[i]},Me:function(){var t,i;for(t in this.ie)this.ie[t].coords.z!==this.Pe&&(i=this.ie[t].el,i.onload=T.S.H,i.onerror=T.S.H,i.complete||(i.src=T.S.Z,T._Q.Qq(i)))}}),T.JR=function(t,i){return new T.TileLayer(t,i)},T.TileLayer.WMS=T.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},options:{IW:null,srs:null,jR:!1},initialize:function(t,i){this.FR=t;var n=T.extend({},this.defaultWmsParams);for(var e in i)e in this.options||(n[e]=i[e]);i=T.setOptions(this,i),this.wmsSrs="EPSG:900913",i.srs?"EPSG:4326"==i.srs?(i.IW=T.gq.uW,this.wmsSrs="EPSG:4326"):(i.IW=T.gq.UW,i.srs="EPSG:900913",this.wmsSrs="EPSG:900913"):i.srs=this.wmsSrs,n.width=n.height=i.Te*(i.DR&&T.oQ.retina?2:1),this.KR=n},onAdd:function(t){this.kR=this.options.IW||t.options.IW,this.LR=parseFloat(this.KR.version);var i=this.LR>=1.3?"IW":"srs";this.KR[i]=this.kR.code,T.TileLayer.prototype.onAdd.call(this,t)},getTileUrl:function(t){var i=this.tR(t),n=this.kR.nq(i.Zq()),e=this.kR.nq(i.cq()),o=(this.LR>=1.3&&this.kR===T.gq.uW?[e.y,n.x,n.y,e.x]:[n.x,e.y,e.x,n.y]).join(","),s=T.TileLayer.prototype.getTileUrl.call(this,t);return s+T.S.K(this.KR,s,this.options.jR)+(this.options.jR?"&BBOX=":"&bbox=")+o},setParams:function(t,i){return T.extend(this.KR,t),i||this.redraw(),this}}),T.JR.wms=function(t,i){return new T.TileLayer.WMS(t,i)},T.TileLayer.TDT=T.TileLayer.extend({}),T.JR.tdt=function(t,i){return new T.TileLayer.tdt(t,i)},T.lR={ZR:"202206011524",CR:function(t,i,n){if(window.localStorage){var e,o=localStorage.getItem(t);null==o||0==o.length||this.ZR!=localStorage.getItem("TDT_version")?(document.write(''),window.ActiveXObject?e=new ActiveXObject("Microsoft.XMLHTTP"):window.XMLHttpRequest&&(e=new XMLHttpRequest),null!=e&&(e.open("GET",i),e.send(null),e.onreadystatechange=function(){4==e.readyState&&200==e.status&&(o=e.responseText,localStorage.setItem(t,o),localStorage.setItem("TDT_version",T.lR.ZR),null!=n&&n())})):(T.lR.VR(o),null!=n&&n())}else T.lR.cR(i)},BR:function(t,i){if(T.oQ.ie8)return T.lR.vR(i),!1;if(window.localStorage){var n,e=localStorage.getItem(t);null==e||0==e.length||this.ZR!=localStorage.getItem("TDT_version")?(window.ActiveXObject?n=new ActiveXObject("Microsoft.XMLHTTP"):window.XMLHttpRequest&&(n=new XMLHttpRequest),null!=n&&(n.open("GET",i),n.send(null),n.onreadystatechange=function(){4==n.readyState&&200==n.status&&(e=n.responseText,localStorage.setItem(t,e),localStorage.setItem("TDT_version",T.lR.ZR),e=null==e?"":e,T.lR.NR(e))})):T.lR.NR(e)}else T.lR.vR(i)},VR:function(t){var i=document.getElementsByTagName("HEAD").item(0),n=document.createElement("script");n.type="text/javascript",n.text=t,i.appendChild(n)},NR:function(t){var i=document.getElementsByTagName("HEAD").item(0),n=document.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=t:n.innerHTML=t,i.appendChild(n)},cR:function(t){var i=document.getElementsByTagName("HEAD").item(0),n=document.createElement("script");n.type="text/javascript",n.src=t,i.appendChild(n)},vR:function(t){var i=document.getElementsByTagName("HEAD").item(0),n=document.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=t,i.appendChild(n)},bR:function(t,i){var n=document.createElement("script");i&&(n.onload=n.onreadystatechange=function(){this.readyState&&"loaded"!=this.readyState&&"complete"!==this.readyState||(n.onload=n.onreadystatechange=null,i())});var e=document.getElementsByTagName("head")[0];n.type="text/javascript",n.src=t,e.appendChild(n)},onLoadJsCallBack:function(t){var i=T.ScriptLoader.getObject();i.load(t,"UTF-8",this,function(){i=null,delete i})},MR:function(t,i){if(T.oQ.ie8)return T.lR.vR(i),!1;if(window.localStorage){var n=localStorage.getItem(t);null==n||0==n.length||this.ZR!=localStorage.getItem("TDT_version")?(T.lR.vR(i),i.indexOf("tianditu4.0")!=-1&&(i=T.w.E+"/api?v=4.0&name=tianditu4.0"),T.lR.bR(i,function(){T.ObjectData&&(n=T.ObjectData),localStorage.setItem(t,n),localStorage.setItem("TDT_version",T.lR.ZR),T.ObjectData=null})):T.lR.NR(n)}},nR:function(t,i){if(T.oQ.ie8)return document.write(''),!1;if(window.localStorage){var n=localStorage.getItem(t);null==n||0==n.length||this.ZR!=localStorage.getItem("TDT_version")?(T.lR.cR(i),i.indexOf("components")!=-1&&(i=T.w.E+"/api?v=4.0&name=components&tk="+T.w.TMAP_AUTHKEY),i.indexOf("service")!=-1&&(i=T.w.E+"/api?v=4.0&name=service&tk="+T.w.TMAP_AUTHKEY),i.indexOf("military")!=-1&&(i=T.w.E+"/api?v=4.0&name=military&tk="+T.w.TMAP_AUTHKEY),T.lR.bR(i,function(){T.ObjectData&&(n=T.ObjectData),localStorage.setItem(t,n),localStorage.setItem("TDT_version",T.lR.ZR),T.ObjectData=null})):T.lR.VR(n)}}},T.qv=function(t){if(t&&0!==t.code){T={};var i="天地图密钥错误,可能是因为您提供的Key不是有效的天地图开放平台Key,或此Key未对本应用授予JavaScriptAPI权限。您可以访问如下网址了解如何获得有效的Key:http://console.tianditu.com/api/key";alert(i)}},T._R=T.HE.extend({options:{opacity:1,Fq:"",mR:!1,Ue:null,dR:!1},initialize:function(t,i,n){this.FR=t,this.Qr=T.jq(i),T.setOptions(this,n)},onAdd:function(){this.qr||(this.Wr(),this.options.opacity<1&&this.Se()),this.options.mR&&(T._Q.Rq(this.qr,"tdt-interactive"),this.kE(this.qr)),this.getPane().appendChild(this.qr),this.wr()},onRemove:function(){T._Q.Qq(this.qr),this.options.mR&&this.LE(this.qr)},setOpacity:function(t){return this.options.opacity=t,this.qr&&this.Se(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},pe:function(){return this.jE&&T._Q.Wq(this.qr),this},ae:function(){return this.jE&&T._Q.wq(this.qr),this},setUrl:function(t){return this.FR=t,this.qr&&(this.qr.src=t),this},setBounds:function(t){return this.Qr=t,this.jE&&this.wr(),this},VE:function(){return this.options.Ue},CE:function(){var t={zoom:this.wr,viewreset:this.wr};return this.ZE&&(t.Ge=this.ge),t},getBounds:function(){return this.Qr},getElement:function(){return this.qr},Wr:function(){var t=this.qr=T._Q.s("img","tdt-image-layer "+(this.ZE?"tdt-zoom-animated":""));t.onselectstart=T.S.H,t.onmousemove=T.S.H,t.onload=T.D(this.wQ,this,"load"),this.options.dR&&(t.dR=""),t.src=this.FR,t.Fq=this.options.Fq},ge:function(t){var i=this.jE.cW(t.zoom),n=this.jE.DE(this.Qr.Zq(),t.zoom,t.center);T._Q.Uq(this.qr,n,i)},wr:function(){var t=this.qr,i=new T.ZQ(this.jE.kw(this.Qr.Zq()),this.jE.kw(this.Qr.cq())),n=i.getSize();T._Q.setPosition(t,i.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},Se:function(){T._Q.setOpacity(this.qr,this.options.opacity)}}),T.Er=function(t,i,n){return new T._R(t,i,n)},T.Icon=T.c.extend({initialize:function(t){T.setOptions(this,t)},setIconUrl:function(t){this.options.iconUrl=t,this.img&&(this.img.src=t)},getIconUrl:function(t){if(this.img)return this.img.src},setIconSize:function(t){this.options.iconSize=t,this.img&&(this.img.style.width=t.x+"px",this.img.style.height=t.y+"px")},getIconSize:function(){return this.options.iconSize},setIconAnchor:function(t){this.options.iconAnchor=t,this.er(this.img,"icon")},getIconAnchor:function(t){return this.options.iconAnchor},Rr:function(t){return this.rr("icon",t)},Tr:function(t){return this.rr("shadow",t)},rr:function(t,i){var n=this.tr(t);return n?(this.img=this.Yr(n,i&&"IMG"===i.tagName?i:null),this.er(this.img,t),this.img):null},er:function(t,i){var n=this.options,e=n[i+"Size"];T.S.l(e)||e instanceof T.Point||(e=[e,e]);var o=T.SQ(e),s=T.SQ("shadow"===i&&n.Ur||n.iconAnchor||o&&o.dQ(2,!0));t.className="tdt-marker-"+i+" "+(n.className||""),s&&(t.style.marginLeft=-s.x+"px",t.style.marginTop=-s.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},Yr:function(t,i){return i=i||document.createElement("img"),i.src=t,i},tr:function(t){return T.oQ.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),T.ur=function(t){return new T.Icon(t)},T.Icon.Default=T.Icon.extend({options:{iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-41],shadowSize:[41,41]},tr:function(t){var i=t+"Url";if(this.options[i])return this.options[i];var n=T.Icon.Default.imagePath;return n+"/marker-"+t+(T.oQ.retina&&"icon"===t?"-2x":"")+".png"}}),T.Icon.Default.imagePath=function(){var t,i,n,e,o=document.getElementsByTagName("script"),s=/[\/^]tdt[\-\._]?([\w\-\._]*)\.js\??/;for(t=0,i=o.length;to?(i.height=o+"px",T._Q.Rq(t,s)):T._Q.Tq(t,s),this.PT=this.Ow.offsetWidth},WT:function(){if(this.jE){var t=this.jE.kw(this.or),i=T.SQ(this.options.offset),n=this._getAnchor();this.ZE?T._Q.setPosition(this.Ow,t.AQ(n)):i=i.AQ(t).AQ(n);var e=this.pT=-i.y,o=this.AT=-Math.round(this.PT/2)+i.x;this.Ow.style.bottom=e+"px",this.Ow.style.left=o+"px"}},ge:function(t){var i=this.jE.DE(this.or,t.zoom,t.center),n=this._getAnchor();T._Q.setPosition(this.Ow,i.AQ(n))},wT:function(){if(!(!this.options.autoPan||this.jE.EE&&this.jE.EE.aT)){var t=this.jE,i=this.Ow.offsetHeight,n=this.PT,e=new T.Point(this.AT,-i-this.pT);this.ZE&&e.aQ(T._Q.getPosition(this.Ow));var o=t.Zw(e),s=T.SQ(this.options.autoPanPadding),r=T.SQ(this.options.Vr||s),h=T.SQ(this.options.cr||s),a=t.getSize(),u=0,c=0;o.x+n+h.x>a.x&&(u=o.x+n-a.x+h.x),o.x-u-r.x<0&&(u=o.x-r.x),o.y+i+h.y>a.y&&(c=o.y+i-a.y+h.y),o.y-c-r.y<0&&(c=o.y-r.y),(u||c)&&t.wQ("ST").panBy([u,c])}},YT:function(t){this.rT(),T.oq.uw(t)},_getAnchor:function(){return T.SQ(this.br&&this.br.sT?this.br.sT():[0,0])}}),T._r=function(t,i){return new T.Zr(t,i)},T.Map.M({QT:function(t,i,n){return t instanceof T.Zr||(t=new T.Zr(n).setContent(t)),i&&t.sr(i),this.hasLayer(t)?this:(this.Dr&&this.Dr.options.Br&&this.TT(),this.Dr=t,this.addLayer(t))},openInfoWindow:function(t,i,n){this.QT(t,i,n)},closeInfoWindow:function(t){this.TT(t)},TT:function(t){return t&&t!==this.Dr||(t=this.Dr,this.Dr=null),t&&this.removeLayer(t),this},closeInfoWindow:function(t){this.TT(t)}}),T.HE.M({dr:function(t,i){return t instanceof T.Zr?(T.setOptions(t,i),this.Dr=t,t.br=this):(this.Dr&&!i||(this.Dr=new T.Zr(i,this)),this.Dr.setContent(t)),this.DT||(this.on({Qq:this.TT,move:this.dT}),this.DT=!0),this},FT:function(){return this.Dr&&(this.off({Qq:this.TT,move:this.dT}),this.DT=!1,this.Dr=null),this},openInfoWindow:function(t,i){this.QT(),this.Pr||(this.Pr=this.dr(t,i),this.QT())},closeInfoWindow:function(){this.TT()},QT:function(t,i){if(t instanceof T.HE||(i=t,t=this),t instanceof T.fT)for(var n in this.hW){t=this.hW[n];break}return i||(i=t.getCenter?t.getCenter():t.PE()),this.Dr&&this.jE&&(this.Dr.br=t,this.Dr.update(),this.jE.QT(this.Dr,i)),this},TT:function(){return this.Dr&&this.Dr.rT(),this},GT:function(t){return this.Dr&&(this.Dr.jE?this.TT():this.QT(t)),this},gT:function(){return this.Dr.isOpen()},isOpen:function(){this.gT()},HT:function(t){return this.Dr&&this.Dr.setContent(t),this},hT:function(){return this.Dr},JT:function(t){var i=t.layer||t.target;if(this.Dr&&this.jE)return T.oq.uw(t),i instanceof T.jT?void this.QT(t.layer||t.target,t.KT):void(this.jE.hasLayer(this.Dr)&&this.Dr.br===i?this.TT():this.QT(i,t.KT))},dT:function(t){this.Dr.sr(t.KT)}}),T.Marker.M({sT:function(){return this.options.icon.options.popupAnchor||(this.options.icon.options.iconAnchor?T.S.l(this.options.icon.options.iconAnchor)?this.options.icon.options.popupAnchor=[0,-this.options.icon.options.iconAnchor[1]]:this.options.icon.options.popupAnchor=[0,-this.options.icon.options.iconAnchor.y]:this.options.icon.options.popupAnchor=[0,0]),this.options.icon.options.popupAnchor}}),T.InfoWindow=T.Zr.extend({options:{type:3},initialize:function(t,i,n){this.ET=t,T.setOptions(this,i),this.br=n},getType:function(){return this.options.type},setMinWidth:function(t){this.options.minWidth=t,this.update()},setMaxWidth:function(t){this.options.Cr=t,this.update()},setMaxHeight:function(t){this.options.maxHeight=t,this.update()},setLngLat:function(t){this.sr(t)},setOffset:function(t){this.options.offset=t,this.update()},getOffset:function(){return this.options.offset},closeInfoWindow:function(){this.rT()}}),T.LayerGroup=T.HE.extend({initialize:function(t){this.hW={};var i,n;if(t)for(i=0,n=t.length;ia&&(s=r,a=h);a>n&&(i[s]=1,this.At(t,i,n,e,s),this.At(t,i,n,s,o))},it:function(t,i){for(var n=[t[0]],e=1,o=0,s=t.length;ei&&(n.push(t[e]),o=e);return oi.max.x&&(n|=2),t.yi.max.y&&(n|=8),n},at:function(t,i){var n=i.x-t.x,e=i.y-t.y;return n*n+e*e},Pt:function(t,i,n,e){var o,s=i.x,r=i.y,h=n.x-s,a=n.y-r,u=h*h+a*a;return u>0&&(o=((t.x-s)*h+(t.y-r)*a)/u,o>1?(s=n.x,r=n.y):o>0&&(s+=h*o,r+=a*o)),h=t.x-s,a=t.y-r,e?h*h+a*a:new T.Point(s,r)}},T.Polyline=T.jT.extend({options:{Ft:1,type:4,ft:!1},initialize:function(t,i){T.setOptions(this,i),this.Gt(t),this.gt="solid",this.options.lineStyle&&this.setLineStyle(this.options.lineStyle)},getType:function(){return this.options.type},Ht:function(){return this.ht},getLngLats:function(){return this.Ht()},Jt:function(t){return this.Gt(t),this.redraw()},setLngLats:function(t){this.Jt(t)},setColor:function(t){this.setStyle({color:t})},getColor:function(){return this.options.color},setWeight:function(t){this.setStyle({weight:t})},getWeight:function(){return this.options.weight},setOpacity:function(t){this.setStyle({opacity:t})},getOpacity:function(){return this.options.opacity},setLineStyle:function(t){"dashed"==t?(this.gt="dashed",T.oQ.ie8||T.oQ.ie7?this.setStyle({dashArray:"2,2"}):this.setStyle({dashArray:"4"})):(this.gt="solid",this.setStyle({dashArray:""}))},getLineStyle:function(){return this.gt},getMap:function(){return this.jE},enableEdit:function(){this.jt&&this.jt.enable()},disableEdit:function(){this.jt&&this.jt.disable()},isEditable:function(){return this.jt.aE()},Kt:function(){return!this.ht.length},kt:function(t){for(var i,n,e=1/0,o=null,s=T.ut.Pt,r=0,h=this.Lt.length;ri)return r=(e-i)/n,this.jE.Dw([s.x-r*(s.x-o.x),s.y-r*(s.y-o.y)])},getBounds:function(){return this.Qr},Zt:function(t,i){return i=i||this.Ct(),t=T.fq(t),i.push(t),this.Qr.extend(t),this.redraw()},Gt:function(t){this.Qr=new T.Kq,this.ht=this.Vt(t)},Ct:function(){return T.Polyline.ct(this.ht)?this.ht:this.ht[0]},Vt:function(t){for(var i=[],n=T.Polyline.ct(t),e=0,o=t.length;e=2&&i[0]instanceof T.dq&&i[0].equals(i[n-1])&&i.pop(),i},Gt:function(t){T.Polyline.prototype.Gt.call(this,t),T.Polyline.ct(this.ht)&&(this.ht=[this.ht])},Ct:function(){return T.Polyline.ct(this.ht[0])?this.ht[0]:this.ht[0][0]},Nt:function(){var t=this.bT.Qr,i=this.options.weight,n=new T.Point(i,i);if(t=new T.ZQ(t.min.sQ(n),t.max.AQ(n)),this.Lt=[],this.vt&&this.vt.intersects(t)){if(this.options.ft)return void(this.Lt=this.lt);for(var e,o=0,s=this.lt.length;o';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(AO){return!1}}(),T.SVG.M(T.oQ.vml?{sW:function(){this.Ow=T._Q.s("div","tdt-vml-container")},Oe:function(){this.jE.ER||T.ZT.prototype.Oe.call(this)},wt:function(t){var i=t.Ow=T.SVG.s("shape");T._Q.Rq(i,"tdt-vml-shape "+(this.options.className||"")),i.coordsize="1 1",t.Yt=T.SVG.s("path"),i.appendChild(t.Yt),this.Tt(t)},Et:function(t){var i=t.Ow;this.Ow.appendChild(i),t.options.mR&&t.kE(i)},et:function(t){var i=t.Ow;T._Q.Qq(i),t.LE(i)},Tt:function(t){var i=t._stroke,n=t._fill,e=t.options,o=t.Ow;o.stroked=!!e.stroke,o.filled=!!e.fill,e.stroke?(i||(i=t._stroke=T.SVG.s("stroke")),o.appendChild(i),i.weight=e.weight+"px",i.color=e.color,i.opacity=e.opacity,e.dashArray?i.dashStyle=T.S.l(e.dashArray)?e.dashArray.join(" "):e.dashArray.replace(/( *, *)/g," "):i.dashStyle="",i.endcap=e.Qt.replace("butt","flat"),i.joinstyle=e.qt):i&&(o.removeChild(i),t._stroke=null),e.fill?(n||(n=t._fill=T.SVG.s("fill")),o.appendChild(n),n.color=e.fillColor||e.color,n.opacity=e.fillOpacity):n&&(o.removeChild(n),t._fill=null)},TY:function(t){var i=t.eY.hQ(),n=Math.round(t.EY),e=Math.round(t.rY||n);this.iY(t,t.tY()?"M0 0":"AL "+i.x+","+i.y+" "+n+","+e+" 0,23592600")},iY:function(t,i){t.Yt.v=i},Gr:function(t){T._Q.Wq(t.Ow)},tt:function(t){T._Q.wq(t.Ow)}}:{}),T.oQ.vml&&(T.SVG.s=function(){try{return document.namespaces.AQ("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("')}}catch(AO){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}()),T.mT=T.ZT.extend({onAdd:function(){T.ZT.prototype.onAdd.call(this),this.hW=this.hW||{},this.oY()},sW:function(){var t=this.Ow=document.createElement("canvas");T.oq.on(t,"mousemove",T.S.G(this.PY,32,this),this).on(t,"click dblclick mousedown mouseup contextmenu",this.pY,this).on(t,"mouseout",this.AY,this),this.aY=t.getContext("2d")},Oe:function(){if(!this.jE.ER||!this.Qr){this.SY={},T.ZT.prototype.Oe.call(this);var t=this.Qr,i=this.Ow,n=t.getSize(),e=T.oQ.retina?2:1;T._Q.setPosition(i,t.min),i.width=e*n.x,i.height=e*n.y,i.style.width=n.x+"px",i.style.height=n.y+"px",T.oQ.retina&&this.aY.scale(2,2),this.aY.translate(-t.min.x,-t.min.y)}},wt:function(t){this._updateDashArray(t),this.hW[T.d(t)]=t},Et:T.S.H,et:function(t){t.sY=!0,this.DY(t)},rt:function(t){this.dY=t.vt,this.oY(!0),t.Rt(),t.Oe(),this.oY(),this.dY=null},Tt:function(t){this._updateDashArray(t),this.DY(t)},_updateDashArray:function(t){if(t.options.dashArray){var i,n=t.options.dashArray.split(","),e=[];for(i=0;it.y!=e.y>t.y&&t.x<(e.x-n.x)*(t.y-n.y)/(e.y-n.y)+n.x&&(u=!u);return u||T.Polyline.prototype.HY.call(this,t,!0)},T.wY.prototype.HY=function(t){return t.distanceTo(this.eY)<=this.EY+this.Ut()},T.GeoJSON=T.fT.extend({initialize:function(t,i){T.setOptions(this,i),this.hW={},t&&this.addData(t)},addData:function(t){var i,n,e,o=T.S.l(t)?t:t.features;if(o){for(i=0,n=o.length;i100&&e<500||t.target.qU&&!t.uE?void T.oq.uw(t):(T.oq.QU=n,void i(t))}},T.oq.addListener=T.oq.on,T.oq.removeListener=T.oq.off,T.nY=T.m.extend({options:{clickTolerance:3},v:{START:T.oQ.touch?["touchstart","mousedown"]:["mousedown"],END:{mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},MOVE:{mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"}},initialize:function(t,i,n){this.WU=t,this.wU=i||t,this.EU=n},enable:function(){this.eU||(T.oq.on(this.wU,T.nY.START.join(" "),this.RU,this),this.eU=!0)},disable:function(){this.eU&&(T.oq.off(this.wU,T.nY.START.join(" "),this.RU,this),this.eU=!1,this.sw=!1)},RU:function(t){if(!t.uE&&this.eU&&(this.sw=!1,!T._Q.Eq(this.WU,"tdt-zoom-anim")&&!(T.nY._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches)&&this.eU&&(T.nY._dragging=!0,this.EU&&T._Q.Sq(this.WU),T._Q.Aq(),T._Q.Oq(),!this.rU))){this.wQ("down");var i=t.touches?t.touches[0]:t;this.TU=new T.Point(i.clientX,i.clientY),T.oq.on(document,T.nY.MOVE[t.type],this.fe,this).on(document,T.nY.END[t.type],this.tU,this)}},fe:function(t){if(!t.uE&&this.eU){if(t.touches&&t.touches.length>1)return void(this.sw=!0);var i=t.touches&&1===t.touches.length?t.touches[0]:t,n=new T.Point(i.clientX,i.clientY),e=n.sQ(this.TU);(e.x||e.y)&&(Math.abs(e.x)+Math.abs(e.y)50&&(this.JU.shift(),this.jU.shift())}this.jE.wQ("move",t).wQ("drag",t)},hU:function(){var t=this.jE.getSize().dQ(2),i=this.jE.kw([0,0]);this.CU=i.sQ(t).x,this.VU=this.jE.Kw().getSize().x},cU:function(t,i){return t-(t-i)*this.kU},gU:function(){if(this.kU&&this.KU){var t=this.dU.uU.sQ(this.dU.YU),i=this.KU;t.xi.max.x&&(t.x=this.cU(t.x,i.max.x)),t.y>i.max.y&&(t.y=this.cU(t.y,i.max.y)),this.dU.uU=this.dU.YU.AQ(t)}},HU:function(){var t=this.VU,i=Math.round(t/2),n=this.CU,e=this.dU.uU.x,o=(e-i+n)%t+i-n,s=(e+i+n)%t-i-n,r=Math.abs(o+n)i.getMaxZoom())&&void("center"===i.options.bU?i.setZoom(o):i.VW(t.containerPoint,o))}}),T.Map.M({enableDoubleClickZoom:function(){this.bU.enable()},disableDoubleClickZoom:function(){this.bU.disable()},isDoubleClickZoom:function(){return this.bU.eU}}),T.Map._("iw","bU",T.Map.MU),T.Map.n({_U:!0,mU:40,Qu:70}),T.Map.qu=T.Kr.extend({oU:function(){T.oq.on(this.jE.Ow,"mousewheel",this.Wu,this),this.wu=0},Ar:function(){T.oq.off(this.jE.Ow,"mousewheel",this.Wu,this)},Wu:function(t){var i=T.oq._Y(t),n=this.jE.options.mU;this.wu+=i,this.Eu=this.jE.Cw(t),this.eu||(this.eu=+new Date);var e=Math.max(n-(+new Date-this.eu),0);clearTimeout(this.Ru),this.Ru=setTimeout(T.D(this.ru,this),e),T.oq.uw(t)},ru:function(){var t=this.jE,i=t.getZoom(),n=this.jE.options.AW||0;t.Iw();var e=this.wu/(4*this.jE.options.Qu),o=4*Math.log(2/(1+Math.exp(-Math.abs(e))))/Math.LN2,s=n?Math.ceil(o/n)*n:o,r=t.GW(i+(this.wu>0?s:-s))-i;this.wu=0,this.eu=null,r&&("center"===t.options._U?t.setZoom(i+r):t.VW(this.Eu,i+r))}}),T.Map.M({enableScrollWheelZoom:function(){this._U.enable()},disableScrollWheelZoom:function(){this._U.disable()},isScrollWheelZoom:function(){return this._U.eU}}),T.Map._("iw","_U",T.Map.qu),T.extend(T.oq,{Tu:T.oQ.msPointer?"MSPointerDown":T.oQ.pointer?"pointerdown":"touchstart",tu:T.oQ.msPointer?"MSPointerUp":T.oQ.pointer?"pointerup":"touchend",NY:function(t,i,n){function e(t){var i;if(i=T.oQ.pointer?T.oq.Yu:t.touches.length,!(i>1)){var n=Date.now(),e=n-(s||n);r=t.touches?t.touches[0]:t,h=e>0&&e<=a,s=n}}function o(){if(h&&!r.cancelBubble){if(T.oQ.pointer){var t,n,e={};for(n in r)t=r[n],e[n]=t&&t.D?t.D(r):t;r=e}r.type="dblclick",i(r),s=null}}var s,r,h=!1,a=250,u="_tdt_",c=this.Tu,l=this.tu;return t[u+c+n]=e,t[u+l+n]=o,t[u+"dblclick"+n]=i,t.addEventListener(c,e,!1),t.addEventListener(l,o,!1),T.oQ.edge||t.addEventListener("dblclick",i,!1),this},MY:function(t,i){var n="_tdt_",e=t[n+this.Tu+i],o=t[n+this.tu+i],s=t[n+"dblclick"+i];return t.removeEventListener(this.Tu,e,!1),t.removeEventListener(this.tu,o,!1),T.oQ.edge||t.removeEventListener("dblclick",s,!1),this}}),T.extend(T.oq,{Uu:T.oQ.msPointer?"MSPointerDown":"pointerdown",uu:T.oQ.msPointer?"MSPointerMove":"pointermove",Iu:T.oQ.msPointer?"MSPointerUp":"pointerup",iu:T.oQ.msPointer?"MSPointerCancel":"pointercancel",TAG_WHITE_LIST:["INPUT","SELECT","OPTION"],Ou:{},Yu:0,vY:function(t,i,n,e){return"touchstart"===i?this.ou(t,n,e):"touchmove"===i?this.Pu(t,n,e):"touchend"===i&&this.pu(t,n,e),this},removePointerListener:function(t,i,n){var e=t["_tdt_"+i+n];return"touchstart"===i?t.removeEventListener(this.Uu,e,!1):"touchmove"===i?t.removeEventListener(this.uu,e,!1):"touchend"===i&&(t.removeEventListener(this.Iu,e,!1),t.removeEventListener(this.iu,e,!1)),this},ou:function(t,i,n){var e=T.D(function(t){if("mouse"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(this.TAG_WHITE_LIST.indexOf(t.target.tagName)<0))return;T.oq.preventDefault(t)}this.Au(t,i)},this);if(t["_tdt_touchstart"+n]=e,t.addEventListener(this.Uu,e,!1),!this.au){var o=T.D(this.Su,this);document.documentElement.addEventListener(this.Uu,T.D(this.su,this),!0),document.documentElement.addEventListener(this.uu,T.D(this.Du,this),!0),document.documentElement.addEventListener(this.Iu,o,!0),document.documentElement.addEventListener(this.iu,o,!0),this.au=!0}},su:function(t){this.Ou[t.pointerId]=t,this.Yu++},Du:function(t){this.Ou[t.pointerId]&&(this.Ou[t.pointerId]=t)},Su:function(t){delete this.Ou[t.pointerId],this.Yu--},Au:function(t,i){t.touches=[];for(var n in this.Ou)t.touches.push(this.Ou[n]);t.changedTouches=[t],i(t)},Pu:function(t,i,n){var e=T.D(function(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&this.Au(t,i)},this);t["_tdt_touchmove"+n]=e,t.addEventListener(this.uu,e,!1)},pu:function(t,i,n){var e=T.D(function(t){this.Au(t,i)},this);t["_tdt_touchend"+n]=e,t.addEventListener(this.Iu,e,!1),t.addEventListener(this.iu,e,!1)}}),T.Map.n({du:!0}),T.Map.Fu=T.Kr.extend({initialize:function(t){this.jE=t,this.Ow=t.Ow,this.fu=t.aw.overlayPane},oU:function(){T.oq.on(this.Ow,"touchstart",this.Gu,this),T.oq.on(this.Ow,"touchmove",this.gu,this),T.oq.on(this.Ow,"touchend",this.Hu,this)},Ar:function(){T.oq.off(this.Ow,"touchstart",this.Gu),T.oq.off(this.Ow,"touchmove",this.gu),T.oq.off(this.Ow,"touchend",this.Hu)},Gu:function(t){if(this.jE.CW){var i="touchstart";this.jE.wQ(i,this.hu(t));var n=this;return this.timer=setTimeout(function(){n.jE.wQ("longpress",n.hu(t))},600),!1}},gu:function(t){if(this.jE.CW){var i="touchmove";this.jE.wQ(i,this.hu(t))}},Hu:function(t){if(this.jE.CW){var i="touchend";return this.jE.wQ(i,this.hu(t)),clearTimeout(this.timer),!1}},hu:function(t){if(t.touches&&0!=t.changedTouches.length){var i=this.jE.Cw(t.changedTouches[0]),n=this.jE.Lw(i),e=this.jE.Dw(n),o={lnglat:e,layerPoint:n,containerPoint:i,originalEvent:t};return o}}}),T.Map._("iw","du",T.Map.Fu),T.Map.n({Ju:T.oQ.touch&&!T.oQ.android23,ju:!1}),T.Map.Ku=T.Kr.extend({oU:function(){T._Q.Rq(this.jE.Ow,"tdt-touch-zoom"),T.oq.on(this.jE.Ow,"touchstart",this.Gu,this)},Ar:function(){T._Q.Tq(this.jE.Ow,"tdt-touch-zoom"),T.oq.off(this.jE.Ow,"touchstart",this.Gu,this)},Gu:function(t){var i=this.jE;if(t.touches&&2===t.touches.length&&!i.ER&&!this.ku){var n=i.Cw(t.touches[0]),e=i.Cw(t.touches[1]);this.Lu=i.getSize().FQ(2),this.lu=i.vW(this.Lu),"center"!==i.options.Ju&&(this._pinchStartLatLng=i.vW(n.AQ(e).FQ(2))),this._startDist=n.distanceTo(e),this.Zu=i.getZoom(),this.sw=!1,this.ku=!0,i.Iw(),T.oq.on(document,"touchmove",this.gu,this).on(document,"touchend",this.Hu,this),T.oq.preventDefault(t)}},gu:function(t){if(t.touches&&2===t.touches.length&&this.ku){var i=this.jE,n=i.Cw(t.touches[0]),e=i.Cw(t.touches[1]),o=n.distanceTo(e)/this._startDist;if(this.fW=i.gw(o,this.Zu),!i.options.ju&&(this.fWi.getMaxZoom()&&o>1)&&(this.fW=i.GW(this.fW)),"center"===i.options.Ju){if(this.BT=this.lu,1===o)return}else{var s=n.aQ(e).FQ(2).DQ(this.Lu);if(1===o&&0===s.x&&0===s.y)return;this.BT=i._q(i.nq(this._pinchStartLatLng,this.fW).sQ(s),this.fW)}this.sw||(i.qE(!0),this.sw=!0),T.S.V(this.IU);var r=T.D(i.QE,i,this.BT,this.fW,{pinch:!0,hQ:!1});this.IU=T.S.C(r,this,!0),T.oq.preventDefault(t)}},Hu:function(){return this.sw&&this.ku?(this.ku=!1,T.S.V(this.IU),T.oq.off(document,"touchmove",this.gu).off(document,"touchend",this.Hu),void(this.jE.options.Nr?this.jE.ge(this.BT,this.jE.GW(this.fW),!0,this.jE.options.snapZoom):this.jE.ZW(this.BT,this.jE.GW(this.fW)))):void(this.ku=!1)}}),T.Map.M({enablePinchToZoom:function(){this.Ju.enable()},disablePinchToZoom:function(){this.Ju.disable()},isPinchToZoom:function(){return this.Ju.eU}}),T.Map._("iw","Ju",T.Map.Ku),T.Map.n({Cu:!0,Vu:15}),T.Map.cu=T.Kr.extend({oU:function(){T.oq.on(this.jE.Ow,"touchstart",this.RU,this)},Ar:function(){T.oq.off(this.jE.Ow,"touchstart",this.RU,this)},RU:function(t){if(t.touches){if(T.oq.preventDefault(t),this.Bu=!0,t.touches.length>1)return this.Bu=!1,void clearTimeout(this.vu);var i=t.touches[0],n=i.target;this.YU=this.uU=new T.Point(i.clientX,i.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&T._Q.Rq(n,"tdt-active"),this.vu=setTimeout(T.D(function(){this.Nu()&&(this.Bu=!1,this.tU(),this.bu("contextmenu",i))},this),1e3),this.bu("mousedown",i),T.oq.on(document,{touchmove:this.fe,touchend:this.tU},this)}},tU:function(t){if(clearTimeout(this.vu),T.oq.off(document,{touchmove:this.fe,touchend:this.tU},this),this.Bu&&t&&t.changedTouches){var i=t.changedTouches[0],n=i.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&T._Q.Tq(n,"tdt-active"),this.bu("mouseup",i),this.Nu()&&this.bu("click",i)}},Nu:function(){return this.uU.distanceTo(this.YU)<=this.jE.options.Vu},fe:function(t){var i=t.touches[0];this.uU=new T.Point(i.clientX,i.clientY),this.bu("mousemove",i)},bu:function(t,i){var n=document.createEvent("MouseEvents");n.uE=!0,i.target.qU=!0,n.initMouseEvent(t,!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),i.target.dispatchEvent(n)}}),T.oQ.touch&&!T.oQ.pointer&&T.Map._("iw","Cu",T.Map.cu),T.Map.n({SE:!0}),T.Map.Mu=T.Kr.extend({initialize:function(t){this.jE=t,this.Ow=t.Ow,this.fu=t.aw.overlayPane},oU:function(){T.oq.on(this.Ow,"mousedown",this.nu,this)},Ar:function(){T.oq.off(this.Ow,"mousedown",this.nu,this)},moved:function(){return this.sw},_u:function(){this.sw=!1},nu:function(t){return!(!t.shiftKey||1!==t.which&&1!==t.button)&&(this._u(),T._Q.Oq(),T._Q.Aq(),this.TU=this.jE.Cw(t),void T.oq.on(document,{contextmenu:T.oq.uw,mousemove:this.PY,mouseup:this.mu,keydown:this.QI},this))},PY:function(t){this.sw||(this.sw=!0,this.qI=T._Q.s("div","tdt-zoom-box",this.Ow),T._Q.Rq(this.Ow,"tdt-crosshair"),this.jE.wQ("boxzoomstart")),this.eY=this.jE.Cw(t);var i=new T.ZQ(this.eY,this.TU),n=i.getSize();T._Q.setPosition(this.qI,i.min),this.qI.style.width=n.x+"px",this.qI.style.height=n.y+"px"},WI:function(){this.sw&&(T._Q.Qq(this.qI),T._Q.Tq(this.Ow,"tdt-crosshair")),T._Q.Pq(),T._Q.aq(),T.oq.off(document,{contextmenu:T.oq.uw,mousemove:this.PY,mouseup:this.mu,keydown:this.QI},this)},mu:function(t){if((1===t.which||1===t.button)&&(this.WI(),this.sw)){setTimeout(T.D(this._u,this),0);var i=new T.Kq(this.jE.vW(this.TU),this.jE.vW(this.eY));this.jE._W(i).wQ("boxzoomend",{boxZoomBounds:i})}},QI:function(t){27===t.keyCode&&this.WI()}}),T.Map._("iw","SE",T.Map.Mu),T.Map.n({Ir:!0,wI:80}),T.Map.EI=T.Kr.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this.jE=t,this.eI(t.options.wI),this.RI(t.options.aW)},oU:function(){var t=this.jE.Ow;t.tabIndex<=0&&(t.tabIndex="0"),T.oq.on(t,{focus:this.rI,blur:this.TI,mousedown:this.nu},this),this.jE.on({focus:this.tI,blur:this.YI},this)},Ar:function(){this.YI(),T.oq.off(this.jE.Ow,{focus:this.rI,blur:this.TI,mousedown:this.nu},this),this.jE.off({focus:this.tI,blur:this.YI},this)},nu:function(){if(!this.UI){var t=document.body,i=document.documentElement,n=t.scrollTop||i.scrollTop,e=t.scrollLeft||i.scrollLeft;this.jE.Ow.focus(),window.scrollTo(e,n)}},rI:function(){this.UI=!0,this.jE.wQ("focus")},TI:function(){this.UI=!1,this.jE.wQ("blur")},eI:function(t){var i,n,e=this._panKeys={},o=this.keyCodes;for(i=0,n=o.left.length;i0&&t.screenY>0&&this.jE.getContainer().focus()}}),T.oI=function(t){return new T.Control(t)},T.Map.M({addControl:function(t){return t.addTo(this),this.wQ("addcontrol",{addcontrol:t}),this},removeControl:function(t){return t.Qq(),this.wQ("removecontrol",{removecontrol:t}),this},Mw:function(){function t(t,o){var s=n+t+" "+n+o;i[t+o]=T._Q.s("div",s,e)}var i=this.iI={},n="tdt-",e=this.PI=T._Q.s("div",n+"control-container",this.Ow);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},Pw:function(){T._Q.Qq(this.PI)}}),T.Control.Zoom=T.Control.extend({options:{position:T_ANCHOR_TOP_LEFT,zoomInText:"+",zoomInTitle:"放大",zoomOutText:"-",zoomOutTitle:"缩小"},onAdd:function(t){var i="tdt-control-zoom",n=T._Q.s("div",i+" tdt-bar"),e=this.options;return this.pI=this.AI(e.zoomInText,e.zoomInTitle,i+"-in",n,this.aI),this.SI=this.AI(e.zoomOutText,e.zoomOutTitle,i+"-out",n,this.sI),this.DI(),t.on("zoomend zoomlevelschange",this.DI,this),t.on("minzoom",this.DI,this),t.on("maxzoom",this.DI,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this.DI,this),t.off("minzoom",this.DI,this),t.off("maxzoom",this.DI,this)},disable:function(){return this.dI=!0,this.DI(),this},enable:function(){return this.dI=!1,this.DI(),this},aI:function(t){this.dI||this.jE.zoomIn(this.jE.options.aW*(t.shiftKey?3:1))},sI:function(t){this.dI||this.jE.zoomOut(this.jE.options.aW*(t.shiftKey?3:1))},AI:function(t,i,n,e,o){var s=T._Q.s("a",n,e);return s.innerHTML=t,s.href="#",s.title=i,T.oq.on(s,"mousedown dblclick",T.oq.stopPropagation).on(s,"click",T.oq.uw).on(s,"click",o,this).on(s,"click",this.OI,this),s},DI:function(){var t=this.jE,i="tdt-disabled";T._Q.Tq(this.pI,i),T._Q.Tq(this.SI,i),(this.dI||t.fW===t.getMinZoom())&&T._Q.Rq(this.SI,i),(this.dI||t.fW===t.getMaxZoom())&&T._Q.Rq(this.pI,i)}}),T.Map.n({FI:!1}),T.Map._(function(){this.options.FI&&(this.FI=new T.Control.Zoom,this.addControl(this.FI))}),T.oI.zoom=function(t){return new T.Control.Zoom(t)},T.Control.fI=T.Control.extend({options:{position:T_ANCHOR_BOTTOM_LEFT,GI:'
GS(2023)336号 - 甲测资字1100471
'},initialize:function(t){T.setOptions(this,t),this.gI={}},onAdd:function(t){t.cE=this,this.Ow=T._Q.s("div","tdt-control-copyright"),T.oq&&T.oq.iT(this.Ow);for(var i in t.hW)t.hW[i].VE&&this.BE(t.hW[i].VE());return this.Oe(),this.Ow},HI:function(t){return this.options.GI=t,this.Oe(),this},BE:function(t){return t?(this.gI[t]||(this.gI[t]=0),this.gI[t]++,this.Oe(),this):this},NE:function(t){return t?(this.gI[t]&&(this.gI[t]--,this.Oe()),this):this},Oe:function(){if(this.jE){var t=[];for(var i in this.gI)this.gI[i]&&t.push(i);var n=[];this.options.GI&&n.push(this.options.GI),t.length&&n.push(t.join(", ")),this.Ow.innerHTML=n.join(" | ")}}}),T.Map.n({cE:!0}),T.Map._(function(){this.options.cE&&(new T.Control.fI).addTo(this)}),T.oI.Ue=function(t){return new T.Control.fI(t)},T.Control.Copyright=T.Control.fI.extend({options:{position:T_ANCHOR_BOTTOM_RIGHT,GI:""},initialize:function(t){T.setOptions(this,t),this.hI=[]},addCopyright:function(t){if(this.hI["str"+t.id])return void alert("copyright id 重复");this.hI.push(t),this.hI["str"+t.id]=t;var i=T._Q.s("div","tdt-control-copyright");T.oq&&T.oq.iT(i),i.innerHTML=t.content,t._span=i,this.Ow.appendChild(i);var n=this.jE.getCenter();this.JI(n)},removeCopyright:function(t){this.Ow.removeChild(this.hI["str"+t.id]._span),this.hI["str"+t.id]=null;for(var i=0;i数据来源:国家地理信息公共服务平台',this.Oe(),t.on("moveend",this.Oe,this),this.Ow},onRemove:function(){T._Q.Qq(this.Ow),map.off("moveend",this.Oe,this),this.Ow=null},getLayerArray:function(){for(var t=this.jE.getPanes().tilePane,i=["vec","cva","ter","cta","img","cia"],n=[],e=0;e"}),this.dataSourcesInfo=i.dataSourcesInfo}},setColor:function(t){return this.options.color=t,this.Ow.style.color=t,this},getDataSources:function(){return this.dataSourcesInfo}}),T.oI.datasources=function(t){return new T.Control.DataSources(t)},T.Control.Scale=T.Control.extend({options:{position:T_ANCHOR_BOTTOM_LEFT,Cr:100,KI:!0,kI:!0,type:1},onAdd:function(t){var i="tdt-control-scale",n=T._Q.s("div",i),e=this.options;return this.LI(e,i+"-line",n),t.on(e.te?"moveend":"move",this.Oe,this),t.sE(this.Oe,this),n},onRemove:function(t){t.off(this.options.te?"moveend":"move",this.Oe,this)},setColor:function(t){this.lI&&(this.lI.style.borderColor=t,this.ZI.style.color=t),this.CI&&1==this.type&&(this.CI.style.borderColor=t,this.VI.style.color=t)},LI:function(t,i,n){this.type=t.type,t.KI&&(this.lI=T._Q.s("div",i,n),this.ZI=T._Q.s("div","tdt-control-scale-m",this.lI)),t.kI&&1==t.type&&(this.CI=T._Q.s("div","tdt-control-scale-linebottom",n),this.VI=T._Q.s("div","tdt-control-scale-i",this.CI))},Oe:function(){var t=this.jE,i=t.getSize().y/2,n=t.distance(t.vW([0,i]),t.vW([this.options.Cr,i]));this.cI(n)},cI:function(t){this.options.KI&&t&&this.BI(t),this.options.kI&&t&&1==this.type&&this.vI(t)},BI:function(t){var i=this.NI(t),n=i<1e3?i+" 米":i/1e3+" 公里";this.bI(this.ZI,n,i/t,this.lI)},vI:function(t){var i,n,e,o=3.2808399*t;o>5280?(i=o/5280,n=this.NI(i),this.bI(this.VI,n+" 英里",n/i,this.CI)):(e=this.NI(o),this.bI(this.VI,e+" 英尺",e/o,this.CI))},bI:function(t,i,n,e){e.style.width=Math.round(this.options.Cr*n)+"px",t.innerHTML=i},NI:function(t){var i=Math.pow(10,(Math.floor(t)+"").length-1),n=t/i;return n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1,i*n}}),T.oI.scale=function(t){return new T.Control.Scale(t)},T.Control.MI=T.Control.extend({options:{nI:!0,position:T_ANCHOR_TOP_RIGHT,_I:!0,mI:!1},initialize:function(t,i,n){T.setOptions(this,n),this.hW=[],this.Qi=0,this.qi=!1;for(var e in t)this.Wi(t[e],e);for(e in i)this.Wi(i[e],e,!0)},onAdd:function(t){return this.DW(),this.Oe(),this.jE=t,t.on("zoomend",this.wi,this),this.Ow},onRemove:function(){this.jE.off("zoomend",this.wi,this);for(var t=0;t1,this.Ti.style.display=t?"":"none"),this.ti.style.display=i&&t?"":"none",this},Ei:function(t){this.qi||this.Oe();var i=this._getLayer(T.d(t.target)),n=i.overlay?"AQ"===t.type?"overlayadd":"overlayremove":"AQ"===t.type?"baselayerchange":null;n&&this.jE.wQ(n,i)},ui:function(t,i){var n='",e=document.createElement("div");return e.innerHTML=n,e.firstChild},Ui:function(t){var i,n=document.createElement("label"),e=this.jE.hasLayer(t.layer);t.overlay?(i=document.createElement("input"),i.type="checkbox",i.className="tdt-control-layers-selector",i.defaultChecked=e):i=this.ui("tdt-base-layers",e),i.layerId=T.d(t.layer),T.oq.on(i,"click",this.ri,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("div");n.appendChild(s),s.appendChild(i),s.appendChild(o);var r=t.overlay?this.Yi:this.Ti;return r.appendChild(n),this.wi(),n},ri:function(){var t,i,n,e=this.ei.getElementsByTagName("input"),o=[],s=[];this.qi=!0;for(var r=e.length-1;r>=0;r--)t=e[r],i=this._getLayer(t.layerId).layer,n=this.jE.hasLayer(i),t.checked&&!n?o.push(i):!t.checked&&n&&s.push(i);for(r=0;r=0;o--)t=n[o],i=this._getLayer(t.layerId).layer,t.disabled=void 0!==i.options.minZoom&&ei.options.maxZoom},Ii:function(){return this.expand()},ii:function(){return this.collapse()}}),T.oI.layers=function(t,i,n){return new T.Control.MI(t,i,n)},T.Control.MapType=T.Control.extend({includes:T.iQ.OQ,options:{position:T_ANCHOR_TOP_RIGHT,behavior:"previous",expand:"horizontal",_I:!0,maxLayersInRow:5,manageLayers:!0},initialize:function(t,i){T.S.l(arguments[0])||(i=t,this.Oi(),t=T.w.oi),T.setOptions(this,i),this._expandDirection=this.options.position.indexOf("left")!=-1?"right":"left",this.options.manageLayers&&this.on("activelayerchange",this.Pi,this),this.pi(t)},Oi:function(){T.w.oi=[{title:"地图",icon:T.Icon.Default.imagePath+"/map/maptype/vector.png",layer:TMAP_NORMAL_MAP},{title:"卫星",icon:T.Icon.Default.imagePath+"/map/maptype/satellite.png",layer:TMAP_SATELLITE_MAP},{title:"卫星混合",icon:T.Icon.Default.imagePath+"/map/maptype/satellitepoi.png",layer:TMAP_HYBRID_MAP},{title:"地形",icon:T.Icon.Default.imagePath+"/map/maptype/terrain.png",layer:TMAP_TERRAIN_MAP},{title:"地形混合",icon:T.Icon.Default.imagePath+"/map/maptype/terrainpoi.png",layer:TMAP_TERRAIN_HYBRID_MAP}]},onAdd:function(t){return this.Ow=T._Q.s("div","tdt-iconLayers"),T._Q.Rq(this.Ow,"tdt-iconLayers_"+this.options.position),this.Ai(),t.on("click",this.collapse,this),this.options.manageLayers&&this.Pi(),this.Ow},onRemove:function(t){t.off("click",this.collapse,this)},pi:function(t){this.hW={},t.map(function(t){var i=T.d(t.layer);this.hW[i]=T.extend(t,{id:i})}.D(this)),this.Ow&&this.Ai()},ai:function(t){var i=t&&this.hW[T.d(t)];i&&i.id!==this._activeLayerId&&(this._previousLayerId=this._activeLayerId,this._activeLayerId=i.id,this.Ow&&this.Ai(),this.wQ("activelayerchange",{layer:t}))},expand:function(){this.Si().slice(1).map(function(t){var i=this.si(t.id);T._Q.Tq(i,"tdt-iconLayers-layerCell_hidden")}.D(this))},collapse:function(){this.Si().slice(1).map(function(t){var i=this.si(t.id);T._Q.Rq(i,"tdt-iconLayers-layerCell_hidden")}.D(this))},Di:function(){return this._activeLayerId?this.hW[this._activeLayerId]:length(this.hW)?first(this.hW):null},di:function(){var t=this.Di();return t?this._previousLayerId?this.hW[this._previousLayerId]:find(this.hW,function(i){return i.id!==t.id}.D(this))||null:null},Fi:function(){var t=[],i=this.Di()?this.Di().id:null,n=this.di()?this.di().id:null;return each(this.hW,function(e){e.id!==i&&e.id!==n&&t.push(e)}),t},Si:function(){var t={};return t.previous=function(){var t=this.Fi();return this.Di()&&t.unshift(this.Di()),this.di()&&t.unshift(this.di()),t},t[this.options.behavior].apply(this,arguments)},si:function(t){if("Microsoft Internet Explorer"!=navigator.appName||"MSIE8.0"!=navigator.appVersion.split(";")[1].replace(new RegExp("[ ]","g"),""))var i=this.Ow.getElementsByClassName("tdt-iconLayers-layerCell");else var i=document.getElementsByClassName("tdt-iconLayers-layerCell",this.Ow);for(var n=0;n>>0;if("[object Function]"!=Object.prototype.toString.call(t))throw new TypeError(t+" is not a function");for(i&&(n=i),e=new Array(r),o=0;o=0&&this.QO()},qO:function(){return!this.Ow.getElementsByClassName("tdt-zoom-animated").length},Bi:function(t,i,n){if(this.ER)return!0;if(n=n||{},!this.ZE||n.Tw===!1||this.qO()||Math.abs(i-this.fW)>this.options.Mi)return!1;var e=this.cW(i),o=this.dE(t).FQ(1-1/e);return!(n.Tw!==!0&&!this.getSize().contains(o))&&(T.S.C(function(){this.qE(!0).ge(t,i,!0)},this),!0)},ge:function(t,i,n,e){n&&(this.ER=!0,this.WO=t,this.RR=i,T._Q.Rq(this.ow,"tdt-zoom-anim")),this.wQ("Ge",{center:t,zoom:i,noUpdate:e}),setTimeout(T.D(this.QO,this),250)},QO:function(){this.ER&&(T._Q.Tq(this.ow,"tdt-zoom-anim"),this.ER=!1,this.QE(this.WO,this.RR),T.S.C(function(){this.mw(!0)},this))}}:{}),T.Map.M({enableContinuousZoom:function(){this.options.Mi=4},disableContinuousZoom:function(){this.options.Mi=0},isContinuousZoom:function(){return 4==this.options.Mi}}),T.Map.M({Ne:function(t,i,n){function e(t){var i=t?-1:1,n=t?v:m,e=v*v-m*m+i*g*g*w*w,o=2*n*g*w,s=e/o,r=Math.sqrt(s*s+1)-s,h=r<1e-9?-18:Math.log(r);return h}function o(t){return(Math.exp(t)-Math.exp(-t))/2}function s(t){return(Math.exp(t)+Math.exp(-t))/2}function r(t){return o(t)/s(t)}function h(t){return m*(s(E)/s(E+y*t))}function a(t){return m*(s(E)*r(E+y*t)-o(E))/g}function u(t){return 1-Math.pow(1-t,1.5)}function c(){var n=(Date.now()-Q)/x,e=u(n)*q;n<=1?(this.wE=T.S.C(c,this),this.QE(this._q(l.AQ(f.sQ(l).fQ(a(e)/w)),p),this.gw(m/h(e),p),{Ne:!0})):this.QE(t,i).mw(!0)}if(n=n||{},n.Tw===!1||!T.oQ.any3d)return this.gW(t,i,n);this.Iw();var l=this.nq(this.getCenter()),f=this.nq(t),d=this.getSize(),p=this.fW;t=T.fq(t),i=void 0===i?p:i;var m=Math.max(d.x,d.y),v=m*this.cW(p,i),w=f.distanceTo(l)||1,y=1.42,g=y*y,E=e(0),Q=Date.now(),q=(e(1)-E)/y,x=n.duration?10*n.duration:10*q*.8;return this.qE(!0),c.call(this),this},wO:function(t,i){var n=this.NW(t,i);return this.Ne(n.center,n.zoom,i)}}),T.Map.M({EO:{eO:1e4,watch:!1},RO:function(t){if(t=this.rO=T.extend({},this.EO,t),!("geolocation"in navigator))return this.TO({code:0,message:"tO"}),this;var i=T.D(this.YO,this),n=T.D(this.TO,this);return t.watch?this.UO=navigator.geolocation.watchPosition(i,n,t):navigator.geolocation.getCurrentPosition(i,n,t),this},uO:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this.UO),this.rO&&(this.rO.gW=!1),this},TO:function(t){var i=t.code,n=t.message||(1===i?"IO":2===i?"iO":"eO");this.rO.gW&&!this.CW&&this.mW(),this.wQ("OO",{code:i,message:"oO"+n+"."})},YO:function(t){var i=t.coords.latitude,n=t.coords.longitude,e=new T.dq(i,n),o=e.Jq(t.coords.accuracy),s=this.rO;if(s.gW){var r=this.nW(o);this.gW(e,s.maxZoom?Math.min(r,s.maxZoom):r)}var h={KT:e,bounds:o,PO:t.PO};for(var a in t.coords)"number"==typeof t.coords[a]&&(h[a]=t.coords[a]);this.wQ("pO",h)}});for(var n=0;n