mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Improve IP selection near threat zone centers.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2754.
This commit is contained in:
@@ -384,6 +384,8 @@ export type IpZones = {
|
||||
ipBubble: LatLng[][];
|
||||
permissibleZone: LatLng[][];
|
||||
safeZones: LatLng[][][];
|
||||
preferredThreatenedZones: LatLng[][][];
|
||||
tolerableThreatenedLines: LatLng[][];
|
||||
};
|
||||
export type JoinZones = {
|
||||
homeBubble: LatLng[][];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useGetDebugIpZonesQuery } from "../../api/liberationApi";
|
||||
import { LayerGroup, Polygon } from "react-leaflet";
|
||||
import { LayerGroup, Polygon, Polyline } from "react-leaflet";
|
||||
|
||||
interface IpZonesProps {
|
||||
flightId: string;
|
||||
@@ -56,6 +56,29 @@ function IpZones(props: IpZonesProps) {
|
||||
/>
|
||||
);
|
||||
})}
|
||||
|
||||
{data.preferredThreatenedZones.map((zone, idx) => {
|
||||
return (
|
||||
<Polygon
|
||||
key={idx}
|
||||
positions={zone}
|
||||
color="#fe7d0a"
|
||||
fillOpacity={0.1}
|
||||
interactive={false}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
|
||||
{data.tolerableThreatenedLines.map((line, idx) => {
|
||||
return (
|
||||
<Polyline
|
||||
key={idx}
|
||||
positions={line}
|
||||
color="#80BA80"
|
||||
interactive={false}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user