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]);