Add regional map functionality, and edit global map zoom settings

This commit is contained in:
Daniel S. Hansen
2025-07-31 14:39:35 -07:00
parent 31d38e5113
commit e6b7d82310
3 changed files with 22 additions and 24 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,11 @@
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'; // 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,20 @@
import { Box, Text } from '@chakra-ui/react'; import React from "react";
import { MapContainer, TileLayer, Marker, Popup } from "react-leaflet";
// import 'leaflet/dist/leaflet.css';
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>
);
} }