From 9ef7798e009677f2a1644dc6992f169177d311ec Mon Sep 17 00:00:00 2001 From: grabowski Date: Sun, 9 Aug 2026 17:04:21 +0700 Subject: [PATCH] feat: load history when clicking station markers on map --- src/static/dashboard.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/static/dashboard.html b/src/static/dashboard.html index 92eb67c..91cab95 100644 --- a/src/static/dashboard.html +++ b/src/static/dashboard.html @@ -303,7 +303,9 @@ iconSize: [size, size], iconAnchor: [size / 2, size / 2], popupAnchor: [0, -size / 2] }); const marker = L.marker([station.latitude, station.longitude], { icon, title: `${station.station_code} ${station.english_name}` }) - .bindPopup(buildPopup(station, measurement)).addTo(state.map); + .bindPopup(buildPopup(station, measurement)) + .on('click', () => loadHistory(station.station_code)) + .addTo(state.map); state.layers.push(marker); state.markers.set(station.station_code, marker); bounds.push([station.latitude, station.longitude]);