Merge branch 'feature/regional-map' into 'main'

Feature/regional map

See merge request vkuchenik/website-framework!42
This commit is contained in:
Dan Hansen
2025-07-31 21:52:54 +00:00
4 changed files with 22 additions and 25 deletions
+2
View File
@@ -1,4 +1,6 @@
import Dashboard from './components/layout/Dashboard.jsx' import Dashboard from './components/layout/Dashboard.jsx'
import 'leaflet/dist/leaflet.css';
function App() { function App() {
return ( return (
@@ -1,11 +1,10 @@
import React from "react"; import React from "react";
import { MapContainer, TileLayer, Marker, Popup } from "react-leaflet"; import { MapContainer, TileLayer, Marker, Popup } from "react-leaflet";
import 'leaflet/dist/leaflet.css';
export default function GlobalMapCanvas() { export default function GlobalMapCanvas() {
const position = [45.61142478054226, -122.49630033167544]; // [latitude, longitude] const position = [45.61142478054226, -122.49630033167544]; // [latitude, longitude]
return ( return (
<MapContainer center={position} zoom={13} style={{ height: "100%", width: "100%" }}> <MapContainer center={position} zoom={3} style={{ height: "100%", width: "100%" }}>
<TileLayer <TileLayer
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
attribution='&copy; OpenStreetMap contributors' attribution='&copy; OpenStreetMap contributors'
@@ -1,24 +1,19 @@
import { Box, Text } from '@chakra-ui/react'; import React from "react";
import { MapContainer, TileLayer, Marker, Popup } from "react-leaflet";
export default function RegionalMapCanvas() { export default function GlobalMapCanvas() {
return ( const position = [45.61142478054226, -122.49630033167544]; // [latitude, longitude]
<Box p={8} mt={4} ml="auto" mr="auto" width="600px"> return (
<Box <MapContainer center={position} zoom={13} style={{ height: "100%", width: "100%" }}>
bg="bg" <TileLayer
shadow="md" url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
borderRadius="md" attribution='&copy; OpenStreetMap contributors'
p={8} />
width="600px" <Marker position={position}>
height="100px" <Popup>
textAlign="center" CVO Home of the volcanoligists
display="flex" </Popup>
alignItems="center" </Marker>
justifyContent="center" </MapContainer>
> );
<Text fontsize="2xl" fontWeight="bold" color="gray.700">
Regional Map Canvas coming soon!
</Text>
</Box>
</Box>
);
} }
+2 -1
View File
@@ -49,7 +49,8 @@ export default function Dashboard() {
<> <>
<Grid css={styles} <Grid css={styles}
templateRows="1fr 11fr" templateRows="1fr 11fr"
templateColumns="1fr 20fr" // templateColumns="1fr 20fr"
templateColumns="auto 1fr"
height="100vh" height="100vh"
width="100vw" width="100vw"
> >