This commit is contained in:
2026-04-08 20:52:52 +02:00
parent 0a076d29f5
commit 0bbd6a013d
3 changed files with 11 additions and 29 deletions

View File

@@ -4,10 +4,8 @@
<meta charset="UTF-8" />
<link rel="manifest" href="/manifest.json">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/png" sizes="196x196" href="favicon-196.png">
<link rel="apple-touch-icon" href="apple-icon-180.png">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>MapComponents + Vite + React + TS</title>
<title>3D-LiDAR Visualisierung</title>
</head>
<body>
<div id="root"></div>

View File

@@ -1,42 +1,20 @@
import { useState } from "react";
import "./App.css";
import {
MapLibreMap,
Sidebar,
TopToolbar,
} from "@mapcomponents/react-maplibre";
import IconButton from "@mui/material/IconButton";
import MenuIcon from "@mui/icons-material/Menu";
import LayerTree from "./components/LayerTree";
import Light from "./components/Light";
function App() {
const [sidebarOpen, setSidebarOpen] = useState(true);
return (
<>
<h1>Eine Test Karte</h1>
<MapLibreMap
options={{
style: "https://wms.wheregroup.com/tileserver/style/osm-bright.json",
zoom: 19,
center: [9.9347680519611, 51.531935000614226],
zoom: 17,
center: [9.209116842757239, 52.26520546238239]
}}
style={{ position: "absolute", top: 0, bottom: 0, left: 0, right: 0 }}
style={{ position: "absolute", top: 50, bottom: 0, left: 0, right: 0 }}
/>
<TopToolbar
buttons={
<IconButton
onClick={() => setSidebarOpen((prev) => !prev)}
aria-label="toggle sidebar"
>
<MenuIcon />
</IconButton>
}
/>
<Sidebar open={sidebarOpen} setOpen={setSidebarOpen}>
<LayerTree />
</Sidebar>
<Light />
</>
);
}

View File

@@ -1,3 +1,9 @@
body {
padding: 0;
}
h1 {
font-family:'Trebuchet MS';
margin: 0;
text-align: center;
}