diff --git a/html/planeObject.js b/html/planeObject.js
index 9375394..4fe75c1 100644
--- a/html/planeObject.js
+++ b/html/planeObject.js
@@ -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;
diff --git a/html/script.js b/html/script.js
index 1c358e3..e65dffa 100644
--- a/html/script.js
+++ b/html/script.js
@@ -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;