From 38ef0ec4564e6837d1eccd0ef4a68311b452a618 Mon Sep 17 00:00:00 2001 From: Jonathan Hudson Date: Mon, 20 May 2024 16:30:35 +0100 Subject: [PATCH] fix display of ADSB contacts --- tabs/gps.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tabs/gps.js b/tabs/gps.js index 07c4f95ff..87aee1637 100644 --- a/tabs/gps.js +++ b/tabs/gps.js @@ -229,10 +229,10 @@ TABS.gps.initialize = function (callback) { var feature = mapHandler.forEachFeatureAtPixel(mapHandler.getEventPixel(evt.originalEvent), function(feature, layer) { return feature; }); - + if (feature && feature.get('data') && feature.get('name')) { TABS.gps.toolboxAdsbVehicle.setContent( - `icao: ` + feature.get('name') + `
` + `callsign: ` + feature.get('name') + `
` + `lat: `+ (feature.get('data').lat / 10000000) + `
` + `lon: `+ (feature.get('data').lon / 10000000) + `
` + `ASL: `+ (feature.get('data').altCM ) / 100 + `m
` @@ -357,7 +357,7 @@ TABS.gps.initialize = function (callback) { mapHandler.addLayer(vehicleLayer); } - if (vehicle.lat > 0 && vehicle.lon > 0 && vehicle.ttl > 0) { + if (vehicle.lat != 0 && vehicle.lon != 0 && vehicle.ttl > 0) { let vehicleIconStyle = new ol.style.Style({ image: new ol.style.Icon(({ opacity: 1,