Skip to content

Commit

Permalink
poster popup fix
Browse files Browse the repository at this point in the history
  • Loading branch information
democat3457 committed Nov 5, 2024
1 parent 941bcd6 commit 679eb97
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions posters/templates/posters/poster_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,11 @@ <h1>Posters</h1>
parseFloat(poster.longitude),
]);
data.forEach((poster) => {
L.marker([
var marker = L.marker([
parseFloat(poster.latitude),
parseFloat(poster.longitude),
])
.bindPopup(L.popup().setContent(poster.location + " - " + poster.visits.count()))
.addTo(map);
]).addTo(map);
marker.bindPopup(L.popup().setContent(poster.location + " - " + poster.visits.count())).openPopup();
});
})
.catch((error) => console.error("Error fetching poster data:", error));
Expand Down

0 comments on commit 679eb97

Please sign in to comment.