N/A (' + selected.icao + ')';
+ html += ' | N/A (' +
+ selected.icao + ')';
} else if (selected && selected.flight != "") {
- html += ' |
' + selected.flight + '';
+ html += ' |
' +
+ selected.flight + '';
} else {
html += ' |
DUMP1090';
}
@@ -355,12 +364,18 @@ function refreshTableInfo() {
html += '';
html += 'ICAO | ';
html += 'Flight | ';
- html += 'Squawk | ';
- html += 'Altitude | ';
- html += 'Speed | ';
- html += 'Track | ';
- html += 'Msgs | ';
- html += 'Seen | |
';
+ html += 'Squawk | ';
+ html += 'Altitude | ';
+ html += 'Speed | ';
+ html += 'Track | ';
+ html += 'Msgs | ';
+ html += 'Seen | ';
for (var tablep in Planes) {
var tableplane = Planes[tablep]
if (!tableplane.reapable) {
@@ -526,3 +541,29 @@ function selectPlaneByHex(hex) {
refreshSelected();
refreshTableInfo();
}
+
+function drawCircle(marker, distance) {
+ if (typeof distance === 'undefined') {
+ return false;
+
+ if (!(!isNaN(parseFloat(distance)) && isFinite(distance)) || distance < 0) {
+ return false;
+ }
+ }
+
+ distance *= 1000.0;
+ if (!Metric) {
+ distance *= 1.852;
+ }
+
+ // Add circle overlay and bind to marker
+ var circle = new google.maps.Circle({
+ map: GoogleMap,
+ radius: distance, // In meters
+ fillOpacity: 0.0,
+ strokeWeight: 1,
+ strokeOpacity: 0.3
+ });
+ circle.bindTo('center', marker, 'position');
+}
+