ais change fixups
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user