Skip to content

Commit

Permalink
Always update html content
Browse files Browse the repository at this point in the history
  • Loading branch information
kiwijos committed Jan 14, 2024
1 parent 0e4feef commit 9560f00
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/routes/(protected)/admin/map/live/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,9 @@
}
let popup = popups[id];
const popupContent = singleBikeFormPopupHTML(feature);
if (!popup) {
const popupContent = singleBikeFormPopupHTML(feature);
popup = popups[id] = new maplibregl.Popup()
// @ts-expect-error - Coordinates are valid, just typed differently
.setLngLat(coordinates)
Expand All @@ -300,7 +299,7 @@
}
// @ts-expect-error - Coordinates are valid, just typed differently
if (!popup.isOpen()) popup.setLngLat(coordinates).addTo(map);
popup.setLngLat(coordinates).setHTML(popupContent).addTo(map);
});
map.on('mouseenter', 'unclustered-point', () => {
Expand Down

0 comments on commit 9560f00

Please sign in to comment.