Add functionality to ground vehicle and blocked MLAT filter

Add box shadow to header
This commit is contained in:
James Wilson 2017-01-26 13:38:47 -06:00
parent 6b699bffc3
commit bee850061e
4 changed files with 72 additions and 4 deletions

View file

@ -86,6 +86,20 @@ PlaneObject.prototype.isFiltered = function() {
return planeAltitude < this.filter.minAltitude || planeAltitude > this.filter.maxAltitude;
}
// filter out ground vehicles
if (typeof this.filter.groundVehicles !== 'undefined' && this.filter.groundVehicles === 'filtered') {
if (typeof this.category === 'string' && this.category.startsWith('C')) {
return true;
}
}
// filter out blocked MLAT flights
if (typeof this.filter.blockedMLAT !== 'undefined' && this.filter.blockedMLAT === 'filtered') {
if (typeof this.icao === 'string' && this.icao.startsWith('~')) {
return true;
}
}
return false;
}