enable display of AIS-catcher geojson via config.js

code adapted from jvde: https://github.com/jvde-github/AIS-in-TAR1090

example config.js addition:
aiscatcher_server="URL";
aiscatcher_refresh=15;
This commit is contained in:
Matthias Wirth
2024-05-05 19:11:02 +02:00
parent eea0493ed7
commit 0fdc3a8bdc
4 changed files with 76 additions and 0 deletions

View File

@@ -1862,6 +1862,8 @@ function parseHistory() {
}
let replay_was_active = false;
let timers = {};
let timersActive = false;
function clearIntervalTimers(arg) {
@@ -1915,6 +1917,12 @@ function setIntervalTimers() {
timers.drawOutline = window.setInterval(drawOutlineJson, actualOutline.refresh);
drawOutlineJson();
}
if (aiscatcher_server) {
function updateAIScatcher() { g.aiscatcher_source.refresh(); }
setInterval(updateAIScatcher, aiscatcher_refresh * 1000);
updateAIScatcher();
}
}
let djson;