mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Merge branch 'release-candidate' into v2
This commit is contained in:
@@ -462,7 +462,7 @@ module.exports = function (configLocation) {
|
||||
};
|
||||
|
||||
mission(req, res){
|
||||
var ret = {mission: {theatre: "Nevada"}};
|
||||
var ret = {mission: {theatre: "PersianGulf"}};
|
||||
ret.time = Date.now();
|
||||
|
||||
ret.mission.dateAndTime = {
|
||||
|
||||
399
frontend/server/public/databases/airbases/kola.json
Normal file
399
frontend/server/public/databases/airbases/kola.json
Normal file
@@ -0,0 +1,399 @@
|
||||
{
|
||||
"airfields": {
|
||||
"Severomorsk-1": {
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"14": {
|
||||
"magHeading": "118",
|
||||
"Heading": "135",
|
||||
"ILS": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"32": {
|
||||
"magHeading": "299",
|
||||
"Heading": "315",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "9084"
|
||||
}
|
||||
],
|
||||
"TACAN": "",
|
||||
"ICAO": "ULAK",
|
||||
"elevation": "261"
|
||||
},
|
||||
"Banak": {
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"34": {
|
||||
"magHeading": "339",
|
||||
"Heading": "352",
|
||||
"ILS": "108.30"
|
||||
}
|
||||
},
|
||||
{
|
||||
"16": {
|
||||
"magHeading": "159",
|
||||
"Heading": "172",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "8104"
|
||||
}
|
||||
],
|
||||
"TACAN": "47X",
|
||||
"ICAO": "ENNA",
|
||||
"elevation": "17"
|
||||
},
|
||||
"Severomorsk-3": {
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"35": {
|
||||
"magHeading": "334",
|
||||
"Heading": "351",
|
||||
"ILS": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"17": {
|
||||
"magHeading": "154",
|
||||
"Heading": "171",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "7497"
|
||||
}
|
||||
],
|
||||
"TACAN": "",
|
||||
"ICAO": "XLMV",
|
||||
"elevation": "567"
|
||||
},
|
||||
"Kemi Tornio": {
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"18": {
|
||||
"magHeading": "173",
|
||||
"Heading": "184",
|
||||
"ILS": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"36": {
|
||||
"magHeading": "355",
|
||||
"Heading": "4",
|
||||
"ILS": "110.90"
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "7862"
|
||||
}
|
||||
],
|
||||
"TACAN": "",
|
||||
"ICAO": "EFKE",
|
||||
"elevation": "46"
|
||||
},
|
||||
"Murmansk International": {
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"13": {
|
||||
"magHeading": "119",
|
||||
"Heading": "135",
|
||||
"ILS": "110.30"
|
||||
}
|
||||
},
|
||||
{
|
||||
"31": {
|
||||
"magHeading": "299",
|
||||
"Heading": "315",
|
||||
"ILS": "108.50"
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "7926"
|
||||
}
|
||||
],
|
||||
"TACAN": "",
|
||||
"ICAO": "ULMM",
|
||||
"elevation": "249"
|
||||
},
|
||||
"Bodo": {
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"07": {
|
||||
"magHeading": "78",
|
||||
"Heading": "84",
|
||||
"ILS": "110.30"
|
||||
}
|
||||
},
|
||||
{
|
||||
"25": {
|
||||
"magHeading": "257",
|
||||
"Heading": "264",
|
||||
"ILS": "108.70"
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "8618"
|
||||
}
|
||||
],
|
||||
"TACAN": "45X",
|
||||
"ICAO": "ENBO",
|
||||
"elevation": "25"
|
||||
},
|
||||
"Rovaniemi": {
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"21": {
|
||||
"magHeading": "201",
|
||||
"Heading": "213",
|
||||
"ILS": "117.70"
|
||||
}
|
||||
},
|
||||
{
|
||||
"03": {
|
||||
"magHeading": "21",
|
||||
"Heading": "33",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "9096"
|
||||
}
|
||||
],
|
||||
"TACAN": "",
|
||||
"ICAO": "EFRO",
|
||||
"elevation": "612"
|
||||
},
|
||||
"Kalixfors": {
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"17": {
|
||||
"magHeading": "162",
|
||||
"Heading": "171",
|
||||
"ILS": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"35": {
|
||||
"magHeading": "342",
|
||||
"Heading": "351",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "3597"
|
||||
}
|
||||
],
|
||||
"TACAN": "",
|
||||
"ICAO": "ESUK",
|
||||
"elevation": "1552"
|
||||
},
|
||||
"Jokkmokk": {
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"14": {
|
||||
"magHeading": "136",
|
||||
"Heading": "145",
|
||||
"ILS": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"32": {
|
||||
"magHeading": "316",
|
||||
"Heading": "325",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "6306"
|
||||
},
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"32": {
|
||||
"magHeading": "323",
|
||||
"Heading": "332",
|
||||
"ILS": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"14": {
|
||||
"magHeading": "143",
|
||||
"Heading": "152",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "6306"
|
||||
},
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"15": {
|
||||
"magHeading": "124",
|
||||
"Heading": "133",
|
||||
"ILS": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"33": {
|
||||
"magHeading": "302",
|
||||
"Heading": "313",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "3828"
|
||||
},
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"36": {
|
||||
"magHeading": "354",
|
||||
"Heading": "3",
|
||||
"ILS": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"18": {
|
||||
"magHeading": "174",
|
||||
"Heading": "183",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "3828"
|
||||
}
|
||||
],
|
||||
"TACAN": "",
|
||||
"ICAO": "ESNJ",
|
||||
"elevation": "891"
|
||||
},
|
||||
"Monchegorsk": {
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"01": {
|
||||
"magHeading": "001",
|
||||
"Heading": "16",
|
||||
"ILS": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"19": {
|
||||
"magHeading": "180",
|
||||
"Heading": "196",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "7509"
|
||||
}
|
||||
],
|
||||
"TACAN": "",
|
||||
"ICAO": "UMOE",
|
||||
"elevation": "547"
|
||||
},
|
||||
"Olenya": {
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"19": {
|
||||
"magHeading": "171",
|
||||
"Heading": "188",
|
||||
"ILS": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"01": {
|
||||
"magHeading": "352",
|
||||
"Heading": "8",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "10863"
|
||||
}
|
||||
],
|
||||
"TACAN": "",
|
||||
"ICAO": "UOLE",
|
||||
"elevation": "721"
|
||||
},
|
||||
"Bas 100": {
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"22": {
|
||||
"magHeading": "210",
|
||||
"Heading": "223",
|
||||
"ILS": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"04": {
|
||||
"magHeading": "31",
|
||||
"Heading": "43",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "7719"
|
||||
}
|
||||
],
|
||||
"TACAN": "",
|
||||
"ICAO": "",
|
||||
"elevation": "735"
|
||||
},
|
||||
"Kiruna": {
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"21": {
|
||||
"magHeading": "204",
|
||||
"Heading": "214",
|
||||
"ILS": "110.30"
|
||||
}
|
||||
},
|
||||
{
|
||||
"03": {
|
||||
"magHeading": "25",
|
||||
"Heading": "34",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "7432"
|
||||
}
|
||||
],
|
||||
"TACAN": "",
|
||||
"ICAO": "ESNQ",
|
||||
"elevation": "1434"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,8 @@ const allowedTheatres = [
|
||||
"persiangulf",
|
||||
"sinaimap",
|
||||
"syria",
|
||||
"thechannel"
|
||||
"thechannel",
|
||||
"kola"
|
||||
];
|
||||
|
||||
function getAirbasesData( theatreName ) {
|
||||
|
||||
5
frontend/website/@types/olympus/index.d.ts
vendored
5
frontend/website/@types/olympus/index.d.ts
vendored
@@ -141,6 +141,7 @@ declare module "constants/constants" {
|
||||
Falklands: LatLng[];
|
||||
Normandy: LatLng[];
|
||||
SinaiMap: LatLng[];
|
||||
Kola: LatLng[];
|
||||
};
|
||||
export const mapBounds: {
|
||||
Syria: {
|
||||
@@ -175,6 +176,10 @@ declare module "constants/constants" {
|
||||
bounds: LatLngBounds;
|
||||
zoom: number;
|
||||
};
|
||||
Kola: {
|
||||
bounds: LatLngBounds;
|
||||
zoom: number;
|
||||
};
|
||||
};
|
||||
export const defaultMapLayers: {
|
||||
"ArcGIS Satellite": {
|
||||
|
||||
@@ -140,6 +140,13 @@ export const minimapBoundaries = {
|
||||
new LatLng(25.946944, 36.897778),
|
||||
new LatLng(34.312222, 36.897778),
|
||||
new LatLng(34.312222, 28.523333)
|
||||
],
|
||||
"Kola": [ // Kola
|
||||
new LatLng(72.055300, 4.0140000),
|
||||
new LatLng(64.421145, 10.353076),
|
||||
new LatLng(63.570300, 39.364000),
|
||||
new LatLng(71.48000, 48.091100),
|
||||
new LatLng(72.055300, 4.01400003)
|
||||
]
|
||||
};
|
||||
|
||||
@@ -152,17 +159,12 @@ export const mapBounds = {
|
||||
"Falklands": { bounds: new LatLngBounds([-49.097217, -79.418267], [-56.874517, -43.316433]), zoom: 3 },
|
||||
"Normandy": { bounds: new LatLngBounds([50.44, -3.29], [48.12, 3.70]), zoom: 5 },
|
||||
"SinaiMap": { bounds: new LatLngBounds([34.312222, 28.523333], [25.946944, 36.897778]), zoom: 4 },
|
||||
"Kola": { bounds: new LatLngBounds([61.59999, 4.29982], [75.05179, 44.29982]), zoom: 3}
|
||||
}
|
||||
|
||||
export const DCSMapsZoomLevelsByTheatre: { [key: string]: { minNativeZoom?: number, maxNativeZoom?: number, minZoom?: number }[] } = {
|
||||
"Syria": [],
|
||||
"MarianaIslands": [{ minNativeZoom: 1, maxNativeZoom: 13, }, { minNativeZoom: 14, maxNativeZoom: 18, minZoom: 14 }],
|
||||
"Nevada": [],
|
||||
"PersianGulf": [],
|
||||
"Caucasus": [],
|
||||
"Falklands": [],
|
||||
"Normandy": [],
|
||||
"SinaiMap": [],
|
||||
export const mapMirrors = {
|
||||
"DCS Map mirror 1": "https://maps.dcsolympus.com/maps",
|
||||
"DCS Map mirror 2": "https://refugees.dcsolympus.com/maps"
|
||||
}
|
||||
|
||||
export const defaultMapLayers = {
|
||||
|
||||
@@ -12,7 +12,7 @@ import { DestinationPreviewMarker } from "./markers/destinationpreviewmarker";
|
||||
import { TemporaryUnitMarker } from "./markers/temporaryunitmarker";
|
||||
import { ClickableMiniMap } from "./clickableminimap";
|
||||
import { SVGInjector } from '@tanem/svg-injector'
|
||||
import { defaultMapLayers, mapBounds, minimapBoundaries, IDLE, COALITIONAREA_DRAW_POLYGON, MOVE_UNIT, SHOW_UNIT_CONTACTS, HIDE_GROUP_MEMBERS, SHOW_UNIT_PATHS, SHOW_UNIT_TARGETS, SHOW_UNIT_LABELS, SHOW_UNITS_ENGAGEMENT_RINGS, SHOW_UNITS_ACQUISITION_RINGS, HIDE_UNITS_SHORT_RANGE_RINGS, FILL_SELECTED_RING, MAP_MARKER_CONTROLS, DCS_LINK_PORT, DCSMapsZoomLevelsByTheatre, DCS_LINK_RATIO } from "../constants/constants";
|
||||
import { defaultMapLayers, mapBounds, minimapBoundaries, IDLE, COALITIONAREA_DRAW_POLYGON, MOVE_UNIT, SHOW_UNIT_CONTACTS, HIDE_GROUP_MEMBERS, SHOW_UNIT_PATHS, SHOW_UNIT_TARGETS, SHOW_UNIT_LABELS, SHOW_UNITS_ENGAGEMENT_RINGS, SHOW_UNITS_ACQUISITION_RINGS, HIDE_UNITS_SHORT_RANGE_RINGS, FILL_SELECTED_RING, MAP_MARKER_CONTROLS, DCS_LINK_PORT, DCS_LINK_RATIO, mapMirrors } from "../constants/constants";
|
||||
import { CoalitionArea } from "./coalitionarea/coalitionarea";
|
||||
import { CoalitionAreaContextMenu } from "../contextmenus/coalitionareacontextmenu";
|
||||
import { DrawingCursor } from "./coalitionarea/drawingcursor";
|
||||
@@ -131,7 +131,7 @@ export class Map extends L.Map {
|
||||
|
||||
this.#ID = ID;
|
||||
|
||||
this.setLayer("DCS Map");
|
||||
this.setLayer("DCS Map mirror 1");
|
||||
|
||||
/* Minimap */
|
||||
var minimapLayer = new L.TileLayer(this.#mapLayers[Object.keys(this.#mapLayers)[0]].urlTemplate, { minZoom: 0, maxZoom: 13 });
|
||||
@@ -312,24 +312,38 @@ export class Map extends L.Map {
|
||||
this.#layer = new L.TileLayer(layerData.urlTemplate, layerData);
|
||||
}
|
||||
/* DCS core layers are handled here */
|
||||
} else if (["DCS Map", "DCS Satellite"].includes(layerName) ) {
|
||||
} else if (["DCS Map mirror 1", "DCS Map mirror 2"].includes(layerName) ) {
|
||||
let layerData = this.#mapLayers["ArcGIS Satellite"];
|
||||
let layers = [new L.TileLayer(layerData.urlTemplate, layerData)];
|
||||
|
||||
let template = `https://maps.dcsolympus.com/maps/${layerName === "DCS Map"? "alt": "sat"}-{theatre}-modern/{z}/{x}/{y}.png`;
|
||||
layers.push(...DCSMapsZoomLevelsByTheatre[theatre].map((nativeZoomLevels: any) => {
|
||||
return new L.TileLayer(template.replace("{theatre}", theatre.toLowerCase()), {...nativeZoomLevels, maxZoom: 20, crossOrigin: ""});
|
||||
}));
|
||||
|
||||
this.#layer = new L.LayerGroup(layers);
|
||||
/* Load the configuration file */
|
||||
const mirror = mapMirrors[layerName as keyof typeof mapMirrors];
|
||||
const request = new Request(mirror + "/config.json");
|
||||
fetch(request).then((response) => {
|
||||
if (response.status === 200) {
|
||||
return response.json();
|
||||
} else {
|
||||
return {};
|
||||
}
|
||||
}).then((res: any) => {
|
||||
if ("alt-" + theatre.toLowerCase() in res) {
|
||||
let template = `${mirror}/alt-${theatre.toLowerCase()}/{z}/{x}/{y}.png`;
|
||||
layers.push(...res["alt-" + theatre.toLowerCase()].map((layerConfig: any) => {
|
||||
return new L.TileLayer(template, {...layerConfig, crossOrigin: ""});
|
||||
}));
|
||||
}
|
||||
this.#layer = new L.LayerGroup(layers);
|
||||
this.#layer?.addTo(this);
|
||||
}).catch(() => {
|
||||
this.#layer = new L.LayerGroup(layers);
|
||||
this.#layer?.addTo(this);
|
||||
})
|
||||
}
|
||||
|
||||
this.#layer?.addTo(this);
|
||||
this.#layerName = layerName;
|
||||
}
|
||||
|
||||
getLayers() {
|
||||
let layers = ["DCS Map", "DCS Satellite"]
|
||||
let layers = ["DCS Map mirror 1", "DCS Map mirror 2"]
|
||||
layers.push(...Object.keys(this.#mapLayers));
|
||||
return layers;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user