mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Merge pull request #115 from Pax1601/79-automatic-theater-selection-only-works-for-syria
Added data for other theaters
This commit is contained in:
commit
7a2d7ce526
@ -590,7 +590,7 @@ class DemoDataGenerator {
|
||||
};
|
||||
|
||||
mission(req, res){
|
||||
var ret = {theatre: "NTTR"};
|
||||
var ret = {mission: {theatre: "Nevada"}};
|
||||
res.send(JSON.stringify(ret));
|
||||
}
|
||||
|
||||
|
||||
@ -43,12 +43,21 @@ export class MissionHandler
|
||||
|
||||
if ("mission" in data)
|
||||
{
|
||||
var foo = 1;
|
||||
if (data.mission.theatre != this.#theatre)
|
||||
{
|
||||
this.#theatre = data.mission.theatre
|
||||
if (this.#theatre == "Syria")
|
||||
getMap().setView(new LatLng(34.5, 36.0), 8);
|
||||
else if (this.#theatre == "MarianaIslands")
|
||||
getMap().setView(new LatLng(16.7, 145.7), 7);
|
||||
else if (this.#theatre == "Nevada")
|
||||
getMap().setView(new LatLng(37.1, -115.2), 8);
|
||||
else if (this.#theatre == "PersianGulf")
|
||||
getMap().setView(new LatLng(26.5, 55.3), 8);
|
||||
else if (this.#theatre == "Falklands")
|
||||
getMap().setView(new LatLng(-50.6, -42.7), 7);
|
||||
else if (this.#theatre == "Caucasus")
|
||||
getMap().setView(new LatLng(42.1, 42.3), 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user