first commit

This commit is contained in:
2025-07-18 16:20:14 +07:00
commit 98af45c018
16382 changed files with 3148096 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
Copyright (c) 2014 David C.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -0,0 +1,27 @@
/* Icons from Font-Awesome | Font Awesome by Dave Gandy - http://fontawesome.io*/
/* Thanks to http://fa2png.io/ for icon png generation */
.leaflet-control-navbar-fwd {
background-image: url("img/arrow-right_000000_14.png");
}
.leaflet-control-navbar-back {
background-image: url("img/arrow-left_000000_14.png");
}
.leaflet-control-navbar-home {
background-image: url("img/home_000000_14.png");
}
.leaflet-control-navbar-fwd-disabled {
background-image: url("img/arrow-right_bbbbbb_14.png");
}
.leaflet-control-navbar-back-disabled {
background-image: url("img/arrow-left_bbbbbb_14.png");
}
.leaflet-control-navbar-home-disabled {
background-image: url("img/home_bbbbbb_14.png");
}

View File

@@ -0,0 +1,4 @@
/*
* Simple navigation control that allows back and forward navigation through map's view history
*/
(function(){L.Control.NavBar=L.Control.extend({options:{position:'topleft',forwardTitle:'Go forward in map view history',backTitle:'Go back in map view history',homeTitle:'Go to home map view'},onAdd:function(map){if(!this.options.center){this.options.center=map.getCenter()}if(!this.options.zoom){this.options.zoom=map.getZoom()}var options=this.options;var controlName='leaflet-control-navbar',container=L.DomUtil.create('div',controlName+' leaflet-bar');this._homeButton=this._createButton(options.homeTitle,controlName+'-home',container,this._goHome);this._fwdButton=this._createButton(options.forwardTitle,controlName+'-fwd',container,this._goFwd);this._backButton=this._createButton(options.backTitle,controlName+'-back',container,this._goBack);this._viewHistory=[{center:this.options.center,zoom:this.options.zoom}];this._curIndx=0;this._updateDisabled();map.once('moveend',function(){this._map.on('moveend',this._updateHistory,this)},this);map.setView(options.center,options.zoom);return container},onRemove:function(map){map.off('moveend',this._updateHistory,this)},_goHome:function(){if(this.options.bbox){try{this._map.fitBounds(this.options.bbox)}catch(err){this._map.setView(this.options.center,this.options.zoom);}}this._map.setView(this.options.center,this.options.zoom)},_goBack:function(){if(this._curIndx!==0){this._map.off('moveend',this._updateHistory,this);this._map.once('moveend',function(){this._map.on('moveend',this._updateHistory,this)},this);this._curIndx-=1;this._updateDisabled();var view=this._viewHistory[this._curIndx];this._map.setView(view.center,view.zoom)}},_goFwd:function(){if(this._curIndx!=this._viewHistory.length-1){this._map.off('moveend',this._updateHistory,this);this._map.once('moveend',function(){this._map.on('moveend',this._updateHistory,this)},this);this._curIndx+=1;this._updateDisabled();var view=this._viewHistory[this._curIndx];this._map.setView(view.center,view.zoom)}},_createButton:function(title,className,container,fn){var link=L.DomUtil.create('a',className,container);link.href='#';link.title=title;L.DomEvent.on(link,'mousedown dblclick',L.DomEvent.stopPropagation).on(link,'click',L.DomEvent.stop).on(link,'click',fn,this).on(link,'click',this._refocusOnMap,this);return link},_updateHistory:function(){var newView={center:this._map.getCenter(),zoom:this._map.getZoom()};var insertIndx=this._curIndx+1;this._viewHistory.splice(insertIndx,this._viewHistory.length-insertIndx,newView);this._curIndx+=1;this._updateDisabled()},_setFwdEnabled:function(enabled){var leafletDisabled='leaflet-disabled';var fwdDisabled='leaflet-control-navbar-fwd-disabled';if(enabled===true){L.DomUtil.removeClass(this._fwdButton,fwdDisabled);L.DomUtil.removeClass(this._fwdButton,leafletDisabled)}else{L.DomUtil.addClass(this._fwdButton,fwdDisabled);L.DomUtil.addClass(this._fwdButton,leafletDisabled)}},_setBackEnabled:function(enabled){var leafletDisabled='leaflet-disabled';var backDisabled='leaflet-control-navbar-back-disabled';if(enabled===true){L.DomUtil.removeClass(this._backButton,backDisabled);L.DomUtil.removeClass(this._backButton,leafletDisabled)}else{L.DomUtil.addClass(this._backButton,backDisabled);L.DomUtil.addClass(this._backButton,leafletDisabled)}},_updateDisabled:function(){if(this._curIndx==(this._viewHistory.length-1)){this._setFwdEnabled(false)}else{this._setFwdEnabled(true)}if(this._curIndx<=0){this._setBackEnabled(false)}else{this._setBackEnabled(true)}}});L.control.navbar=function(options){return new L.Control.NavBar(options)}})();

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 B