add plane markers

This commit is contained in:
Jakob Ketterl 2023-08-24 23:56:44 +02:00
parent d7e203fd82
commit 1c44099d89
4 changed files with 80 additions and 3 deletions

View file

@ -123,6 +123,8 @@ $(function(){
aprsOptions.symbol = update.location.symbol;
aprsOptions.course = update.location.course;
aprsOptions.speed = update.location.speed;
} else if (update.source.icao) {
markerClass = PlaneMarker;
}
if (markers[key]) {
marker = markers[key];
@ -252,7 +254,10 @@ $(function(){
nite.init(map);
setInterval(function() { nite.refresh() }, 10000); // every 10s
});
$.getScript('static/lib/AprsMarker.js').done(function(){
$.when(
$.getScript('static/lib/AprsMarker.js'),
$.getScript('static/lib/PlaneMarker.js')
).done(function(){
processUpdates(updateQueue);
updateQueue = [];
});
@ -351,6 +356,7 @@ $(function(){
// not just for display but also in key treatment in order not to overlap with other locations sent by the same callsign
if ('item' in source) return source['item'];
if ('object' in source) return source['object'];
if ('icao' in source) return source['icao'];
var key = source.callsign;
if ('ssid' in source) key += '-' + source.ssid;
return key;