mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
26 lines
576 B
JavaScript
26 lines
576 B
JavaScript
class MissionData
|
|
{
|
|
constructor()
|
|
{
|
|
this.bullseye = undefined;
|
|
this._bullseyeMarker = undefined;
|
|
}
|
|
|
|
update(data)
|
|
{
|
|
this.bullseye = data.missionData.bullseye;
|
|
this._drawBullseye();
|
|
}
|
|
|
|
_drawBullseye()
|
|
{
|
|
if (this._bullseyeMarker === undefined)
|
|
{
|
|
this._bullseyeMarker = L.marker([this.bullseye.lat, this.bullseye.lng]).addTo(map.getMap());
|
|
}
|
|
else
|
|
{
|
|
this._bullseyeMarker .setLatLng(new L.LatLng(this.bullseye.lat, this.bullseye.lng));
|
|
}
|
|
}
|
|
} |