mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Reorganize React project structure.
Whatever I was doing was getting out of control :)
This commit is contained in:
7
client/src/components/liberationmap/LiberationMap.css
Normal file
7
client/src/components/liberationmap/LiberationMap.css
Normal file
@@ -0,0 +1,7 @@
|
||||
@import "~leaflet/dist/leaflet.css";
|
||||
|
||||
.leaflet-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: 100vh;
|
||||
}
|
||||
22
client/src/components/liberationmap/LiberationMap.tsx
Normal file
22
client/src/components/liberationmap/LiberationMap.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import "./LiberationMap.css";
|
||||
|
||||
import { BasemapLayer } from "react-esri-leaflet";
|
||||
import ControlPointsLayer from "../controlpointslayer";
|
||||
import FlightPlansLayer from "../flightplanslayer";
|
||||
import { LatLng } from "leaflet";
|
||||
import { MapContainer } from "react-leaflet";
|
||||
|
||||
interface GameProps {
|
||||
mapCenter: LatLng;
|
||||
}
|
||||
|
||||
export default function LiberationMap(props: GameProps) {
|
||||
return (
|
||||
<MapContainer zoom={8} center={props.mapCenter}>
|
||||
<BasemapLayer name="ImageryClarity" />
|
||||
<ControlPointsLayer />
|
||||
<FlightPlansLayer blue={true} />
|
||||
<FlightPlansLayer blue={false} />
|
||||
</MapContainer>
|
||||
);
|
||||
}
|
||||
1
client/src/components/liberationmap/index.ts
Normal file
1
client/src/components/liberationmap/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { default } from "./LiberationMap";
|
||||
Reference in New Issue
Block a user