Ajout d'une categorie toilettes

This commit is contained in:
EpicKiwi 2026-06-29 23:05:53 +02:00
parent cb10cc189c
commit b2a8af6db2
Signed by: epickiwi
GPG key ID: C4B28FD2729941CE
3 changed files with 6 additions and 3 deletions

View file

@ -33,9 +33,10 @@
<summary>
<button id="explore-toggle-btn" title="Explorer les lieux"><img src="./assets/amenities-btn.svg" alt="Icone avec le signe +" /></button>
</summary>
<button title="Eau potable" id="explore-drinking-water"><img src="./icons/eau-potable.svg" alt="Icone de goutte sur fond bleu"></button>
<button title="Poubelles" id="explore-bin"><img src="./icons/poubelle.svg" alt="Icone de poubelle sur fond marron"></button>
<button title="Repos" id="explore-dodo"><img src="./icons/dortoir.svg" alt="Icone de lit"></button>
<button title="Toilettes & Douches" id="explore-toilets"><img src="./icons/toilettes.svg" alt="Icone de toilettes sur fond violet"></button>
<button title="Poubelles" id="explore-bin"><img src="./icons/poubelle.svg" alt="Icone de poubelle sur fond marron"></button>
<button title="Eau potable" id="explore-drinking-water"><img src="./icons/eau-potable.svg" alt="Icone de goutte sur fond bleu"></button>
<button title="Programmation" id="explore-on-schedule"><img src="./icons/prog.svg" alt="Icone d;orloge sur fond bleu canard"></button>
</details>
</nav>

View file

@ -222,6 +222,7 @@ bindButtonToCategory(document.getElementById("explore-drinking-water"), "drinkin
bindButtonToCategory(document.getElementById("explore-on-schedule"), "on-schedule")
bindButtonToCategory(document.getElementById("explore-dodo"), "dodo")
bindButtonToCategory(document.getElementById("explore-bin"), "bin")
bindButtonToCategory(document.getElementById("explore-toilets"), "toilets")
document.getElementById("logo").addEventListener("click", e => {
openFeature()

View file

@ -12,7 +12,8 @@ const CATEGORIES = {
"drinking-water": (feature) => feature.properties["eau potable"] || feature.properties["douches"] || feature.properties["toilettes"],
"bin": (feature) => feature.properties["poubelle"],
"dodo": (feature) => feature.properties["n couchage"] > 0 || feature.properties["camping"],
"on-schedule": (feature) => feature.properties["pretalx-room-id"] || feature.properties["pretalx-room-id"] == 0
"on-schedule": (feature) => feature.properties["pretalx-room-id"] || feature.properties["pretalx-room-id"] == 0,
"toilets": (feature) => feature.properties["toilettes"] || feature.properties["douches"]
}
/**