diff --git a/build/build.js b/build/build.js index 7f4fb48e..54cadc8d 100644 --- a/build/build.js +++ b/build/build.js @@ -43,8 +43,8 @@ exports.uglify = function (code) { var pro = uglifyjs.uglify; var ast = uglifyjs.parser.parse(code); - ast = pro.ast_mangle(ast); - ast = pro.ast_squeeze(ast, {keep_comps: false}); + ast = pro.ast_mangle(ast, {mangle: true}); + ast = pro.ast_squeeze(ast); ast = pro.ast_squeeze_more(ast); return pro.gen_code(ast) + ';'; @@ -53,7 +53,7 @@ exports.uglify = function (code) { exports.combineFiles = function (files) { var content = '(function () {\n\n'; for (var i = 0, len = files.length; i < len; i++) { - content += fs.readFileSync(files[i], 'utf8') + '\r\n\r\n'; + content += fs.readFileSync(files[i], 'utf8') + '\n\n'; } return content + '\n\n}());'; }; diff --git a/dist/leaflet-src.js b/dist/leaflet-src.js index 5d494be0..979f8891 100644 --- a/dist/leaflet-src.js +++ b/dist/leaflet-src.js @@ -5351,6 +5351,7 @@ L.Handler.PolyEdit = L.Handler.extend({ if (marker._middleRight) { this._markerGroup.removeLayer(marker._middleRight); } + this._markers.splice(i, 1); this._poly.spliceLatLngs(i, 1); this._updateIndexes(i, -1); this._poly.fire('edit'); diff --git a/dist/leaflet.js b/dist/leaflet.js index aa55bb4b..a7e189fb 100644 --- a/dist/leaflet.js +++ b/dist/leaflet.js @@ -3,4 +3,4 @@ Leaflet is a modern open-source JavaScript library for interactive maps. http://leaflet.cloudmade.com */ -(function(){var a,b;typeof exports!="undefined"?a=exports:(a={},b=window.L,a.noConflict=function(){return window.L=b,a},window.L=a),a.version="0.4",a.Util={extend:function(a){var b=Array.prototype.slice.call(arguments,1);for(var c=0,d=b.length,e;c2?Array.prototype.slice.call(arguments,2):null;return function(){return a.apply(b,c||arguments)}},stamp:function(){var a=0,b="_leaflet_id";return function(c){return c[b]=c[b]||++a,c[b]}}(),requestAnimFrame:function(){function b(a){window.setTimeout(a,1e3/60)}var c=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||b;return function(d,e,f,g){d=e?a.Util.bind(d,e):d;if(!f||c!==b)return c.call(window,d,g);d()}}(),cancelAnimFrame:function(){var a=window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||clearTimeout;return function(b){if(!b)return;return a.call(window,b)}}(),limitExecByInterval:function(a,b,c){var d,e;return function f(){var g=arguments;if(d){e=!0;return}d=!0,setTimeout(function(){d=!1,e&&(f.apply(c,g),e=!1)},b),a.apply(c,g)}},falseFn:function(){return!1},formatNum:function(a,b){var c=Math.pow(10,b||5);return Math.round(a*c)/c},setOptions:function(b,c){return b.options=a.Util.extend({},b.options,c),b.options},getParamString:function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c+"="+a[c]);return"?"+b.join("&")},template:function(a,b){return a.replace(/\{ *([\w_]+) *\}/g,function(a,c){var d=b[c];if(!b.hasOwnProperty(c))throw Error("No value provided for variable "+a);return d})},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},a.Class=function(){},a.Class.extend=function(b){var c=function(){this.initialize&&this.initialize.apply(this,arguments)},d=function(){};d.prototype=this.prototype;var e=new d;e.constructor=c,c.prototype=e;for(var f in this)this.hasOwnProperty(f)&&f!=="prototype"&&(c[f]=this[f]);return b.statics&&(a.Util.extend(c,b.statics),delete b.statics),b.includes&&(a.Util.extend.apply(null,[e].concat(b.includes)),delete b.includes),b.options&&e.options&&(b.options=a.Util.extend({},e.options,b.options)),a.Util.extend(e,b),c},a.Class.include=function(b){a.Util.extend(this.prototype,b)},a.Class.mergeOptions=function(b){a.Util.extend(this.prototype.options,b)},a.Mixin={},a.Mixin.Events={addEventListener:function(a,b,c){var d=this._leaflet_events=this._leaflet_events||{};return d[a]=d[a]||[],d[a].push({action:b,context:c||this}),this},hasEventListeners:function(a){var b="_leaflet_events";return b in this&&a in this[b]&&this[b][a].length>0},removeEventListener:function(a,b,c){if(!this.hasEventListeners(a))return this;for(var d=0,e=this._leaflet_events,f=e[a].length;d=this.min.x&&d.x<=this.max.x&&c.y>=this.min.y&&d.y<=this.max.y},intersects:function(a){var b=this.min,c=this.max,d=a.min,e=a.max,f=e.x>=b.x&&d.x<=c.x,g=e.y>=b.y&&d.y<=c.y;return f&&g}}),a.Transformation=a.Class.extend({initialize:function(a,b,c,d){this._a=a,this._b=b,this._c=c,this._d=d},transform:function(a,b){return this._transform(a.clone(),b)},_transform:function(a,b){return b=b||1,a.x=b*(this._a*a.x+this._b),a.y=b*(this._c*a.y+this._d),a},untransform:function(b,c){return c=c||1,new a.Point((b.x/c-this._b)/this._a,(b.y/c-this._d)/this._c)}}),a.DomUtil={get:function(a){return typeof a=="string"?document.getElementById(a):a},getStyle:function(a,b){var c=a.style[b];!c&&a.currentStyle&&(c=a.currentStyle[b]);if(!c||c==="auto"){var d=document.defaultView.getComputedStyle(a,null);c=d?d[b]:null}return c==="auto"?null:c},getViewportOffset:function(b){var c=0,d=0,e=b,f=document.body;do{c+=e.offsetTop||0,d+=e.offsetLeft||0;if(e.offsetParent===f&&a.DomUtil.getStyle(e,"position")==="absolute")break;if(a.DomUtil.getStyle(e,"position")==="fixed"){c+=f.scrollTop||0,d+=f.scrollLeft||0;break}e=e.offsetParent}while(e);e=b;do{if(e===f)break;c-=e.scrollTop||0,d-=e.scrollLeft||0,e=e.parentNode}while(e);return new a.Point(d,c)},create:function(a,b,c){var d=document.createElement(a);return d.className=b,c&&c.appendChild(d),d},disableTextSelection:function(){document.selection&&document.selection.empty&&document.selection.empty(),this._onselectstart||(this._onselectstart=document.onselectstart,document.onselectstart=a.Util.falseFn)},enableTextSelection:function(){document.onselectstart=this._onselectstart,this._onselectstart=null},hasClass:function(a,b){return a.className.length>0&&RegExp("(^|\\s)"+b+"(\\s|$)").test(a.className)},addClass:function(b,c){a.DomUtil.hasClass(b,c)||(b.className+=(b.className?" ":"")+c)},removeClass:function(a,b){a.className=a.className.replace(/(\S+)\s*/g,function(a,c){return c===b?"":a}).replace(/^\s+/,"")},setOpacity:function(b,c){a.Browser.ie?b.style.filter+=c!==1?"alpha(opacity="+Math.round(c*100)+")":"":b.style.opacity=c},testProp:function(a){var b=document.documentElement.style;for(var c=0;c=c.lat&&f.lat<=d.lat&&e.lng>=c.lng&&f.lng<=d.lng},intersects:function(a){var b=this._southWest,c=this._northEast,d=a.getSouthWest(),e=a.getNorthEast(),f=e.lat>=b.lat&&d.lat<=c.lat,g=e.lng>=b.lng&&d.lng<=c.lng;return f&&g},toBBoxString:function(){var a=this._southWest,b=this._northEast;return[a.lng,a.lat,b.lng,b.lat].join(",")},equals:function(a){return a?this._southWest.equals(a.getSouthWest())&&this._northEast.equals(a.getNorthEast()):!1}}),a.Projection={},a.Projection.SphericalMercator={MAX_LATITUDE:85.0511287798,project:function(b){var c=a.LatLng.DEG_TO_RAD,d=this.MAX_LATITUDE,e=Math.max(Math.min(d,b.lat),-d),f=b.lng*c,g=e*c;return g=Math.log(Math.tan(Math.PI/4+g/2)),new a.Point(f,g)},unproject:function(b,c){var d=a.LatLng.RAD_TO_DEG,e=b.x*d,f=(2*Math.atan(Math.exp(b.y))-Math.PI/2)*d;return new a.LatLng(f,e,c)}},a.Projection.LonLat={project:function(b){return new a.Point(b.lng,b.lat)},unproject:function(b,c){return new a.LatLng(b.y,b.x,c)}},a.CRS={latLngToPoint:function(a,b){var c=this.projection.project(a),d=this.scale(b);return this.transformation._transform(c,d)},pointToLatLng:function(a,b,c){var d=this.scale(b),e=this.transformation.untransform(a,d);return this.projection.unproject(e,c)},project:function(a){return this.projection.project(a)},scale:function(a){return 256*Math.pow(2,a)}},a.CRS.EPSG3857=a.Util.extend({},a.CRS,{code:"EPSG:3857",projection:a.Projection.SphericalMercator,transformation:new a.Transformation(.5/Math.PI,.5,-0.5/Math.PI,.5),project:function(a){var b=this.projection.project(a),c=6378137;return b.multiplyBy(c)}}),a.CRS.EPSG900913=a.Util.extend({},a.CRS.EPSG3857,{code:"EPSG:900913"}),a.CRS.EPSG4326=a.Util.extend({},a.CRS,{code:"EPSG:4326",projection:a.Projection.LonLat,transformation:new a.Transformation(1/360,.5,-1/360,.5)}),a.Map=a.Class.extend({includes:a.Mixin.Events,options:{crs:a.CRS.EPSG3857,fadeAnimation:a.DomUtil.TRANSITION&&!a.Browser.android,trackResize:!0},initialize:function(b,c){c=a.Util.setOptions(this,c),this._initContainer(b),this._initLayout(),this._initHooks(),this._initEvents(),c.maxBounds&&this.setMaxBounds(c.maxBounds),c.center&&typeof c.zoom!="undefined"&&this.setView(c.center,c.zoom,!0),this._initLayers(c.layers)},setView:function(a,b){return this._resetView(a,this._limitZoom(b)),this},setZoom:function(a){return this.setView(this.getCenter(),a)},zoomIn:function(){return this.setZoom(this._zoom+1)},zoomOut:function(){return this.setZoom(this._zoom-1)},fitBounds:function(a){var b=this.getBoundsZoom(a);return this.setView(a.getCenter(),b)},fitWorld:function(){var b=new a.LatLng(-60,-170),c=new a.LatLng(85,179);return this.fitBounds(new a.LatLngBounds(b,c))},panTo:function(a){return this.setView(a,this._zoom)},panBy:function(a){return this.fire("movestart"),this._rawPanBy(a),this.fire("move"),this.fire("moveend")},setMaxBounds:function(a){this.options.maxBounds=a;if(!a)return this._boundsMinZoom=null,this;var b=this.getBoundsZoom(a,!0);return this._boundsMinZoom=b,this._loaded&&(this._zoomg.x&&(h=g.x-e.x),d.y>f.y&&(i=f.y-d.y),d.xm&&--n>0)p=i*Math.sin(k),o=Math.PI/2-2*Math.atan(j*Math.pow((1-p)/(1+p),.5*i))-k,k+=o;return new a.LatLng(k*d,g,c)}},a.CRS.EPSG3395=a.Util.extend({},a.CRS,{code:"EPSG:3395",projection:a.Projection.Mercator,transformation:function(){var b=a.Projection.Mercator,c=b.R_MAJOR,d=b.R_MINOR;return new a.Transformation(.5/(Math.PI*c),.5,-0.5/(Math.PI*d),.5)}()}),a.TileLayer=a.Class.extend({includes:a.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",opacity:1,scheme:"xyz",continuousWorld:!1,noWrap:!1,zoomOffset:0,zoomReverse:!1,detectRetina:!1,unloadInvisibleTiles:a.Browser.mobile,updateWhenIdle:a.Browser.mobile,reuseTiles:!1},initialize:function(b,c){c=a.Util.setOptions(this,c),c.detectRetina&&window.devicePixelRatio>1&&c.maxZoom>0&&(c.tileSize=Math.floor(c.tileSize/2),c.zoomOffset++,c.minZoom>0&&c.minZoom--,this.options.maxZoom--),this._url=b;var d=this.options.subdomains;typeof d=="string"&&(this.options.subdomains=d.split(""))},onAdd:function(b,c){this._map=b,this._insertAtTheBottom=c,this._initContainer(),this._createTileProto(),b.on("viewreset",this._resetCallback,this),b.on("moveend",this._update,this),this.options.updateWhenIdle||(this._limitedUpdate=a.Util.limitExecByInterval(this._update,150,this),b.on("move",this._limitedUpdate,this)),this._reset(),this._update()},onRemove:function(a){a._panes.tilePane.removeChild(this._container),a.off("viewreset",this._resetCallback,this),a.off("moveend",this._update,this),this.options.updateWhenIdle||a.off("move",this._limitedUpdate,this),this._container=null,this._map=null},getAttribution:function(){return this.options.attribution},setOpacity:function(b){this.options.opacity=b,this._map&&this._updateOpacity();var c,d=this._tiles;if(a.Browser.webkit)for(c in d)d.hasOwnProperty(c)&&(d[c].style.webkitTransform+=" translate(0,0)")},_updateOpacity:function(){a.DomUtil.setOpacity(this._container,this.options.opacity)},_initContainer:function(){var b=this._map._panes.tilePane,c=b.firstChild;if(!this._container||b.empty)this._container=a.DomUtil.create("div","leaflet-layer"),this._insertAtTheBottom&&c?b.insertBefore(this._container,c):b.appendChild(this._container),this.options.opacity<1&&this._updateOpacity()},_resetCallback:function(a){this._reset(a.hard)},_reset:function(a){var b,c=this._tiles;for(b in c)c.hasOwnProperty(b)&&this.fire("tileunload",{tile:c[b]});this._tiles={},this.options.reuseTiles&&(this._unusedTiles=[]),a&&this._container&&(this._container.innerHTML=""),this._initContainer()},_update:function(b){if(this._map._panTransition&&this._map._panTransition._inProgress)return;var c=this._map.getPixelBounds(),d=this._map.getZoom(),e=this.options.tileSize;if(d>this.options.maxZoom||da.max.x||da.max.y)&&this._removeTile(e))},_removeTile:function(b){var c=this._tiles[b];this.fire("tileunload",{tile:c,url:c.src}),c.parentNode===this._container&&this._container.removeChild(c),this.options.reuseTiles&&this._unusedTiles.push(c),c.src=a.Util.emptyImageUrl,delete this._tiles[b]},_addTile:function(b,c){var d=this._getTilePos(b),e=this._map.getZoom(),f=b.x+":"+b.y,g=Math.pow(2,this._getOffsetZoom(e));if(!this.options.continuousWorld){if(!this.options.noWrap)b.x=(b.x%g+g)%g;else if(b.x<0||b.x>=g){this._tilesToLoad--;return}if(b.y<0||b.y>=g){this._tilesToLoad--;return}}var h=this._getTile();a.DomUtil.setPosition(h,d),this._tiles[f]=h,this.options.scheme==="tms"&&(b.y=g-b.y-1),this._loadTile(h,b,e),c.appendChild(h)},_getOffsetZoom:function(a){var b=this.options;return a=b.zoomReverse?b.maxZoom-a:a,a+b.zoomOffset},_getTilePos:function(a){var b=this._map.getPixelOrigin(),c=this.options.tileSize;return a.multiplyBy(c).subtract(b)},getTileUrl:function(b,c){var d=this.options.subdomains,e=(b.x+b.y)%d.length,f=this.options.subdomains[e];return a.Util.template(this._url,a.Util.extend({s:f,z:this._getOffsetZoom(c),x:b.x,y:b.y},this.options))},_createTileProto:function(){var b=this._tileImg=a.DomUtil.create("img","leaflet-tile");b.galleryimg="no";var c=this.options.tileSize;b.style.width=c+"px",b.style.height=c+"px"},_getTile:function(){if(this.options.reuseTiles&&this._unusedTiles.length>0){var a=this._unusedTiles.pop();return this._resetTile(a),a}return this._createTile()},_resetTile:function(a){},_createTile:function(){var b=this._tileImg.cloneNode(!1);return b.onselectstart=b.onmousemove=a.Util.falseFn,b},_loadTile:function(a,b,c){a._layer=this,a.onload=this._tileOnLoad,a.onerror=this._tileOnError,a.src=this.getTileUrl(b,c)},_tileLoaded:function(){this._tilesToLoad--,this._tilesToLoad||this.fire("load")},_tileOnLoad:function(a){var b=this._layer;this.className+=" leaflet-tile-loaded",b.fire("tileload",{tile:this,url:this.src}),b._tileLoaded()},_tileOnError:function(a){var b=this._layer;b.fire("tileerror",{tile:this,url:this.src});var c=b.options.errorTileUrl;c&&(this.src=c),b._tileLoaded()}}),a.TileLayer.WMS=a.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},initialize:function(b,c){this._url=b;var d=a.Util.extend({},this.defaultWmsParams);d.width=d.height=this.options.tileSize;for(var e in c)this.options.hasOwnProperty(e)||(d[e]=c[e]);this.wmsParams=d,a.Util.setOptions(this,c)},onAdd:function(b,c){var d=parseFloat(this.wmsParams.version)<1.3?"srs":"crs";this.wmsParams[d]=b.options.crs.code,a.TileLayer.prototype.onAdd.call(this,b,c)},getTileUrl:function(b,c){var d=this._map,e=d.options.crs,f=this.options.tileSize,g=b.multiplyBy(f),h=g.add(new a.Point(f,f)),i=d.unproject(g,c,!0),j=d.unproject(h,c,!0),k=e.project(i),l=e.project(j),m=[k.x,l.y,l.x,k.y].join(",");return this._url+a.Util.getParamString(this.wmsParams)+"&bbox="+m}}),a.TileLayer.Canvas=a.TileLayer.extend({options:{async:!1},initialize:function(b){a.Util.setOptions(this,b)},redraw:function(){var a,b=this._tiles;for(a in b)b.hasOwnProperty(a)&&this._redrawTile(b[a])},_redrawTile:function(a){this.drawTile(a,a._tilePoint,a._zoom)},_createTileProto:function(){var b=this._canvasProto=a.DomUtil.create("canvas","leaflet-tile"),c=this.options.tileSize;b.width=c,b.height=c},_createTile:function(){var b=this._canvasProto.cloneNode(!1);return b.onselectstart=b.onmousemove=a.Util.falseFn,b},_loadTile:function(a,b,c){a._layer=this,a._tilePoint=b,a._zoom=c,this.drawTile(a,b,c),this.options.async||this.tileDrawn(a)},drawTile:function(a,b,c){},tileDrawn:function(a){this._tileOnLoad.call(a)}}),a.ImageOverlay=a.Class.extend({includes:a.Mixin.Events,initialize:function(a,b){this._url=a,this._bounds=b},onAdd:function(a){this._map=a,this._image||this._initImage(),a._panes.overlayPane.appendChild(this._image),a.on("viewreset",this._reset,this),this._reset()},onRemove:function(a){a.getPanes().overlayPane.removeChild(this._image),a.off("viewreset",this._reset,this)},_initImage:function(){this._image=a.DomUtil.create("img","leaflet-image-layer"),this._image.style.visibility="hidden",a.Util.extend(this._image,{galleryimg:"no",onselectstart:a.Util.falseFn,onmousemove:a.Util.falseFn,onload:a.Util.bind(this._onImageLoad,this),src:this._url})},_reset:function(){var b=this._image,c=this._map.latLngToLayerPoint(this._bounds.getNorthWest()),d=this._map.latLngToLayerPoint(this._bounds.getSouthEast()).subtract(c);a.DomUtil.setPosition(b,c),b.style.width=d.x+"px",b.style.height=d.y+"px"},_onImageLoad:function(){this._image.style.visibility="",this.fire("load")}}),a.Icon=a.Class.extend({options:{className:""},initialize:function(b){a.Util.setOptions(this,b)},createIcon:function(){return this._createIcon("icon")},createShadow:function(){return this._createIcon("shadow")},_createIcon:function(a){var b=this._getIconUrl(a);if(!b)return null;var c=this._createImg(b);return this._setIconStyles(c,a),c},_setIconStyles:function(a,b){var c=this.options,d=c[b+"Size"],e=c.iconAnchor;!e&&d&&(e=d.divideBy(2,!0)),b==="shadow"&&e&&c.shadowOffset&&e._add(c.shadowOffset),a.className="leaflet-marker-"+b+" "+c.className,e&&(a.style.marginLeft=-e.x+"px",a.style.marginTop=-e.y+"px"),d&&(a.style.width=d.x+"px",a.style.height=d.y+"px")},_createImg:function(b){var c;return a.Browser.ie6?(c=document.createElement("div"),c.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+b+'")'):(c=document.createElement("img"),c.src=b),c},_getIconUrl:function(a){return this.options[a+"Url"]}}),a.Icon.Default=a.Icon.extend({options:{iconSize:new a.Point(25,41),iconAnchor:new a.Point(13,41),popupAnchor:new a.Point(0,-33),shadowSize:new a.Point(41,41)},_getIconUrl:function(b){var c=a.Icon.Default.imagePath;if(!c)throw Error("Couldn't autodetect L.Icon.Default.imagePath, set it manually.");return c+"/marker-"+b+".png"}}),a.Icon.Default.imagePath=function(){var a=document.getElementsByTagName("script"),b=/\/?leaflet[\-\._]?([\w\-\._]*)\.js\??/,c,d,e,f;for(c=0,d=a.length;cd?(a.style.height=d+"px",a.className+=e):a.className=a.className.replace(e,""),this._containerWidth=this._container.offsetWidth},_updatePosition:function(){var a=this._map.latLngToLayerPoint(this._latlng);this._containerBottom=-a.y-this.options.offset.y,this._containerLeft=a.x-Math.round(this._containerWidth/2)+this.options.offset.x,this._container.style.bottom=this._containerBottom+"px",this._container.style.left=this._containerLeft+"px"},_adjustPan:function(){if(!this.options.autoPan)return;var b=this._map,c=this._container.offsetHeight,d=this._containerWidth,e=new a.Point(this._containerLeft,-c-this._containerBottom),f=b.layerPointToContainerPoint(e),g=new a.Point(0,0),h=this.options.autoPanPadding,i=b.getSize();f.x<0&&(g.x=f.x-h.x),f.x+d>i.x&&(g.x=f.x+d-i.x+h.x),f.y<0&&(g.y=f.y-h.y),f.y+c>i.y&&(g.y=f.y+c-i.y+h.y),(g.x||g.y)&&b.panBy(g)},_onCloseButtonClick:function(b){this._close(),a.DomEvent.stop(b)}}),a.Marker.include({openPopup:function(){return this._popup&&this._map&&(this._popup.setLatLng(this._latlng),this._map.openPopup(this._popup)),this},closePopup:function(){return this._popup&&this._popup._close(),this},bindPopup:function(b,c){var d=this.options.icon.options.popupAnchor||new a.Point(0,0);return c&&c.offset&&(d=d.add(c.offset)),c=a.Util.extend({offset:d},c),this._popup||this.on("click",this.openPopup,this),this._popup=(new a.Popup(c,this)).setContent(b),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this.openPopup)),this}}),a.Map.include({openPopup:function(a){return this.closePopup(),this._popup=a,this.addLayer(a).fire("popupopen",{popup:this._popup})},closePopup:function(){return this._popup&&this._popup._close(),this}}),a.LayerGroup=a.Class.extend({initialize:function(a){this._layers={};var b,c;if(a)for(b=0,c=a.length;b';var b=a.firstChild;return b.style.behavior="url(#default#VML)",b&&typeof b.adj=="object"}(),a.Path=a.Browser.svg||!a.Browser.vml?a.Path:a.Path.extend({statics:{VML:!0,CLIP_PADDING:.02},_createElement:function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(a){return document.createElement("')}}catch(a){return function(a){return document.createElement("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_initPath:function(){var a=this._container=this._createElement("shape");a.className+=" leaflet-vml-shape"+(this.options.clickable?" leaflet-clickable":""),a.coordsize="1 1",this._path=this._createElement("path"),a.appendChild(this._path),this._map._pathRoot.appendChild(a)},_initStyle:function(){var a=this._container,b,c;this.options.stroke&&(b=this._stroke=this._createElement("stroke"),b.endcap="round",a.appendChild(b)),this.options.fill&&(c=this._fill=this._createElement("fill"),a.appendChild(c)),this._updateStyle()},_updateStyle:function(){var a=this._stroke,b=this._fill,c=this.options,d=this._container;d.stroked=c.stroke,d.filled=c.fill,c.stroke&&(a.weight=c.weight+"px",a.color=c.color,a.opacity=c.opacity),c.fill&&(b.color=c.fillColor||c.color,b.opacity=c.fillOpacity)},_updatePath:function(){var a=this._container.style;a.display="none",this._path.v=this.getPathString()+" ",a.display=""}}),a.Map.include(a.Browser.svg||!a.Browser.vml?{}:{_initPathRoot:function(){if(this._pathRoot)return;var a=this._pathRoot=document.createElement("div");a.className="leaflet-vml-container",this._panes.overlayPane.appendChild(a),this.on("moveend",this._updatePathViewport),this._updatePathViewport()}}),a.Browser.canvas=function(){return!!document.createElement("canvas").getContext}(),a.Path=a.Path.SVG&&!window.L_PREFER_CANVAS||!a.Browser.canvas?a.Path:a.Path.extend({statics:{CANVAS:!0,SVG:!1},_initElements:function(){this._map._initPathRoot(),this._ctx=this._map._canvasCtx},_updateStyle:function(){var a=this.options;a.stroke&&(this._ctx.lineWidth=a.weight,this._ctx.strokeStyle=a.color),a.fill&&(this._ctx.fillStyle=a.fillColor||a.color)},_drawPath:function(){var b,c,d,e,f,g;this._ctx.beginPath();for(b=0,d=this._parts.length;bf&&(g=h,f=i);f>c&&(b[g]=1,this._simplifyDPStep(a,b,c,d,g),this._simplifyDPStep(a,b,c,g,e))},_reducePoints:function(a,b){var c=[a[0]];for(var d=1,e=0,f=a.length;db&&(c.push(a[d]),e=d);return eb.max.x&&(c|=2),a.yb.max.y&&(c|=8),c},_sqDist:function(a,b){var c=b.x-a.x,d=b.y-a.y;return c*c+d*d},_sqClosestPointOnSegment:function(b,c,d,e){var f=c.x,g=c.y,h=d.x-f,i=d.y-g,j=h*h+i*i,k;return j>0&&(k=((b.x-f)*h+(b.y-g)*i)/j,k>1?(f=d.x,g=d.y):k>0&&(f+=h*k,g+=i*k)),h=b.x-f,i=b.y-g,e?h*h+i*i:new a.Point(f,g)}},a.Polyline=a.Path.extend({initialize:function(b,c){a.Path.prototype.initialize.call(this,c),this._latlngs=b,a.Handler.PolyEdit&&(this.editing=new a.Handler.PolyEdit(this),this.options.editable&&this.editing.enable())},options:{smoothFactor:1,noClip:!1},projectLatlngs:function(){this._originalPoints=[];for(var a=0,b=this._latlngs.length;aa.max.x||c.y-b>a.max.y||c.x+bb.y!=f.y>b.y&&b.x<(f.x-e.x)*(b.y-e.y)/(f.y-e.y)+e.x&&(c=!c)}return c}}:{}),a.Circle.include(a.Path.CANVAS?{_drawPath:function(){var a=this._point;this._ctx.beginPath(),this._ctx.arc(a.x,a.y,this._radius,0,Math.PI*2,!1)},_containsPoint:function(a){var b=this._point,c=this.options.stroke?this.options.weight/2:0;return a.distanceTo(b)<=this._radius+c}}:{}),a.GeoJSON=a.FeatureGroup.extend({initialize:function(b,c){a.Util.setOptions(this,c),this._geojson=b,this._layers={},b&&this.addGeoJSON(b)},addGeoJSON:function(b){var c=b.features,d,e;if(c){for(d=0,e=c.length;d1){this._simulateClick=!1;return}var c=b.touches&&b.touches.length===1?b.touches[0]:b,d=c.target;a.DomEvent.preventDefault(b),a.Browser.touch&&d.tagName.toLowerCase()==="a"&&(d.className+=" leaflet-active"),this._moved=!1;if(this._moving)return;a.Browser.touch||(a.DomUtil.disableTextSelection(),this._setMovingCursor()),this._startPos=this._newPos=a.DomUtil.getPosition(this._element),this._startPoint=new a.Point(c.clientX,c.clientY),a.DomEvent.addListener(document,a.Draggable.MOVE,this._onMove,this),a.DomEvent.addListener(document,a.Draggable.END,this._onUp,this)},_onMove:function(b){if(b.touches&&b.touches.length>1)return;a.DomEvent.preventDefault(b);var c=b.touches&&b.touches.length===1?b.touches[0]:b;this._moved||(this.fire("dragstart"),this._moved=!0),this._moving=!0;var d=new a.Point(c.clientX,c.clientY);this._newPos=this._startPos.add(d).subtract(this._startPoint),a.Util.cancelAnimFrame(this._animRequest),this._animRequest=a.Util.requestAnimFrame(this._updatePosition,this,!0,this._dragStartTarget)},_updatePosition:function(){this.fire("predrag"),a.DomUtil.setPosition(this._element,this._newPos),this.fire("drag")},_onUp:function(b){if(this._simulateClick&&b.changedTouches){var c=b.changedTouches[0],d=c.target,e=this._newPos&&this._newPos.distanceTo(this._startPos)||0;d.tagName.toLowerCase()==="a"&&(d.className=d.className.replace(" leaflet-active","")),e200&&(this._positions.shift(),this._times.shift())}this._map.fire("move").fire("drag")},_onViewReset:function(){var b=this._map.getSize().divideBy(2),c=this._map.latLngToLayerPoint(new a.LatLng(0,0));this._initialWorldOffset=c.subtract(b)},_onPreDrag:function(){var a=this._map,b=a.options.crs.scale(a.getZoom()),c=Math.round(b/2),d=this._initialWorldOffset.x,e=this._draggable._newPos.x,f=(e-c+d)%b+c-d,g=(e+c+d)%b-c-d,h=Math.abs(f+d)c.inertiaThreshold||typeof this._positions[0]=="undefined";if(e)b.fire("moveend");else{var f=this._lastPos.subtract(this._positions[0]),g=(this._lastTime+d-this._times[0])/1e3,h=f.multiplyBy(.58/g),i=h.distanceTo(new a.Point(0,0)),j=Math.min(c.inertiaMaxSpeed,i),k=h.multiplyBy(j/i),l=j/c.inertiaDeceleration,m=k.multiplyBy(-l/2).round(),n={duration:l,easing:"ease-out"};a.Util.requestAnimFrame(a.Util.bind(function(){this._map.panBy(m,n)},this))}b.fire("dragend"),c.maxBounds&&a.Util.requestAnimFrame(this._panInsideMaxBounds,b,!0,b._container)},_panInsideMaxBounds:function(){this.panInsideBounds(this.options.maxBounds)}}),a.Map.addInitHook("addHandler","dragging",a.Map.Drag),a.Map.mergeOptions({doubleClickZoom:!0}),a.Map.DoubleClickZoom=a.Handler.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick)},_onDoubleClick:function(a){this.setView(a.latlng,this._zoom+1)}}),a.Map.addInitHook("addHandler","doubleClickZoom",a.Map.DoubleClickZoom),a.Map.mergeOptions({scrollWheelZoom:!a.Browser.touch}),a.Map.ScrollWheelZoom=a.Handler.extend({addHooks:function(){a.DomEvent.addListener(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){a.DomEvent.removeListener(this._map._container,"mousewheel",this._onWheelScroll)},_onWheelScroll:function(b){var c=a.DomEvent.getWheelDelta(b);this._delta+=c,this._lastMousePos=this._map.mouseEventToContainerPoint(b),clearTimeout(this._timer),this._timer=setTimeout(a.Util.bind(this._performZoom,this),50),a.DomEvent.preventDefault(b)},_performZoom:function(){var a=this._map,b=Math.round(this._delta),c=a.getZoom();b=Math.max(Math.min(b,4),-4),b=a._limitZoom(c+b)-c,this._delta=0;if(!b)return;var d=this._getCenterForScrollWheelZoom(this._lastMousePos,b),e=c+b;a.setView(d,e)},_getCenterForScrollWheelZoom:function(a,b){var c=this._map,d=c.getPixelBounds().getCenter(),e=c.getSize().divideBy(2),f=a.subtract(e).multiplyBy(1-Math.pow(2,-b)),g=d.add(f);return c.unproject(g,c._zoom,!0)}}),a.Map.addInitHook("addHandler","scrollWheelZoom",a.Map.ScrollWheelZoom),a.Util.extend(a.DomEvent,{addDoubleTapListener:function(a,b,c){function k(a){if(a.touches.length!==1)return;var b=Date.now(),c=b-(d||b);g=a.touches[0],e=c>0&&c<=f,d=b}function l(a){e&&(g.type="dblclick",b(g),d=null)}var d,e=!1,f=250,g,h="_leaflet_",i="touchstart",j="touchend";a[h+i+c]=k,a[h+j+c]=l,a.addEventListener(i,k,!1),a.addEventListener(j,l,!1)},removeDoubleTapListener:function(a,b){var c="_leaflet_";a.removeEventListener(a,a[c+"touchstart"+b],!1),a.removeEventListener(a,a[c+"touchend"+b],!1)}}),a.Map.mergeOptions({touchZoom:a.Browser.touch&&!a.Browser.android}),a.Map.TouchZoom=a.Handler.extend({addHooks:function(){a.DomEvent.addListener(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){a.DomEvent.removeListener(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(b){var c=this._map;if(!b.touches||b.touches.length!==2||c._animatingZoom||this._zooming)return;var d=c.mouseEventToLayerPoint(b.touches[0]),e=c.mouseEventToLayerPoint(b.touches[1]),f=c.containerPointToLayerPoint(c.getSize().divideBy(2));this._startCenter=d.add(e).divideBy(2,!0),this._startDist=d.distanceTo(e),this._moved=!1,this._zooming=!0,this._centerOffset=f.subtract(this._startCenter),a.DomEvent.addListener(document,"touchmove",this._onTouchMove,this).addListener(document,"touchend",this._onTouchEnd,this),a.DomEvent.preventDefault(b)},_onTouchMove:function(b){if(!b.touches||b.touches.length!==2)return;var c=this._map,d=c.mouseEventToLayerPoint(b.touches[0]),e=c.mouseEventToLayerPoint(b.touches[1]);this._scale=d.distanceTo(e)/this._startDist,this._delta=d.add(e).divideBy(2,!0).subtract(this._startCenter);if(this._scale===1)return;this._moved||(c._mapPane.className+=" leaflet-zoom-anim",c.fire("zoomstart").fire("movestart")._prepareTileBg(),this._moved=!0),c._tileBg.style.webkitTransform=a.DomUtil.getTranslateString(this._delta)+" "+a.DomUtil.getScaleString(this._scale,this._startCenter),a.DomEvent.preventDefault(b)},_onTouchEnd:function(b){if(!this._moved||!this._zooming)return;this._zooming=!1,a.DomEvent.removeListener(document,"touchmove",this._onTouchMove).removeListener(document,"touchend",this._onTouchEnd);var c=this._centerOffset.subtract(this._delta).divideBy(this._scale),d=this._map.getPixelOrigin().add(this._startCenter).add(c),e=this._map.unproject(d),f=this._map.getZoom(),g=Math.log(this._scale)/Math.LN2,h=g>0?Math.ceil(g):Math.floor(g),i=this._map._limitZoom(f+h),j=Math.pow(2,i-f);this._map._runAnimation(e,i,j/this._scale,this._startCenter.add(c))}}),a.Map.addInitHook("addHandler","touchZoom",a.Map.TouchZoom),a.Map.mergeOptions({boxZoom:!0}),a.Map.BoxZoom=a.Handler.extend({initialize:function(a){this._map=a,this._container=a._container,this._pane=a._panes.overlayPane},addHooks:function(){a.DomEvent.addListener(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){a.DomEvent.removeListener(this._container,"mousedown",this._onMouseDown)},_onMouseDown:function(b){if(!b.shiftKey||b.which!==1&&b.button!==1)return!1;a.DomUtil.disableTextSelection(),this._startLayerPoint=this._map.mouseEventToLayerPoint(b),this._box=a.DomUtil.create("div","leaflet-zoom-box",this._pane),a.DomUtil.setPosition(this._box,this._startLayerPoint),this._container.style.cursor="crosshair",a.DomEvent.addListener(document,"mousemove",this._onMouseMove,this).addListener(document,"mouseup",this._onMouseUp,this).preventDefault(b),this._map.fire("boxzoomstart")},_onMouseMove:function(b){var c=this._startLayerPoint,d=this._box,e=this._map.mouseEventToLayerPoint(b),f=e.subtract(c),g=new a.Point(Math.min(e.x,c.x),Math.min(e.y,c.y));a.DomUtil.setPosition(d,g),d.style.width=Math.abs(f.x)-4+"px",d.style.height=Math.abs(f.y)-4+"px"},_onMouseUp:function(b){this._pane.removeChild(this._box),this._container.style.cursor="",a.DomUtil.enableTextSelection(),a.DomEvent.removeListener(document,"mousemove",this._onMouseMove).removeListener(document,"mouseup",this._onMouseUp);var c=this._map,d=c.mouseEventToLayerPoint(b),e=new a.LatLngBounds(c.layerPointToLatLng(this._startLayerPoint),c.layerPointToLatLng(d));c.fitBounds(e),c.fire("boxzoomend",{boxZoomBounds:e})}}),a.Map.addInitHook("addHandler","boxZoom",a.Map.BoxZoom),a.Handler.MarkerDrag=a.Handler.extend({initialize:function(a){this._marker=a},addHooks:function(){var b=this._marker._icon;this._draggable||(this._draggable=(new a.Draggable(b,b)).on("dragstart",this._onDragStart,this).on("drag",this._onDrag,this).on("dragend",this._onDragEnd,this)),this._draggable.enable()},removeHooks:function(){this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(a){this._marker.closePopup().fire("movestart").fire("dragstart")},_onDrag:function(b){var c=a.DomUtil.getPosition(this._marker._icon);this._marker._shadow&&a.DomUtil.setPosition(this._marker._shadow,c),this._marker._latlng=this._marker._map.layerPointToLatLng(c),this._marker.fire("move").fire("drag")},_onDragEnd:function(){this._marker.fire("moveend").fire("dragend")}}),a.Handler.PolyEdit=a.Handler.extend({options:{icon:new a.DivIcon({iconSize:new a.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"})},initialize:function(b,c){this._poly=b,a.Util.setOptions(this,c)},addHooks:function(){this._poly._map&&(this._markerGroup||this._initMarkers(),this._poly._map.addLayer(this._markerGroup))},removeHooks:function(){this._poly._map&&(this._poly._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers)},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup=new a.LayerGroup,this._markers=[];var b=this._poly._latlngs,c,d,e,f;for(c=0,e=b.length;ca&&(c._index+=b)})},_createMiddleMarker:function(a,b){var c=this._getMiddleLatLng(a,b),d=this._createMarker(c),e,f,g;d.setOpacity(.6),a._middleRight=b._middleLeft=d,f=function(){var f=b._index;d._index=f,d.off("click",e).on("click",this._onMarkerClick,this),this._poly.spliceLatLngs(f,0,c),this._markers.splice(f,0,d),d.setOpacity(1),this._updateIndexes(f,1),b._index++,this._updatePrevNext(a,d),this._updatePrevNext(d,b)},g=function(){d.off("dragstart",f,this),d.off("dragend",g,this),this._createMiddleMarker(a,d),this._createMiddleMarker(d,b)},e=function(){f.call(this),g.call(this),this._poly.fire("edit")},d.on("click",e,this).on("dragstart",f,this).on("dragend",g,this),this._markerGroup.addLayer(d)},_updatePrevNext:function(a,b){a._next=b,b._prev=a},_getMiddleLatLng:function(a,b){var c=this._poly._map,d=c.latLngToLayerPoint(a.getLatLng()),e=c.latLngToLayerPoint(b.getLatLng());return c.layerPointToLatLng(d._add(e).divideBy(2))}}),a.Control=a.Class.extend({options:{position:"topright"},initialize:function(b){a.Util.setOptions(this,b)},getPosition:function(){return this.options.position},setPosition:function(a){var b=this._map;b&&b.removeControl(this),this.options.position=a,b&&b.addControl(this)},addTo:function(b){this._map=b;var c=this._container=this.onAdd(b),d=this.getPosition(),e=b._controlCorners[d];return a.DomUtil.addClass(c,"leaflet-control"),d.indexOf("bottom")!==-1?e.insertBefore(c,e.firstChild):e.appendChild(c),this},removeFrom:function(a){var b=this.getPosition(),c=a._controlCorners[b];return c.removeChild(this._container),this._map=null,this.onRemove&&this.onRemove(a),this}}),a.Map.include({addControl:function(a){return a.addTo(this),this},removeControl:function(a){return a.removeFrom(this),this},_initControlPos:function(){function e(e,f){var g=c+e+" "+c+f;b[e+f]=a.DomUtil.create("div",g,d)}var b=this._controlCorners={},c="leaflet-",d=this._controlContainer=a.DomUtil.create("div",c+"control-container",this._container);e("top","left"),e("top","right"),e("bottom","left"),e("bottom","right")}}),a.Control.Zoom=a.Control.extend({options:{position:"topleft"},onAdd:function(b){var c="leaflet-control-zoom",d=a.DomUtil.create("div",c);return this._createButton("Zoom in",c+"-in",d,b.zoomIn,b),this._createButton("Zoom out",c+"-out",d,b.zoomOut,b),d},_createButton:function(b,c,d,e,f){var g=a.DomUtil.create("a",c,d);return g.href="#",g.title=b,a.DomEvent.addListener(g,"click",a.DomEvent.stopPropagation).addListener(g,"click",a.DomEvent.preventDefault).addListener(g,"click",e,f),g}}),a.Map.mergeOptions({zoomControl:!0}),a.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new a.Control.Zoom,this.addControl(this.zoomControl))}),a.Control.Attribution=a.Control.extend({options:{position:"bottomright",prefix:'Powered by Leaflet'},initialize:function(b){a.Util.setOptions(this,b),this._attributions={}},onAdd:function(b){return this._container=a.DomUtil.create("div","leaflet-control-attribution"),a.DomEvent.disableClickPropagation(this._container),b.on("layeradd",this._onLayerAdd,this).on("layerremove",this._onLayerRemove,this),this._update(),this._container},onRemove:function(a){a.off("layeradd",this._onLayerAdd).off("layerremove",this._onLayerRemove)},setPrefix:function(a){this.options.prefix=a,this._update()},addAttribution:function(a){if(!a)return;this._attributions[a]||(this._attributions[a]=0),this._attributions[a]++,this._update()},removeAttribution:function(a){if(!a)return;this._attributions[a]--,this._update()},_update:function(){if(!this._map)return;var a=[];for(var b in this._attributions)this._attributions.hasOwnProperty(b)&&this._attributions[b]&&a.push(b);var c=[];this.options.prefix&&c.push(this.options.prefix),a.length&&c.push(a.join(", ")),this._container.innerHTML=c.join(" — ")},_onLayerAdd:function(a){a.layer.getAttribution&&this.addAttribution(a.layer.getAttribution())},_onLayerRemove:function(a){a.layer.getAttribution&&this.removeAttribution(a.layer.getAttribution())}}),a.Map.mergeOptions({attributionControl:!0}),a.Map.addInitHook(function(){this.options.attributionControl&&(this.attributionControl=(new a.Control.Attribution).addTo(this))}),a.Control.Scale=a.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1},onAdd:function(b){this._map=b;var c="leaflet-control-scale",d=a.DomUtil.create("div",c),e=this.options;return e.metric&&(this._mScale=a.DomUtil.create("div",c+"-line",d)),e.imperial&&(this._iScale=a.DomUtil.create("div",c+"-line",d)),b.on(e.updateWhenIdle?"moveend":"move",this._update,this),this._update(),d},onRemove:function(a){a.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_update:function(){var b=this._map.getBounds(),c=b.getCenter().lat,d=new a.LatLng(c,b.getSouthWest().lng),e=new a.LatLng(c,b.getNorthEast().lng),f=this._map.getSize(),g=this.options,h=d.distanceTo(e)*(g.maxWidth/f.x);g.metric&&this._updateMetric(h),g.imperial&&this._updateImperial(h)},_updateMetric:function(a){var b=this._getRoundNum(a);this._mScale.style.width=this._getScaleWidth(b/a)+"px",this._mScale.innerHTML=b<1e3?b+" m":b/1e3+" km"},_updateImperial:function(a){var b=a*3.2808399,c=this._iScale,d,e,f;b>5280?(d=b/5280,e=this._getRoundNum(d),c.style.width=this._getScaleWidth(e/d)+"px",c.innerHTML=e+" mi"):(f=this._getRoundNum(b),c.style.width=this._getScaleWidth(f/b)+"px",c.innerHTML=f+" ft")},_getScaleWidth:function(a){return Math.round(this.options.maxWidth*a)-10},_getRoundNum:function(a){var b=Math.pow(10,(Math.floor(a)+"").length-1),c=a/b;return c=c<10?c<5?c<2?1:2:5:10,b*c}}),a.Control.Layers=a.Control.extend({options:{collapsed:!0,position:"topright"},initialize:function(b,c,d){a.Util.setOptions(this,d),this._layers={};for(var e in b)b.hasOwnProperty(e)&&this._addLayer(b[e],e);for(e in c)c.hasOwnProperty(e)&&this._addLayer(c[e],e,!0)},onAdd:function(a){return this._initLayout(),this._update(),this._container},addBaseLayer:function(a,b){return this._addLayer(a,b),this._update(),this},addOverlay:function(a,b){return this._addLayer(a,b,!0),this._update(),this},removeLayer:function(b){var c=a.Util.stamp(b);return delete this._layers[c],this._update(),this},_initLayout:function(){var b="leaflet-control-layers",c=this._container=a.DomUtil.create("div",b);a.Browser.touch?a.DomEvent.addListener(c,"click",a.DomEvent.stopPropagation):a.DomEvent.disableClickPropagation(c);var d=this._form=a.DomUtil.create("form",b+"-list");if(this.options.collapsed){a.DomEvent.addListener(c,"mouseover",this._expand,this).addListener(c,"mouseout",this._collapse,this);var e=this._layersLink=a.DomUtil.create("a",b+"-toggle",c);e.href="#",e.title="Layers",a.DomEvent.addListener(e,a.Browser.touch?"click":"focus",this._expand,this),this._map.on("movestart",this._collapse,this)}else this._expand();this._baseLayersList=a.DomUtil.create("div",b+"-base",d),this._separator=a.DomUtil.create("div",b+"-separator",d),this._overlaysList=a.DomUtil.create("div",b+"-overlays",d),c.appendChild(d)},_addLayer:function(b,c,d){var e=a.Util.stamp(b);this._layers[e]={layer:b,name:c,overlay:d}},_update:function(){if(!this._container)return;this._baseLayersList.innerHTML="",this._overlaysList.innerHTML="";var a=!1,b=!1;for(var c in this._layers)if(this._layers.hasOwnProperty(c)){var d=this._layers[c];this._addItem(d),b=b||d.overlay,a=a||!d.overlay}this._separator.style.display=b&&a?"":"none"},_addItem:function(b,c){var d=document.createElement("label"),e=document.createElement("input");b.overlay||(e.name="leaflet-base-layers"),e.type=b.overlay?"checkbox":"radio",e.layerId=a.Util.stamp(b.layer),e.defaultChecked=this._map.hasLayer(b.layer),a.DomEvent.addListener(e,"click",this._onInputClick,this);var f=document.createTextNode(" "+b.name);d.appendChild(e),d.appendChild(f);var g=b.overlay?this._overlaysList:this._baseLayersList;g.appendChild(d)},_onInputClick:function(){var a,b,c,d=this._form.getElementsByTagName("input"),e=d.length;for(a=0;a2?Array.prototype.slice.call(arguments,2):null;return function(){return e.apply(t,n||arguments)}},stamp:function(){var e=0,t="_leaflet_id";return function(n){return n[t]=n[t]||++e,n[t]}}(),requestAnimFrame:function(){function t(e){window.setTimeout(e,1e3/60)}var n=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||t;return function(r,i,s,o){r=i?e.Util.bind(r,i):r;if(!s||n!==t)return n.call(window,r,o);r()}}(),cancelAnimFrame:function(){var e=window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||clearTimeout;return function(t){if(!t)return;return e.call(window,t)}}(),limitExecByInterval:function(e,t,n){var r,i;return function s(){var o=arguments;if(r){i=!0;return}r=!0,setTimeout(function(){r=!1,i&&(s.apply(n,o),i=!1)},t),e.apply(n,o)}},falseFn:function(){return!1},formatNum:function(e,t){var n=Math.pow(10,t||5);return Math.round(e*n)/n},setOptions:function(t,n){return t.options=e.Util.extend({},t.options,n),t.options},getParamString:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n+"="+e[n]);return"?"+t.join("&")},template:function(e,t){return e.replace(/\{ *([\w_]+) *\}/g,function(e,n){var r=t[n];if(!t.hasOwnProperty(n))throw Error("No value provided for variable "+e);return r})},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},e.Class=function(){},e.Class.extend=function(t){var n=function(){this.initialize&&this.initialize.apply(this,arguments)},r=function(){};r.prototype=this.prototype;var i=new r;i.constructor=n,n.prototype=i;for(var s in this)this.hasOwnProperty(s)&&s!=="prototype"&&(n[s]=this[s]);return t.statics&&(e.Util.extend(n,t.statics),delete t.statics),t.includes&&(e.Util.extend.apply(null,[i].concat(t.includes)),delete t.includes),t.options&&i.options&&(t.options=e.Util.extend({},i.options,t.options)),e.Util.extend(i,t),n},e.Class.include=function(t){e.Util.extend(this.prototype,t)},e.Class.mergeOptions=function(t){e.Util.extend(this.prototype.options,t)},e.Mixin={},e.Mixin.Events={addEventListener:function(e,t,n){var r=this._leaflet_events=this._leaflet_events||{};return r[e]=r[e]||[],r[e].push({action:t,context:n||this}),this},hasEventListeners:function(e){var t="_leaflet_events";return t in this&&e in this[t]&&this[t][e].length>0},removeEventListener:function(e,t,n){if(!this.hasEventListeners(e))return this;for(var r=0,i=this._leaflet_events,s=i[e].length;r=this.min.x&&r.x<=this.max.x&&n.y>=this.min.y&&r.y<=this.max.y},intersects:function(e){var t=this.min,n=this.max,r=e.min,i=e.max,s=i.x>=t.x&&r.x<=n.x,o=i.y>=t.y&&r.y<=n.y;return s&&o}}),e.Transformation=e.Class.extend({initialize:function(e,t,n,r){this._a=e,this._b=t,this._c=n,this._d=r},transform:function(e,t){return this._transform(e.clone(),t)},_transform:function(e,t){return t=t||1,e.x=t*(this._a*e.x+this._b),e.y=t*(this._c*e.y+this._d),e},untransform:function(t,n){return n=n||1,new e.Point((t.x/n-this._b)/this._a,(t.y/n-this._d)/this._c)}}),e.DomUtil={get:function(e){return typeof e=="string"?document.getElementById(e):e},getStyle:function(e,t){var n=e.style[t];!n&&e.currentStyle&&(n=e.currentStyle[t]);if(!n||n==="auto"){var r=document.defaultView.getComputedStyle(e,null);n=r?r[t]:null}return n==="auto"?null:n},getViewportOffset:function(t){var n=0,r=0,i=t,s=document.body;do{n+=i.offsetTop||0,r+=i.offsetLeft||0;if(i.offsetParent===s&&e.DomUtil.getStyle(i,"position")==="absolute")break;if(e.DomUtil.getStyle(i,"position")==="fixed"){n+=s.scrollTop||0,r+=s.scrollLeft||0;break}i=i.offsetParent}while(i);i=t;do{if(i===s)break;n-=i.scrollTop||0,r-=i.scrollLeft||0,i=i.parentNode}while(i);return new e.Point(r,n)},create:function(e,t,n){var r=document.createElement(e);return r.className=t,n&&n.appendChild(r),r},disableTextSelection:function(){document.selection&&document.selection.empty&&document.selection.empty(),this._onselectstart||(this._onselectstart=document.onselectstart,document.onselectstart=e.Util.falseFn)},enableTextSelection:function(){document.onselectstart=this._onselectstart,this._onselectstart=null},hasClass:function(e,t){return e.className.length>0&&RegExp("(^|\\s)"+t+"(\\s|$)").test(e.className)},addClass:function(t,n){e.DomUtil.hasClass(t,n)||(t.className+=(t.className?" ":"")+n)},removeClass:function(e,t){e.className=e.className.replace(/(\S+)\s*/g,function(e,n){return n===t?"":e}).replace(/^\s+/,"")},setOpacity:function(t,n){e.Browser.ie?t.style.filter+=n!==1?"alpha(opacity="+Math.round(n*100)+")":"":t.style.opacity=n},testProp:function(e){var t=document.documentElement.style;for(var n=0;n=n.lat&&s.lat<=r.lat&&i.lng>=n.lng&&s.lng<=r.lng},intersects:function(e){var t=this._southWest,n=this._northEast,r=e.getSouthWest(),i=e.getNorthEast(),s=i.lat>=t.lat&&r.lat<=n.lat,o=i.lng>=t.lng&&r.lng<=n.lng;return s&&o},toBBoxString:function(){var e=this._southWest,t=this._northEast;return[e.lng,e.lat,t.lng,t.lat].join(",")},equals:function(e){return e?this._southWest.equals(e.getSouthWest())&&this._northEast.equals(e.getNorthEast()):!1}}),e.Projection={},e.Projection.SphericalMercator={MAX_LATITUDE:85.0511287798,project:function(t){var n=e.LatLng.DEG_TO_RAD,r=this.MAX_LATITUDE,i=Math.max(Math.min(r,t.lat),-r),s=t.lng*n,o=i*n;return o=Math.log(Math.tan(Math.PI/4+o/2)),new e.Point(s,o)},unproject:function(t,n){var r=e.LatLng.RAD_TO_DEG,i=t.x*r,s=(2*Math.atan(Math.exp(t.y))-Math.PI/2)*r;return new e.LatLng(s,i,n)}},e.Projection.LonLat={project:function(t){return new e.Point(t.lng,t.lat)},unproject:function(t,n){return new e.LatLng(t.y,t.x,n)}},e.CRS={latLngToPoint:function(e,t){var n=this.projection.project(e),r=this.scale(t);return this.transformation._transform(n,r)},pointToLatLng:function(e,t,n){var r=this.scale(t),i=this.transformation.untransform(e,r);return this.projection.unproject(i,n)},project:function(e){return this.projection.project(e)},scale:function(e){return 256*Math.pow(2,e)}},e.CRS.EPSG3857=e.Util.extend({},e.CRS,{code:"EPSG:3857",projection:e.Projection.SphericalMercator,transformation:new e.Transformation(.5/Math.PI,.5,-0.5/Math.PI,.5),project:function(e){var t=this.projection.project(e),n=6378137;return t.multiplyBy(n)}}),e.CRS.EPSG900913=e.Util.extend({},e.CRS.EPSG3857,{code:"EPSG:900913"}),e.CRS.EPSG4326=e.Util.extend({},e.CRS,{code:"EPSG:4326",projection:e.Projection.LonLat,transformation:new e.Transformation(1/360,.5,-1/360,.5)}),e.Map=e.Class.extend({includes:e.Mixin.Events,options:{crs:e.CRS.EPSG3857,fadeAnimation:e.DomUtil.TRANSITION&&!e.Browser.android,trackResize:!0},initialize:function(t,n){n=e.Util.setOptions(this,n),this._initContainer(t),this._initLayout(),this._initHooks(),this._initEvents(),n.maxBounds&&this.setMaxBounds(n.maxBounds),n.center&&typeof n.zoom!="undefined"&&this.setView(n.center,n.zoom,!0),this._initLayers(n.layers)},setView:function(e,t){return this._resetView(e,this._limitZoom(t)),this},setZoom:function(e){return this.setView(this.getCenter(),e)},zoomIn:function(){return this.setZoom(this._zoom+1)},zoomOut:function(){return this.setZoom(this._zoom-1)},fitBounds:function(e){var t=this.getBoundsZoom(e);return this.setView(e.getCenter(),t)},fitWorld:function(){var t=new e.LatLng(-60,-170),n=new e.LatLng(85,179);return this.fitBounds(new e.LatLngBounds(t,n))},panTo:function(e){return this.setView(e,this._zoom)},panBy:function(e){return this.fire("movestart"),this._rawPanBy(e),this.fire("move"),this.fire("moveend")},setMaxBounds:function(e){this.options.maxBounds=e;if(!e)return this._boundsMinZoom=null,this;var t=this.getBoundsZoom(e,!0);return this._boundsMinZoom=t,this._loaded&&(this._zoomo.x&&(u=o.x-i.x),r.y>s.y&&(a=s.y-r.y),r.xh&&--p>0)v=a*Math.sin(l),d=Math.PI/2-2*Math.atan(f*Math.pow((1-v)/(1+v),.5*a))-l,l+=d;return new e.LatLng(l*r,o,n)}},e.CRS.EPSG3395=e.Util.extend({},e.CRS,{code:"EPSG:3395",projection:e.Projection.Mercator,transformation:function(){var t=e.Projection.Mercator,n=t.R_MAJOR,r=t.R_MINOR;return new e.Transformation(.5/(Math.PI*n),.5,-0.5/(Math.PI*r),.5)}()}),e.TileLayer=e.Class.extend({includes:e.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",opacity:1,scheme:"xyz",continuousWorld:!1,noWrap:!1,zoomOffset:0,zoomReverse:!1,detectRetina:!1,unloadInvisibleTiles:e.Browser.mobile,updateWhenIdle:e.Browser.mobile,reuseTiles:!1},initialize:function(t,n){n=e.Util.setOptions(this,n),n.detectRetina&&window.devicePixelRatio>1&&n.maxZoom>0&&(n.tileSize=Math.floor(n.tileSize/2),n.zoomOffset++,n.minZoom>0&&n.minZoom--,this.options.maxZoom--),this._url=t;var r=this.options.subdomains;typeof r=="string"&&(this.options.subdomains=r.split(""))},onAdd:function(t,n){this._map=t,this._insertAtTheBottom=n,this._initContainer(),this._createTileProto(),t.on("viewreset",this._resetCallback,this),t.on("moveend",this._update,this),this.options.updateWhenIdle||(this._limitedUpdate=e.Util.limitExecByInterval(this._update,150,this),t.on("move",this._limitedUpdate,this)),this._reset(),this._update()},onRemove:function(e){e._panes.tilePane.removeChild(this._container),e.off("viewreset",this._resetCallback,this),e.off("moveend",this._update,this),this.options.updateWhenIdle||e.off("move",this._limitedUpdate,this),this._container=null,this._map=null},getAttribution:function(){return this.options.attribution},setOpacity:function(t){this.options.opacity=t,this._map&&this._updateOpacity();var n,r=this._tiles;if(e.Browser.webkit)for(n in r)r.hasOwnProperty(n)&&(r[n].style.webkitTransform+=" translate(0,0)")},_updateOpacity:function(){e.DomUtil.setOpacity(this._container,this.options.opacity)},_initContainer:function(){var t=this._map._panes.tilePane,n=t.firstChild;if(!this._container||t.empty)this._container=e.DomUtil.create("div","leaflet-layer"),this._insertAtTheBottom&&n?t.insertBefore(this._container,n):t.appendChild(this._container),this.options.opacity<1&&this._updateOpacity()},_resetCallback:function(e){this._reset(e.hard)},_reset:function(e){var t,n=this._tiles;for(t in n)n.hasOwnProperty(t)&&this.fire("tileunload",{tile:n[t]});this._tiles={},this.options.reuseTiles&&(this._unusedTiles=[]),e&&this._container&&(this._container.innerHTML=""),this._initContainer()},_update:function(t){if(this._map._panTransition&&this._map._panTransition._inProgress)return;var n=this._map.getPixelBounds(),r=this._map.getZoom(),i=this.options.tileSize;if(r>this.options.maxZoom||re.max.x||re.max.y)&&this._removeTile(i))},_removeTile:function(t){var n=this._tiles[t];this.fire("tileunload",{tile:n,url:n.src}),n.parentNode===this._container&&this._container.removeChild(n),this.options.reuseTiles&&this._unusedTiles.push(n),n.src=e.Util.emptyImageUrl,delete this._tiles[t]},_addTile:function(t,n){var r=this._getTilePos(t),i=this._map.getZoom(),s=t.x+":"+t.y,o=Math.pow(2,this._getOffsetZoom(i));if(!this.options.continuousWorld){if(!this.options.noWrap)t.x=(t.x%o+o)%o;else if(t.x<0||t.x>=o){this._tilesToLoad--;return}if(t.y<0||t.y>=o){this._tilesToLoad--;return}}var u=this._getTile();e.DomUtil.setPosition(u,r),this._tiles[s]=u,this.options.scheme==="tms"&&(t.y=o-t.y-1),this._loadTile(u,t,i),n.appendChild(u)},_getOffsetZoom:function(e){var t=this.options;return e=t.zoomReverse?t.maxZoom-e:e,e+t.zoomOffset},_getTilePos:function(e){var t=this._map.getPixelOrigin(),n=this.options.tileSize;return e.multiplyBy(n).subtract(t)},getTileUrl:function(t,n){var r=this.options.subdomains,i=(t.x+t.y)%r.length,s=this.options.subdomains[i];return e.Util.template(this._url,e.Util.extend({s:s,z:this._getOffsetZoom(n),x:t.x,y:t.y},this.options))},_createTileProto:function(){var t=this._tileImg=e.DomUtil.create("img","leaflet-tile");t.galleryimg="no";var n=this.options.tileSize;t.style.width=n+"px",t.style.height=n+"px"},_getTile:function(){if(this.options.reuseTiles&&this._unusedTiles.length>0){var e=this._unusedTiles.pop();return this._resetTile(e),e}return this._createTile()},_resetTile:function(e){},_createTile:function(){var t=this._tileImg.cloneNode(!1);return t.onselectstart=t.onmousemove=e.Util.falseFn,t},_loadTile:function(e,t,n){e._layer=this,e.onload=this._tileOnLoad,e.onerror=this._tileOnError,e.src=this.getTileUrl(t,n)},_tileLoaded:function(){this._tilesToLoad--,this._tilesToLoad||this.fire("load")},_tileOnLoad:function(e){var t=this._layer;this.className+=" leaflet-tile-loaded",t.fire("tileload",{tile:this,url:this.src}),t._tileLoaded()},_tileOnError:function(e){var t=this._layer;t.fire("tileerror",{tile:this,url:this.src});var n=t.options.errorTileUrl;n&&(this.src=n),t._tileLoaded()}}),e.TileLayer.WMS=e.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},initialize:function(t,n){this._url=t;var r=e.Util.extend({},this.defaultWmsParams);r.width=r.height=this.options.tileSize;for(var i in n)this.options.hasOwnProperty(i)||(r[i]=n[i]);this.wmsParams=r,e.Util.setOptions(this,n)},onAdd:function(t,n){var r=parseFloat(this.wmsParams.version)>=1.3?"crs":"srs";this.wmsParams[r]=t.options.crs.code,e.TileLayer.prototype.onAdd.call(this,t,n)},getTileUrl:function(t,n){var r=this._map,i=r.options.crs,s=this.options.tileSize,o=t.multiplyBy(s),u=o.add(new e.Point(s,s)),a=r.unproject(o,n,!0),f=r.unproject(u,n,!0),l=i.project(a),c=i.project(f),h=[l.x,c.y,c.x,l.y].join(",");return this._url+e.Util.getParamString(this.wmsParams)+"&bbox="+h}}),e.TileLayer.Canvas=e.TileLayer.extend({options:{async:!1},initialize:function(t){e.Util.setOptions(this,t)},redraw:function(){var e,t=this._tiles;for(e in t)t.hasOwnProperty(e)&&this._redrawTile(t[e])},_redrawTile:function(e){this.drawTile(e,e._tilePoint,e._zoom)},_createTileProto:function(){var t=this._canvasProto=e.DomUtil.create("canvas","leaflet-tile"),n=this.options.tileSize;t.width=n,t.height=n},_createTile:function(){var t=this._canvasProto.cloneNode(!1);return t.onselectstart=t.onmousemove=e.Util.falseFn,t},_loadTile:function(e,t,n){e._layer=this,e._tilePoint=t,e._zoom=n,this.drawTile(e,t,n),this.options.async||this.tileDrawn(e)},drawTile:function(e,t,n){},tileDrawn:function(e){this._tileOnLoad.call(e)}}),e.ImageOverlay=e.Class.extend({includes:e.Mixin.Events,initialize:function(e,t){this._url=e,this._bounds=t},onAdd:function(e){this._map=e,this._image||this._initImage(),e._panes.overlayPane.appendChild(this._image),e.on("viewreset",this._reset,this),this._reset()},onRemove:function(e){e.getPanes().overlayPane.removeChild(this._image),e.off("viewreset",this._reset,this)},_initImage:function(){this._image=e.DomUtil.create("img","leaflet-image-layer"),this._image.style.visibility="hidden",e.Util.extend(this._image,{galleryimg:"no",onselectstart:e.Util.falseFn,onmousemove:e.Util.falseFn,onload:e.Util.bind(this._onImageLoad,this),src:this._url})},_reset:function(){var t=this._image,n=this._map.latLngToLayerPoint(this._bounds.getNorthWest()),r=this._map.latLngToLayerPoint(this._bounds.getSouthEast()).subtract(n);e.DomUtil.setPosition(t,n),t.style.width=r.x+"px",t.style.height=r.y+"px"},_onImageLoad:function(){this._image.style.visibility="",this.fire("load")}}),e.Icon=e.Class.extend({options:{className:""},initialize:function(t){e.Util.setOptions(this,t)},createIcon:function(){return this._createIcon("icon")},createShadow:function(){return this._createIcon("shadow")},_createIcon:function(e){var t=this._getIconUrl(e);if(!t)return null;var n=this._createImg(t);return this._setIconStyles(n,e),n},_setIconStyles:function(e,t){var n=this.options,r=n[t+"Size"],i=n.iconAnchor;!i&&r&&(i=r.divideBy(2,!0)),t==="shadow"&&i&&n.shadowOffset&&i._add(n.shadowOffset),e.className="leaflet-marker-"+t+" "+n.className,i&&(e.style.marginLeft=-i.x+"px",e.style.marginTop=-i.y+"px"),r&&(e.style.width=r.x+"px",e.style.height=r.y+"px")},_createImg:function(t){var n;return e.Browser.ie6?(n=document.createElement("div"),n.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+t+'")'):(n=document.createElement("img"),n.src=t),n},_getIconUrl:function(e){return this.options[e+"Url"]}}),e.Icon.Default=e.Icon.extend({options:{iconSize:new e.Point(25,41),iconAnchor:new e.Point(13,41),popupAnchor:new e.Point(0,-33),shadowSize:new e.Point(41,41)},_getIconUrl:function(t){var n=e.Icon.Default.imagePath;if(!n)throw Error("Couldn't autodetect L.Icon.Default.imagePath, set it manually.");return n+"/marker-"+t+".png"}}),e.Icon.Default.imagePath=function(){var e=document.getElementsByTagName("script"),t=/\/?leaflet[\-\._]?([\w\-\._]*)\.js\??/,n,r,i,s;for(n=0,r=e.length;nr?(e.style.height=r+"px",e.className+=i):e.className=e.className.replace(i,""),this._containerWidth=this._container.offsetWidth},_updatePosition:function(){var e=this._map.latLngToLayerPoint(this._latlng);this._containerBottom=-e.y-this.options.offset.y,this._containerLeft=e.x-Math.round(this._containerWidth/2)+this.options.offset.x,this._container.style.bottom=this._containerBottom+"px",this._container.style.left=this._containerLeft+"px"},_adjustPan:function(){if(!this.options.autoPan)return;var t=this._map,n=this._container.offsetHeight,r=this._containerWidth,i=new e.Point(this._containerLeft,-n-this._containerBottom),s=t.layerPointToContainerPoint(i),o=new e.Point(0,0),u=this.options.autoPanPadding,a=t.getSize();s.x<0&&(o.x=s.x-u.x),s.x+r>a.x&&(o.x=s.x+r-a.x+u.x),s.y<0&&(o.y=s.y-u.y),s.y+n>a.y&&(o.y=s.y+n-a.y+u.y),(o.x||o.y)&&t.panBy(o)},_onCloseButtonClick:function(t){this._close(),e.DomEvent.stop(t)}}),e.Marker.include({openPopup:function(){return this._popup&&this._map&&(this._popup.setLatLng(this._latlng),this._map.openPopup(this._popup)),this},closePopup:function(){return this._popup&&this._popup._close(),this},bindPopup:function(t,n){var r=this.options.icon.options.popupAnchor||new e.Point(0,0);return n&&n.offset&&(r=r.add(n.offset)),n=e.Util.extend({offset:r},n),this._popup||this.on("click",this.openPopup,this),this._popup=(new e.Popup(n,this)).setContent(t),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this.openPopup)),this}}),e.Map.include({openPopup:function(e){return this.closePopup(),this._popup=e,this.addLayer(e).fire("popupopen",{popup:this._popup})},closePopup:function(){return this._popup&&this._popup._close(),this}}),e.LayerGroup=e.Class.extend({initialize:function(e){this._layers={};var t,n;if(e)for(t=0,n=e.length;t';var t=e.firstChild;return t.style.behavior="url(#default#VML)",t&&typeof t.adj=="object"}(),e.Path=e.Browser.svg||!e.Browser.vml?e.Path:e.Path.extend({statics:{VML:!0,CLIP_PADDING:.02},_createElement:function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(e){return document.createElement("')}}catch(e){return function(e){return document.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_initPath:function(){var e=this._container=this._createElement("shape");e.className+=" leaflet-vml-shape"+(this.options.clickable?" leaflet-clickable":""),e.coordsize="1 1",this._path=this._createElement("path"),e.appendChild(this._path),this._map._pathRoot.appendChild(e)},_initStyle:function(){var e=this._container,t,n;this.options.stroke&&(t=this._stroke=this._createElement("stroke"),t.endcap="round",e.appendChild(t)),this.options.fill&&(n=this._fill=this._createElement("fill"),e.appendChild(n)),this._updateStyle()},_updateStyle:function(){var e=this._stroke,t=this._fill,n=this.options,r=this._container;r.stroked=n.stroke,r.filled=n.fill,n.stroke&&(e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity),n.fill&&(t.color=n.fillColor||n.color,t.opacity=n.fillOpacity)},_updatePath:function(){var e=this._container.style;e.display="none",this._path.v=this.getPathString()+" ",e.display=""}}),e.Map.include(e.Browser.svg||!e.Browser.vml?{}:{_initPathRoot:function(){if(this._pathRoot)return;var e=this._pathRoot=document.createElement("div");e.className="leaflet-vml-container",this._panes.overlayPane.appendChild(e),this.on("moveend",this._updatePathViewport),this._updatePathViewport()}}),e.Browser.canvas=function(){return!!document.createElement("canvas").getContext}(),e.Path=e.Path.SVG&&!window.L_PREFER_CANVAS||!e.Browser.canvas?e.Path:e.Path.extend({statics:{CANVAS:!0,SVG:!1},_initElements:function(){this._map._initPathRoot(),this._ctx=this._map._canvasCtx},_updateStyle:function(){var e=this.options;e.stroke&&(this._ctx.lineWidth=e.weight,this._ctx.strokeStyle=e.color),e.fill&&(this._ctx.fillStyle=e.fillColor||e.color)},_drawPath:function(){var t,n,r,i,s,o;this._ctx.beginPath();for(t=0,r=this._parts.length;ts&&(o=u,s=a);s>n&&(t[o]=1,this._simplifyDPStep(e,t,n,r,o),this._simplifyDPStep(e,t,n,o,i))},_reducePoints:function(e,t){var n=[e[0]];for(var r=1,i=0,s=e.length;rt&&(n.push(e[r]),i=r);return it.max.x&&(n|=2),e.yt.max.y&&(n|=8),n},_sqDist:function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},_sqClosestPointOnSegment:function(t,n,r,i){var s=n.x,o=n.y,u=r.x-s,a=r.y-o,f=u*u+a*a,l;return f>0&&(l=((t.x-s)*u+(t.y-o)*a)/f,l>1?(s=r.x,o=r.y):l>0&&(s+=u*l,o+=a*l)),u=t.x-s,a=t.y-o,i?u*u+a*a:new e.Point(s,o)}},e.Polyline=e.Path.extend({initialize:function(t,n){e.Path.prototype.initialize.call(this,n),this._latlngs=t,e.Handler.PolyEdit&&(this.editing=new e.Handler.PolyEdit(this),this.options.editable&&this.editing.enable())},options:{smoothFactor:1,noClip:!1},projectLatlngs:function(){this._originalPoints=[];for(var e=0,t=this._latlngs.length;ee.max.x||n.y-t>e.max.y||n.x+tt.y!=s.y>t.y&&t.x<(s.x-i.x)*(t.y-i.y)/(s.y-i.y)+i.x&&(n=!n)}return n}}:{}),e.Circle.include(e.Path.CANVAS?{_drawPath:function(){var e=this._point;this._ctx.beginPath(),this._ctx.arc(e.x,e.y,this._radius,0,Math.PI*2,!1)},_containsPoint:function(e){var t=this._point,n=this.options.stroke?this.options.weight/2:0;return e.distanceTo(t)<=this._radius+n}}:{}),e.GeoJSON=e.FeatureGroup.extend({initialize:function(t,n){e.Util.setOptions(this,n),this._geojson=t,this._layers={},t&&this.addGeoJSON(t)},addGeoJSON:function(t){var n=t.features,r,i;if(n){for(r=0,i=n.length;r1){this._simulateClick=!1;return}var n=t.touches&&t.touches.length===1?t.touches[0]:t,r=n.target;e.DomEvent.preventDefault(t),e.Browser.touch&&r.tagName.toLowerCase()==="a"&&(r.className+=" leaflet-active"),this._moved=!1;if(this._moving)return;e.Browser.touch||(e.DomUtil.disableTextSelection(),this._setMovingCursor()),this._startPos=this._newPos=e.DomUtil.getPosition(this._element),this._startPoint=new e.Point(n.clientX,n.clientY),e.DomEvent.addListener(document,e.Draggable.MOVE,this._onMove,this),e.DomEvent.addListener(document,e.Draggable.END,this._onUp,this)},_onMove:function(t){if(t.touches&&t.touches.length>1)return;e.DomEvent.preventDefault(t);var n=t.touches&&t.touches.length===1?t.touches[0]:t;this._moved||(this.fire("dragstart"),this._moved=!0),this._moving=!0;var r=new e.Point(n.clientX,n.clientY);this._newPos=this._startPos.add(r).subtract(this._startPoint),e.Util.cancelAnimFrame(this._animRequest),this._animRequest=e.Util.requestAnimFrame(this._updatePosition,this,!0,this._dragStartTarget)},_updatePosition:function(){this.fire("predrag"),e.DomUtil.setPosition(this._element,this._newPos),this.fire("drag")},_onUp:function(t){if(this._simulateClick&&t.changedTouches){var n=t.changedTouches[0],r=n.target,i=this._newPos&&this._newPos.distanceTo(this._startPos)||0;r.tagName.toLowerCase()==="a"&&(r.className=r.className.replace(" leaflet-active","")),i200&&(this._positions.shift(),this._times.shift())}this._map.fire("move").fire("drag")},_onViewReset:function(){var t=this._map.getSize().divideBy(2),n=this._map.latLngToLayerPoint(new e.LatLng(0,0));this._initialWorldOffset=n.subtract(t)},_onPreDrag:function(){var e=this._map,t=e.options.crs.scale(e.getZoom()),n=Math.round(t/2),r=this._initialWorldOffset.x,i=this._draggable._newPos.x,s=(i-n+r)%t+n-r,o=(i+n+r)%t-n-r,u=Math.abs(s+r)n.inertiaThreshold||typeof this._positions[0]=="undefined";if(i)t.fire("moveend");else{var s=this._lastPos.subtract(this._positions[0]),o=(this._lastTime+r-this._times[0])/1e3,u=s.multiplyBy(.58/o),a=u.distanceTo(new e.Point(0,0)),f=Math.min(n.inertiaMaxSpeed,a),l=u.multiplyBy(f/a),c=f/n.inertiaDeceleration,h=l.multiplyBy(-c/2).round(),p={duration:c,easing:"ease-out"};e.Util.requestAnimFrame(e.Util.bind(function(){this._map.panBy(h,p)},this))}t.fire("dragend"),n.maxBounds&&e.Util.requestAnimFrame(this._panInsideMaxBounds,t,!0,t._container)},_panInsideMaxBounds:function(){this.panInsideBounds(this.options.maxBounds)}}),e.Map.addInitHook("addHandler","dragging",e.Map.Drag),e.Map.mergeOptions({doubleClickZoom:!0}),e.Map.DoubleClickZoom=e.Handler.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick)},_onDoubleClick:function(e){this.setView(e.latlng,this._zoom+1)}}),e.Map.addInitHook("addHandler","doubleClickZoom",e.Map.DoubleClickZoom),e.Map.mergeOptions({scrollWheelZoom:!e.Browser.touch}),e.Map.ScrollWheelZoom=e.Handler.extend({addHooks:function(){e.DomEvent.addListener(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){e.DomEvent.removeListener(this._map._container,"mousewheel",this._onWheelScroll)},_onWheelScroll:function(t){var n=e.DomEvent.getWheelDelta(t);this._delta+=n,this._lastMousePos=this._map.mouseEventToContainerPoint(t),clearTimeout(this._timer),this._timer=setTimeout(e.Util.bind(this._performZoom,this),50),e.DomEvent.preventDefault(t)},_performZoom:function(){var e=this._map,t=Math.round(this._delta),n=e.getZoom();t=Math.max(Math.min(t,4),-4),t=e._limitZoom(n+t)-n,this._delta=0;if(!t)return;var r=this._getCenterForScrollWheelZoom(this._lastMousePos,t),i=n+t;e.setView(r,i)},_getCenterForScrollWheelZoom:function(e,t){var n=this._map,r=n.getPixelBounds().getCenter(),i=n.getSize().divideBy(2),s=e.subtract(i).multiplyBy(1-Math.pow(2,-t)),o=r.add(s);return n.unproject(o,n._zoom,!0)}}),e.Map.addInitHook("addHandler","scrollWheelZoom",e.Map.ScrollWheelZoom),e.Util.extend(e.DomEvent,{addDoubleTapListener:function(e,t,n){function l(e){if(e.touches.length!==1)return;var t=Date.now(),n=t-(r||t);o=e.touches[0],i=n>0&&n<=s,r=t}function c(e){i&&(o.type="dblclick",t(o),r=null)}var r,i=!1,s=250,o,u="_leaflet_",a="touchstart",f="touchend";e[u+a+n]=l,e[u+f+n]=c,e.addEventListener(a,l,!1),e.addEventListener(f,c,!1)},removeDoubleTapListener:function(e,t){var n="_leaflet_";e.removeEventListener(e,e[n+"touchstart"+t],!1),e.removeEventListener(e,e[n+"touchend"+t],!1)}}),e.Map.mergeOptions({touchZoom:e.Browser.touch&&!e.Browser.android}),e.Map.TouchZoom=e.Handler.extend({addHooks:function(){e.DomEvent.addListener(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){e.DomEvent.removeListener(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var n=this._map;if(!t.touches||t.touches.length!==2||n._animatingZoom||this._zooming)return;var r=n.mouseEventToLayerPoint(t.touches[0]),i=n.mouseEventToLayerPoint(t.touches[1]),s=n.containerPointToLayerPoint(n.getSize().divideBy(2));this._startCenter=r.add(i).divideBy(2,!0),this._startDist=r.distanceTo(i),this._moved=!1,this._zooming=!0,this._centerOffset=s.subtract(this._startCenter),e.DomEvent.addListener(document,"touchmove",this._onTouchMove,this).addListener(document,"touchend",this._onTouchEnd,this),e.DomEvent.preventDefault(t)},_onTouchMove:function(t){if(!t.touches||t.touches.length!==2)return;var n=this._map,r=n.mouseEventToLayerPoint(t.touches[0]),i=n.mouseEventToLayerPoint(t.touches[1]);this._scale=r.distanceTo(i)/this._startDist,this._delta=r.add(i).divideBy(2,!0).subtract(this._startCenter);if(this._scale===1)return;this._moved||(n._mapPane.className+=" leaflet-zoom-anim",n.fire("zoomstart").fire("movestart")._prepareTileBg(),this._moved=!0),n._tileBg.style.webkitTransform=e.DomUtil.getTranslateString(this._delta)+" "+e.DomUtil.getScaleString(this._scale,this._startCenter),e.DomEvent.preventDefault(t)},_onTouchEnd:function(t){if(!this._moved||!this._zooming)return;this._zooming=!1,e.DomEvent.removeListener(document,"touchmove",this._onTouchMove).removeListener(document,"touchend",this._onTouchEnd);var n=this._centerOffset.subtract(this._delta).divideBy(this._scale),r=this._map.getPixelOrigin().add(this._startCenter).add(n),i=this._map.unproject(r),s=this._map.getZoom(),o=Math.log(this._scale)/Math.LN2,u=o>0?Math.ceil(o):Math.floor(o),a=this._map._limitZoom(s+u),f=Math.pow(2,a-s);this._map._runAnimation(i,a,f/this._scale,this._startCenter.add(n))}}),e.Map.addInitHook("addHandler","touchZoom",e.Map.TouchZoom),e.Map.mergeOptions({boxZoom:!0}),e.Map.BoxZoom=e.Handler.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane},addHooks:function(){e.DomEvent.addListener(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){e.DomEvent.removeListener(this._container,"mousedown",this._onMouseDown)},_onMouseDown:function(t){if(!t.shiftKey||t.which!==1&&t.button!==1)return!1;e.DomUtil.disableTextSelection(),this._startLayerPoint=this._map.mouseEventToLayerPoint(t),this._box=e.DomUtil.create("div","leaflet-zoom-box",this._pane),e.DomUtil.setPosition(this._box,this._startLayerPoint),this._container.style.cursor="crosshair",e.DomEvent.addListener(document,"mousemove",this._onMouseMove,this).addListener(document,"mouseup",this._onMouseUp,this).preventDefault(t),this._map.fire("boxzoomstart")},_onMouseMove:function(t){var n=this._startLayerPoint,r=this._box,i=this._map.mouseEventToLayerPoint(t),s=i.subtract(n),o=new e.Point(Math.min(i.x,n.x),Math.min(i.y,n.y));e.DomUtil.setPosition(r,o),r.style.width=Math.abs(s.x)-4+"px",r.style.height=Math.abs(s.y)-4+"px"},_onMouseUp:function(t){this._pane.removeChild(this._box),this._container.style.cursor="",e.DomUtil.enableTextSelection(),e.DomEvent.removeListener(document,"mousemove",this._onMouseMove).removeListener(document,"mouseup",this._onMouseUp);var n=this._map,r=n.mouseEventToLayerPoint(t),i=new e.LatLngBounds(n.layerPointToLatLng(this._startLayerPoint),n.layerPointToLatLng(r));n.fitBounds(i),n.fire("boxzoomend",{boxZoomBounds:i})}}),e.Map.addInitHook("addHandler","boxZoom",e.Map.BoxZoom),e.Handler.MarkerDrag=e.Handler.extend({initialize:function(e){this._marker=e},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=(new e.Draggable(t,t)).on("dragstart",this._onDragStart,this).on("drag",this._onDrag,this).on("dragend",this._onDragEnd,this)),this._draggable.enable()},removeHooks:function(){this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(e){this._marker.closePopup().fire("movestart").fire("dragstart")},_onDrag:function(t){var n=e.DomUtil.getPosition(this._marker._icon);this._marker._shadow&&e.DomUtil.setPosition(this._marker._shadow,n),this._marker._latlng=this._marker._map.layerPointToLatLng(n),this._marker.fire("move").fire("drag")},_onDragEnd:function(){this._marker.fire("moveend").fire("dragend")}}),e.Handler.PolyEdit=e.Handler.extend({options:{icon:new e.DivIcon({iconSize:new e.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"})},initialize:function(t,n){this._poly=t,e.Util.setOptions(this,n)},addHooks:function(){this._poly._map&&(this._markerGroup||this._initMarkers(),this._poly._map.addLayer(this._markerGroup))},removeHooks:function(){this._poly._map&&(this._poly._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers)},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup=new e.LayerGroup,this._markers=[];var t=this._poly._latlngs,n,r,i,s;for(n=0,i=t.length;ne&&(n._index+=t)})},_createMiddleMarker:function(e,t){var n=this._getMiddleLatLng(e,t),r=this._createMarker(n),i,s,o;r.setOpacity(.6),e._middleRight=t._middleLeft=r,s=function(){var s=t._index;r._index=s,r.off("click",i).on("click",this._onMarkerClick,this),this._poly.spliceLatLngs(s,0,n),this._markers.splice(s,0,r),r.setOpacity(1),this._updateIndexes(s,1),t._index++,this._updatePrevNext(e,r),this._updatePrevNext(r,t)},o=function(){r.off("dragstart",s,this),r.off("dragend",o,this),this._createMiddleMarker(e,r),this._createMiddleMarker(r,t)},i=function(){s.call(this),o.call(this),this._poly.fire("edit")},r.on("click",i,this).on("dragstart",s,this).on("dragend",o,this),this._markerGroup.addLayer(r)},_updatePrevNext:function(e,t){e._next=t,t._prev=e},_getMiddleLatLng:function(e,t){var n=this._poly._map,r=n.latLngToLayerPoint(e.getLatLng()),i=n.latLngToLayerPoint(t.getLatLng());return n.layerPointToLatLng(r._add(i).divideBy(2))}}),e.Control=e.Class.extend({options:{position:"topright"},initialize:function(t){e.Util.setOptions(this,t)},getPosition:function(){return this.options.position},setPosition:function(e){var t=this._map;t&&t.removeControl(this),this.options.position=e,t&&t.addControl(this)},addTo:function(t){this._map=t;var n=this._container=this.onAdd(t),r=this.getPosition(),i=t._controlCorners[r];return e.DomUtil.addClass(n,"leaflet-control"),r.indexOf("bottom")!==-1?i.insertBefore(n,i.firstChild):i.appendChild(n),this},removeFrom:function(e){var t=this.getPosition(),n=e._controlCorners[t];return n.removeChild(this._container),this._map=null,this.onRemove&&this.onRemove(e),this}}),e.Map.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.removeFrom(this),this},_initControlPos:function(){function i(i,s){var o=n+i+" "+n+s;t[i+s]=e.DomUtil.create("div",o,r)}var t=this._controlCorners={},n="leaflet-",r=this._controlContainer=e.DomUtil.create("div",n+"control-container",this._container);i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")}}),e.Control.Zoom=e.Control.extend({options:{position:"topleft"},onAdd:function(t){var n="leaflet-control-zoom",r=e.DomUtil.create("div",n);return this._createButton("Zoom in",n+"-in",r,t.zoomIn,t),this._createButton("Zoom out",n+"-out",r,t.zoomOut,t),r},_createButton:function(t,n,r,i,s){var o=e.DomUtil.create("a",n,r);return o.href="#",o.title=t,e.DomEvent.addListener(o,"click",e.DomEvent.stopPropagation).addListener(o,"click",e.DomEvent.preventDefault).addListener(o,"click",i,s),o}}),e.Map.mergeOptions({zoomControl:!0}),e.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new e.Control.Zoom,this.addControl(this.zoomControl))}),e.Control.Attribution=e.Control.extend({options:{position:"bottomright",prefix:'Powered by Leaflet'},initialize:function(t){e.Util.setOptions(this,t),this._attributions={}},onAdd:function(t){return this._container=e.DomUtil.create("div","leaflet-control-attribution"),e.DomEvent.disableClickPropagation(this._container),t.on("layeradd",this._onLayerAdd,this).on("layerremove",this._onLayerRemove,this),this._update(),this._container},onRemove:function(e){e.off("layeradd",this._onLayerAdd).off("layerremove",this._onLayerRemove)},setPrefix:function(e){this.options.prefix=e,this._update()},addAttribution:function(e){if(!e)return;this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update()},removeAttribution:function(e){if(!e)return;this._attributions[e]--,this._update()},_update:function(){if(!this._map)return;var e=[];for(var t in this._attributions)this._attributions.hasOwnProperty(t)&&this._attributions[t]&&e.push(t);var n=[];this.options.prefix&&n.push(this.options.prefix),e.length&&n.push(e.join(", ")),this._container.innerHTML=n.join(" — ")},_onLayerAdd:function(e){e.layer.getAttribution&&this.addAttribution(e.layer.getAttribution())},_onLayerRemove:function(e){e.layer.getAttribution&&this.removeAttribution(e.layer.getAttribution())}}),e.Map.mergeOptions({attributionControl:!0}),e.Map.addInitHook(function(){this.options.attributionControl&&(this.attributionControl=(new e.Control.Attribution).addTo(this))}),e.Control.Scale=e.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1},onAdd:function(t){this._map=t;var n="leaflet-control-scale",r=e.DomUtil.create("div",n),i=this.options;return i.metric&&(this._mScale=e.DomUtil.create("div",n+"-line",r)),i.imperial&&(this._iScale=e.DomUtil.create("div",n+"-line",r)),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),this._update(),r},onRemove:function(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_update:function(){var t=this._map.getBounds(),n=t.getCenter().lat,r=new e.LatLng(n,t.getSouthWest().lng),i=new e.LatLng(n,t.getNorthEast().lng),s=this._map.getSize(),o=this.options,u=r.distanceTo(i)*(o.maxWidth/s.x);o.metric&&this._updateMetric(u),o.imperial&&this._updateImperial(u)},_updateMetric:function(e){var t=this._getRoundNum(e);this._mScale.style.width=this._getScaleWidth(t/e)+"px",this._mScale.innerHTML=t<1e3?t+" m":t/1e3+" km"},_updateImperial:function(e){var t=e*3.2808399,n=this._iScale,r,i,s;t>5280?(r=t/5280,i=this._getRoundNum(r),n.style.width=this._getScaleWidth(i/r)+"px",n.innerHTML=i+" mi"):(s=this._getRoundNum(t),n.style.width=this._getScaleWidth(s/t)+"px",n.innerHTML=s+" ft")},_getScaleWidth:function(e){return Math.round(this.options.maxWidth*e)-10},_getRoundNum:function(e){var t=Math.pow(10,(Math.floor(e)+"").length-1),n=e/t;return n=n>=10?10:n>=5?5:n>=2?2:1,t*n}}),e.Control.Layers=e.Control.extend({options:{collapsed:!0,position:"topright"},initialize:function(t,n,r){e.Util.setOptions(this,r),this._layers={};for(var i in t)t.hasOwnProperty(i)&&this._addLayer(t[i],i);for(i in n)n.hasOwnProperty(i)&&this._addLayer(n[i],i,!0)},onAdd:function(e){return this._initLayout(),this._update(),this._container},addBaseLayer:function(e,t){return this._addLayer(e,t),this._update(),this},addOverlay:function(e,t){return this._addLayer(e,t,!0),this._update(),this},removeLayer:function(t){var n=e.Util.stamp(t);return delete this._layers[n],this._update(),this},_initLayout:function(){var t="leaflet-control-layers",n=this._container=e.DomUtil.create("div",t);e.Browser.touch?e.DomEvent.addListener(n,"click",e.DomEvent.stopPropagation):e.DomEvent.disableClickPropagation(n);var r=this._form=e.DomUtil.create("form",t+"-list");if(this.options.collapsed){e.DomEvent.addListener(n,"mouseover",this._expand,this).addListener(n,"mouseout",this._collapse,this);var i=this._layersLink=e.DomUtil.create("a",t+"-toggle",n);i.href="#",i.title="Layers",e.DomEvent.addListener(i,e.Browser.touch?"click":"focus",this._expand,this),this._map.on("movestart",this._collapse,this)}else this._expand();this._baseLayersList=e.DomUtil.create("div",t+"-base",r),this._separator=e.DomUtil.create("div",t+"-separator",r),this._overlaysList=e.DomUtil.create("div",t+"-overlays",r),n.appendChild(r)},_addLayer:function(t,n,r){var i=e.Util.stamp(t);this._layers[i]={layer:t,name:n,overlay:r}},_update:function(){if(!this._container)return;this._baseLayersList.innerHTML="",this._overlaysList.innerHTML="";var e=!1,t=!1;for(var n in this._layers)if(this._layers.hasOwnProperty(n)){var r=this._layers[n];this._addItem(r),t=t||r.overlay,e=e||!r.overlay}this._separator.style.display=t&&e?"":"none"},_addItem:function(t,n){var r=document.createElement("label"),i=document.createElement("input");t.overlay||(i.name="leaflet-base-layers"),i.type=t.overlay?"checkbox":"radio",i.layerId=e.Util.stamp(t.layer),i.defaultChecked=this._map.hasLayer(t.layer),e.DomEvent.addListener(i,"click",this._onInputClick,this);var s=document.createTextNode(" "+t.name);r.appendChild(i),r.appendChild(s);var o=t.overlay?this._overlaysList:this._baseLayersList;o.appendChild(r)},_onInputClick:function(){var e,t,n,r=this._form.getElementsByTagName("input"),i=r.length;for(e=0;e