ais change fixups

This commit is contained in:
Matthias Wirth
2025-01-30 06:23:24 +00:00
parent f611b7047d
commit 2052ddabe9
2 changed files with 7 additions and 3 deletions

View File

@@ -853,7 +853,7 @@ PlaneObject.prototype.updateIcon = function() {
if (useRouteAPI && this.routeString)
callsign += ' - ' + this.routeString;
if (!extendedLabels && this.type == "ais") {
if (!extendedLabels && this.dataSource == "ais") {
// show registration instead for ships as callsign is less useful
callsign = this.registration;
}
@@ -1653,6 +1653,10 @@ PlaneObject.prototype.updateData = function(now, last, data, init) {
this.checkForDB(data);
}
if (data.route) {
this.routeString = data.route;
}
this.last = now;
this.updatePositionData(now, last, data, init);
return;

View File

@@ -2191,8 +2191,8 @@ function processBoat(feature, now, last) {
ac.track = pr.cog;
if (pr.destination) { ac.routeString = pr.destination; }
if (pr.shiptype !== undefined) { ac.icaoType = shortShiptype(pr.shiptype); }
if (pr.destination) { ac.route = pr.destination; }
if (pr.shiptype !== undefined) { ac.t = shortShiptype(pr.shiptype); }
if (feature.geometry && feature.geometry.coordinates) {
const coords = feature.geometry.coordinates;