Skip to content

Commit

Permalink
Merge pull request #17 from daltare/working-branch
Browse files Browse the repository at this point in the history
Significant Reorganization & Testing Interactive Map(s)
  • Loading branch information
daltare authored Mar 22, 2024
2 parents f015201 + 880e448 commit 745a313
Show file tree
Hide file tree
Showing 32 changed files with 17,333 additions and 549 deletions.
12 changes: 9 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,17 @@ _ignore/
/_site/
/docs/

# directories that include the word "scratch"
*scratch*/

# Project Specific Files
## ignore files that start with "scratch" in any directory
**/scratch*.R
## files with "scratch" in the filename any directory
**/*scratch*.R
**/*scratch*.qmd
# 03_data_results/*.csv
# 03_data_results/*.gpkg
03_data_results/dataset_hash.csv
code_from_python_package_comparison.R
quarto_document_publishing.txt
quarto_document_publishing.txt
water_supplier_boundaries_2024-03-11/
water_supplier_boundaries_2024-03-11.zip

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions 01_document/_freeze/site_libs/HomeButton-0.0.1/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright (C) 2014 Daniel Montague

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.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 69 additions & 0 deletions 01_document/_freeze/site_libs/HomeButton-0.0.1/home-button.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
.leaflet-bar button/*,
.leaflet-bar button:hover*/ {
background-color: rgba(255,255,255, 0.95) /*#fff*/;
border: none;
width: 100%;
height: 20px;
line-height: 15px;
font-size: 85%;
/*display: block;*/
text-align: center;
text-decoration: none;
color: black;
cursor: pointer;
overflow-x: visible;
overflow-y: hidden;
opacity: 0.25;
filter: alpha(opacity = 25);
background-position: 50% 50%;
background-repeat: no-repeat;
display: inline-block;
}

.leaflet-bar button:hover {
background-color: #00ffff; /* #909090 */;
text-decoration: underline;
opacity: 0.9;
filter: alpha(opacity=90);
}

/* uncomment this to get rid of button borders, this also removes border from zoom buttons
.leaflet-touch .leaflet-bar {
border: none;
}
/*.leaflet-bar button:first-of-type {
border-top-left-radius: 3px;
border-top-right-radius: 3px;
}
.leaflet-bar button:last-of-type {
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
border-bottom: none;
}
.leaflet-bar.disabled,
.leaflet-bar button.disabled {
cursor: default;
pointer-events: none;
opacity: .4;
}
.easy-button-button .button-state{
display: block;
width: 100%;
height: 100%;
position: relative;
}
/*.leaflet-touch .leaflet-bar button {
width: 100%;
height: 20px;
line-height: 18px;
overflow-y: hidden;
opacity: .5;
filter: alpha(opacity=50);
white-space: nowrap;
}*/
40 changes: 40 additions & 0 deletions 01_document/_freeze/site_libs/HomeButton-0.0.1/home-button.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
LeafletWidget.methods.addHomeButton = function (xmin, ymin, xmax, ymax, useext,
group, label, icon, position) {

if (this.easyButton) {
this.easyButton.removeFrom(this);
}

var bx = [];
if (useext) {
bx = [[ymin, xmin], [ymax, xmax]];
} else {
bx = this.layerManager._groupContainers[group].getBounds();
}

var easyButton = new L.easyButton({
position: position,
states: [{
stateName: label, // name the state
icon: icon, // and define its properties
title: label, // like its title
onClick: function(btn, map){
map.fitBounds(bx, {maxZoom: 18});
btn.state(label);
}
}]
});

easyButton.addTo(this);

this.currentEasyButton = easyButton;

};


LeafletWidget.methods.removeHomeButton = function () {
if (this.currentEasyButton) {
this.currentEasyButton.removeFrom(this);
this.currentEasyButton = null;
}
};
Loading

0 comments on commit 745a313

Please sign in to comment.