Skip to content

Commit

Permalink
feat: minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicschweizer committed May 13, 2023
1 parent 4f0b822 commit 894b8a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions prototype-2/lib.js
Expand Up @@ -79,3 +79,8 @@ export const alarmIcon = L.icon({
iconSize: iconSize.map((n) => n * 6),
iconAnchor: iconSize,
});
export const windIcon = L.icon({
iconUrl: "https://svgsilh.com/svg/44535.svg",
iconSize: iconSize.map((n) => n * 5),
iconAnchor: iconSize,
});
5 changes: 3 additions & 2 deletions prototype-2/main.js
Expand Up @@ -5,6 +5,7 @@ import {
oldPersonIcon,
youngPersonIcon,
alarmIcon,
windIcon,
} from "./lib.js";
var map = L.map("map").setView([46.94863, 7.45164], 16);
L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png", {
Expand Down Expand Up @@ -36,7 +37,7 @@ map.on("click", (e) => {
}
if (clickOrigin) {
clickWind = e.latlng;
windMarker = L.marker(clickWind, { icon: alarmIcon }).addTo(map);
windMarker = L.marker(clickWind, { icon: windIcon }).addTo(map);
triggerCloudCalculation();
return;
}
Expand Down Expand Up @@ -91,7 +92,7 @@ function updateTextnode(noPeople, noOldPeople, noYoungPeople) {
document.getElementById("oldPeople").textContent =
noOldPeople === undefined
? "Keine Personen > 75 Jahre betroffen"
: `${noOldPeople.length} Personen betroffen`;
: `${noOldPeople.length} Personen > 75 Jahre betroffen`;
document.getElementById("youngPeople").textContent =
noYoungPeople === undefined
? "Keine Personen < 10 Jahren betroffen"
Expand Down

0 comments on commit 894b8a3

Please sign in to comment.