test
This commit is contained in:
@@ -4,10 +4,8 @@
|
|||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="manifest" href="/manifest.json">
|
<link rel="manifest" href="/manifest.json">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<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">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<title>MapComponents + Vite + React + TS</title>
|
<title>3D-LiDAR Visualisierung</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
30
src/App.tsx
30
src/App.tsx
@@ -1,42 +1,20 @@
|
|||||||
import { useState } from "react";
|
|
||||||
import "./App.css";
|
import "./App.css";
|
||||||
import {
|
import {
|
||||||
MapLibreMap,
|
MapLibreMap,
|
||||||
Sidebar,
|
|
||||||
TopToolbar,
|
|
||||||
} from "@mapcomponents/react-maplibre";
|
} 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() {
|
function App() {
|
||||||
const [sidebarOpen, setSidebarOpen] = useState(true);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<h1>Eine Test Karte</h1>
|
||||||
<MapLibreMap
|
<MapLibreMap
|
||||||
options={{
|
options={{
|
||||||
style: "https://wms.wheregroup.com/tileserver/style/osm-bright.json",
|
style: "https://wms.wheregroup.com/tileserver/style/osm-bright.json",
|
||||||
zoom: 19,
|
zoom: 17,
|
||||||
center: [9.9347680519611, 51.531935000614226],
|
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 />
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
body {
|
body {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-family:'Trebuchet MS';
|
||||||
|
margin: 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user