Fixed incorrect removal of airbases on map when changing layer

This commit is contained in:
Davide Passoni
2024-06-27 11:40:47 +02:00
parent 1b4d3dd832
commit a15d2e2ec7
3 changed files with 37 additions and 37 deletions

View File

@@ -458,7 +458,7 @@ module.exports = function (configLocation) {
};
mission(req, res){
var ret = {mission: {theatre: "PersianGulf"}};
var ret = {mission: {theatre: "Nevada"}};
ret.time = Date.now();
ret.mission.dateAndTime = {

View File

@@ -321,7 +321,8 @@ export class Map extends L.Map {
}
setLayer(layerName: string) {
this.eachLayer((layer) => this.removeLayer(layer))
if (this.#layer)
this.removeLayer(this.#layer);
let theatre = getApp().getMissionManager()?.getTheatre() ?? "Nevada";