diff --git a/js/config.ts b/js/config.ts index 47afd31..0a3c119 100644 --- a/js/config.ts +++ b/js/config.ts @@ -1,7 +1,7 @@ export const ALEXI_URL = "https://dhdaines.github.io/alexi"; -export const ZONALDA_API_URL = "https://zonalda.ecolingui.ca/api"; -//export const ZONALDA_API_URL = "http://localhost:8000/api"; -export const COLLECTES_URL = "https://ville.sainte-adele.qc.ca/upload/documents/SA-calendrier-collecte-2023-2024-8-5x11-vertical-CROP.pdf"; +//export const ZONALDA_API_URL = "https://zonalda.ecolingui.ca/api"; +export const ZONALDA_API_URL = "http://localhost:8000/api"; +export const COLLECTES_URL = "https://ville.sainte-adele.qc.ca/upload/images/SA-calendrier-collecte-2023-2024-8-5x11-vertical-CROP.jpg"; export const COLLECTE_ZONE_URL = { jaune: "https://lespaysdenhaut.com/wp-content/uploads/2023/07/SainteAdele_jaune2023-24.pdf", rose: "https://lespaysdenhaut.com/wp-content/uploads/2023/07/SainteAdele_rose-2023-24.pdf", diff --git a/js/main.ts b/js/main.ts index e81f0ba..559b3d1 100644 --- a/js/main.ts +++ b/js/main.ts @@ -3,7 +3,7 @@ import VectorSource from "ol/source/Vector.js"; import { Tile as TileLayer, Vector as VectorLayer } from "ol/layer.js"; import OSM from "ol/source/OSM"; import { fromLonLat, toLonLat } from "ol/proj.js"; -import { ZONALDA_API_URL, ALEXI_URL, COLLECTES_URL } from "./config"; +import { ZONALDA_API_URL, ALEXI_URL, COLLECTES_URL, COLLECTE_ZONE_URL } from "./config"; import { GeocoderAutocomplete } from '@geoapify/geocoder-autocomplete'; import { Feature as GeoJSONFeature, Point as GeoJSONPoint, Position as GeoJSONPosition } from "geojson"; import { circular } from "ol/geom/Polygon"; @@ -104,7 +104,10 @@ function collecteTexte(info) { if (info === null) return "inconnue"; const { couleur, jour } = info; - return `${jour} (calendrier PDF)`; + if (couleur in COLLECTE_ZONE_URL) + return `${jour} (zone ${couleur}) (calendrier PDF)`; + else + return `${jour} (calendrier PDF)`; } function conseilTexte(info) { diff --git a/package-lock.json b/package-lock.json index 73a3043..406b298 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "dependencies": { "@geoapify/geocoder-autocomplete": "^2.0.1", "@types/geojson": "^7946.0.13", - "ol": "*" + "ol": "latest" }, "devDependencies": { "typescript": "^5.3.3",