Ajout de medic dans l'exploration

This commit is contained in:
EpicKiwi 2026-07-03 15:51:16 +02:00
parent 4f25173b77
commit dde1f56125
Signed by: epickiwi
GPG key ID: C4B28FD2729941CE
4 changed files with 9 additions and 3 deletions

View file

@ -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()

View file

@ -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}),

View file

@ -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",