From 7f77adf6c7d3793562c1ccf6760b116b1770f367 Mon Sep 17 00:00:00 2001 From: dpassoni Date: Tue, 21 Mar 2023 13:06:21 +0100 Subject: [PATCH] Added data for other theaters --- client/demo.js | 2 +- client/src/missionhandler/missionhandler.ts | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/client/demo.js b/client/demo.js index f6e70fe0..a9a037da 100644 --- a/client/demo.js +++ b/client/demo.js @@ -590,7 +590,7 @@ class DemoDataGenerator { }; mission(req, res){ - var ret = {theatre: "NTTR"}; + var ret = {mission: {theatre: "Nevada"}}; res.send(JSON.stringify(ret)); } diff --git a/client/src/missionhandler/missionhandler.ts b/client/src/missionhandler/missionhandler.ts index 9da076d6..98dae71a 100644 --- a/client/src/missionhandler/missionhandler.ts +++ b/client/src/missionhandler/missionhandler.ts @@ -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); } } }