Skip to content

Commit

Permalink
fix display of ADSB contacts
Browse files Browse the repository at this point in the history
  • Loading branch information
stronnag committed May 20, 2024
1 parent 71817af commit 38ef0ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tabs/gps.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: <strong>` + feature.get('name') + `</strong><br />`
`callsign: <strong>` + feature.get('name') + `</strong><br />`
+ `lat: <strong>`+ (feature.get('data').lat / 10000000) + `</strong><br />`
+ `lon: <strong>`+ (feature.get('data').lon / 10000000) + `</strong><br />`
+ `ASL: <strong>`+ (feature.get('data').altCM ) / 100 + `m</strong><br />`
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 38ef0ec

Please sign in to comment.