diff --git a/public_html/config.js b/public_html/config.js
index 57efb12..d298915 100644
--- a/public_html/config.js
+++ b/public_html/config.js
@@ -101,3 +101,5 @@ PageName = "DUMP1090";
// Path to country flags subfolder
flag_dir = "flags-tiny";
+
+
diff --git a/public_html/gmap.html b/public_html/gmap.html
index f6dd954..a602619 100644
--- a/public_html/gmap.html
+++ b/public_html/gmap.html
@@ -11,8 +11,8 @@
-
+
@@ -115,7 +115,7 @@
-
+
@@ -143,7 +143,7 @@
- | Position: n/a |
+ Position: n/a |
Country: n/a |
@@ -155,8 +155,9 @@
- | ICAO |
- Flight |
+ ICAO |
+ Country |
+ Flight |
Squawk |
Altitude |
Speed |
@@ -168,7 +169,8 @@
| ICAO |
- FLIGHT |
+ COUNTRY |
+ FLIGHT |
SQUAWK |
ALTITUDE |
SPEED |
diff --git a/public_html/script.js b/public_html/script.js
index 7dbca23..daf0948 100644
--- a/public_html/script.js
+++ b/public_html/script.js
@@ -46,7 +46,8 @@ function processReceiverUpdate(data) {
// Detect stats reset
if (MessageCountHistory.length > 0 && MessageCountHistory[MessageCountHistory.length-1].messages > data.messages) {
- MessageCountHistory = [{'time' : MessageCountHistory[MessageCountHistory.length-1].time, 'messages' : 0}];
+ MessageCountHistory = [{'time' : MessageCountHistory[MessageCountHistory.length-1].time,
+ 'messages' : 0}];
}
// Note the message count in the history
@@ -68,27 +69,26 @@ function processReceiverUpdate(data) {
} else {
plane = new PlaneObject(hex);
plane.tr = PlaneRowTemplate.cloneNode(true);
-
+
// Lookup ICAO country flag
- var hexa = +("0x" + hex);
+ var hexa = +("0x" + hex);
for (var i = 0; i < ICAO_Codes.length; i++) {
if ( hexa >= ICAO_Codes[i].start && hexa <= ICAO_Codes[i].end) {
- plane.Country = ICAO_Codes[i].Country;
- plane.Flag = '
';
+ plane.Country = ICAO_Codes[i].Country;
+ plane.Flag = '
';
}
}
- // end of flag lookup
+ // end of flag lookup
-
if (hex[0] === '~') {
// Non-ICAO address
plane.tr.cells[0].textContent = hex.substring(1);
$(plane.tr).css('font-style', 'italic');
- plane.tr.cells[1].textContent = ("");
- } else {
- plane.tr.cells[0].textContent = (hex);
- plane.tr.cells[1].innerHTML = (plane.Flag);
+ plane.tr.cells[1].textContent = null;
+ } else {
+ plane.tr.cells[0].textContent = hex;
+ plane.tr.cells[1].innerHTML = plane.Flag;
}
plane.tr.addEventListener('click', selectPlaneByHex.bind(undefined,hex,false));
@@ -324,7 +324,7 @@ function initialize_map() {
sortByDistance();
} else {
SitePosition = null;
- PlaneRowTemplate.cells[5].style.display = 'none'; // hide distance column
+ PlaneRowTemplate.cells[6].style.display = 'none'; // hide distance column
document.getElementById("distance").style.display = 'none'; // hide distance header
sortByAltitude();
}
@@ -465,12 +465,12 @@ function initialize_map() {
title: SiteName,
zIndex: -99999
});
-
- if (SiteCircles) {
+
+if (SiteCircles) {
for (var i=0;i' + NBSP + selected.flag.Country);
+ $('#selected_flag').html(selected.Flag);
+ } else {
+ $('#selected_flag').text('Unrecognized');
+ }
+
+
if (selected.position === null) {
$('#selected_position').text('n/a');
@@ -671,14 +676,13 @@ function refreshTableInfo() {
// ICAO doesn't change
tableplane.tr.cells[2].textContent = (tableplane.flight !== null ? tableplane.flight : "");
- tableplane.tr.cells[3].textContent = (tableplane.squawk !== null ? tableplane.squawk : "");
+ tableplane.tr.cells[3].textContent = (tableplane.squawk !== null ? tableplane.squawk : "");
tableplane.tr.cells[4].textContent = format_altitude_brief(tableplane.altitude, tableplane.vert_rate);
tableplane.tr.cells[5].textContent = format_speed_brief(tableplane.speed);
- tableplane.tr.cells[6].textContent = format_distance_brief(tableplane.sitedist);
+ tableplane.tr.cells[6].textContent = format_distance_brief(tableplane.sitedist);
tableplane.tr.cells[7].textContent = format_track_brief(tableplane.track);
tableplane.tr.cells[8].textContent = tableplane.messages;
tableplane.tr.cells[9].textContent = tableplane.seen.toFixed(0);
-
tableplane.tr.className = classes;
}