Ajout de medic dans l'exploration
This commit is contained in:
parent
4f25173b77
commit
dde1f56125
4 changed files with 9 additions and 3 deletions
|
|
@ -37,7 +37,8 @@
|
|||
<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>
|
||||
<button title="Care & Médic" id="explore-care"><img src="./icons/medic.svg" alt="Icone d'une croix rouge sur fond blanc"></button>
|
||||
<button title="Programmation" id="explore-on-schedule"><img src="./icons/prog.svg" alt="Icone d'orloge sur fond bleu canard"></button>
|
||||
</details>
|
||||
</nav>
|
||||
|
||||
|
|
|
|||
|
|
@ -214,6 +214,7 @@ document.getElementById("explore-toggle-btn").addEventListener("click", () => {
|
|||
function bindButtonToCategory(button, category){
|
||||
button.addEventListener("click", e => {
|
||||
e.preventDefault()
|
||||
document.querySelector("#explore > details").open = false
|
||||
openFeature(...places.featuresByCategory[category]);
|
||||
})
|
||||
}
|
||||
|
|
@ -223,6 +224,7 @@ bindButtonToCategory(document.getElementById("explore-on-schedule"), "on-schedul
|
|||
bindButtonToCategory(document.getElementById("explore-dodo"), "dodo")
|
||||
bindButtonToCategory(document.getElementById("explore-bin"), "bin")
|
||||
bindButtonToCategory(document.getElementById("explore-toilets"), "toilets")
|
||||
bindButtonToCategory(document.getElementById("explore-care"), "care")
|
||||
|
||||
document.getElementById("logo").addEventListener("click", e => {
|
||||
openFeature()
|
||||
|
|
|
|||
|
|
@ -12,8 +12,9 @@ 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,
|
||||
"toilets": (feature) => feature.properties["toilettes"] || feature.properties["douches"]
|
||||
"on-schedule": (feature) => feature.properties["pretalx-room-id"] || feature.properties["pretalx-room-id"] == 0 || feature.properties["village"],
|
||||
"toilets": (feature) => feature.properties["toilettes"] || feature.properties["douches"],
|
||||
"care": (feature) => feature.properties["medic"] || feature.properties["care"]
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -269,6 +270,7 @@ export class PlaceDatabase extends EventTarget {
|
|||
default_database.loadGeojson(new URL("../couches/eau-potable.geojson", import.meta.url), {batch: true}),
|
||||
default_database.loadGeojson(new URL("../couches/espace-camp.geojson", import.meta.url), {batch: true}),
|
||||
default_database.loadGeojson(new URL("../couches/espacemiam.geojson", import.meta.url), {batch: true}),
|
||||
default_database.loadGeojson(new URL("../couches/installations-permanentes.geojson", import.meta.url), {batch: true}),
|
||||
default_database.loadGeojson(new URL("../couches/marabouts.geojson", import.meta.url), {batch: true}),
|
||||
default_database.loadGeojson(new URL("../couches/medic.geojson", import.meta.url), {batch: true}),
|
||||
default_database.loadGeojson(new URL("../couches/parkings.geojson", import.meta.url), {batch: true}),
|
||||
|
|
|
|||
|
|
@ -255,6 +255,7 @@ export const BADMINGTON_SYMBOL = new MapSymbol()
|
|||
export const MEDIC_SYMBOL = new MapSymbol()
|
||||
{
|
||||
MEDIC_SYMBOL.markerUrl = new URL("../icons/medic.svg", import.meta.url)
|
||||
MEDIC_SYMBOL.genericName = "Médic"
|
||||
MEDIC_SYMBOL.borderColor = "white"
|
||||
MEDIC_SYMBOL.indexSynonyms = [
|
||||
"medic",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue