Fix add widget behavior, widget types and view settings button menu item...

This commit is contained in:
Dan Hansen
2026-01-30 19:02:31 +00:00
parent b1e9b442ff
commit 6c49239675
51 changed files with 4999 additions and 174 deletions
@@ -3,21 +3,23 @@ import { MapContainer, TileLayer, Marker, Popup } from "react-leaflet";
import MapButtonControls from "../CanvasComponents/MapButtonControls";
import MapSettingsButton from "../CanvasComponents/MapSettingsButton";
export default function GlobalMap() {
const position = [45.61142478054226, -122.49630033167544]; // [latitude, longitude]
export default function GlobalMap({markers = []}) {
const origin = [45.61142478054226, -122.49630033167544]; // [latitude, longitude]
return (
<MapContainer center={position} zoom={3} style={{ height: "100%", width: "100%" }}>
<MapContainer center={origin} zoom={3} style={{ height: "100%", width: "100%" }}>
<TileLayer
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
attribution='&copy; OpenStreetMap contributors'
/>
<MapButtonControls settingsBtn = {<MapSettingsButton />} position="topright" />
<Marker position={position}>
<Popup>
CVO Home of the volcanoligists
</Popup>
</Marker>
{markers.map(m => (
<Marker key={m.id} position = {m.position}>
<Popup>
{m.label}
</Popup>
</Marker>
))}
</MapContainer>
);
}