Draw aircraft locations in the new map.

https://github.com/dcs-liberation/dcs_liberation/issues/2039
This commit is contained in:
Dan Albert
2022-03-04 18:34:01 -08:00
parent 980d8f3092
commit 88cd9e19c5
9 changed files with 72 additions and 2 deletions

View File

@@ -0,0 +1,18 @@
import { selectFlights } from "../../api/flightsSlice";
import { useAppSelector } from "../../app/hooks";
import Aircraft from "../aircraft";
import { LayerGroup } from "react-leaflet";
export default function AircraftLayer() {
const atos = useAppSelector(selectFlights);
return (
<LayerGroup>
{Object.values(atos.blue).map((flight) => {
return <Aircraft key={flight.id} flight={flight} />;
})}
{Object.values(atos.red).map((flight) => {
return <Aircraft key={flight.id} flight={flight} />;
})}
</LayerGroup>
);
}

View File

@@ -0,0 +1 @@
export { default } from "./AircraftLayer";