diff --git a/index.html b/index.html index 3301234..f3b1c38 100644 --- a/index.html +++ b/index.html @@ -37,7 +37,8 @@ - + + diff --git a/js/index.js b/js/index.js index b7009d8..aa21708 100644 --- a/js/index.js +++ b/js/index.js @@ -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() diff --git a/js/places.js b/js/places.js index a76902e..c587c14 100644 --- a/js/places.js +++ b/js/places.js @@ -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}), diff --git a/js/symbols.js b/js/symbols.js index 3499815..886057f 100644 --- a/js/symbols.js +++ b/js/symbols.js @@ -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",