Require passing actual markers into SetMarkers

And frame locations of images and the report when a report is selected
This commit is contained in:
Eli Ribble 2026-03-10 04:20:55 +00:00
parent 741b60485c
commit cd763efb15
No known key found for this signature in database
3 changed files with 37 additions and 18 deletions

View file

@ -126,14 +126,10 @@ class MapMultipoint extends HTMLElement {
SetMarkers(markers) {
console.log("Setting map markers", markers);
this._markers.forEach((marker) => marker.remove());
this._markers = markers.map((m) => {
return new maplibregl.Marker({
color: "#FF0000",
draggable: false,
})
.setLngLat([m.longitude, m.latitude])
.addTo(this._map);
});
this._markers = markers;
for (let m of markers) {
m.addTo(this._map);
}
}
}