Require passing actual markers into SetMarkers
And frame locations of images and the report when a report is selected
This commit is contained in:
parent
741b60485c
commit
cd763efb15
3 changed files with 37 additions and 18 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue