sdrweb: enhance adsb.hq.c3d2.de

This commit is contained in:
Astro 2021-10-14 02:10:18 +02:00
parent 2d1564c68b
commit a80e15487e
1 changed files with 5 additions and 14 deletions

View File

@ -68,7 +68,7 @@
} else {
selhtml = '';
}
he = '<div style="transform: scale('+b+') rotate(-'+rotation+'deg)"><img src="airplane.svg" width="64" height="64" style="'+selhtml+'"></div>';
he = '<img src="airplane.svg" width="64" height="64" style="transform: scale('+b+') rotate(-'+rotation+'deg);'+selhtml+'" title="' + plane.flight + ' (' + plane.hex + ')">';
var icon = L.divIcon({html: he, className: 'plane-icon'});
return icon;
}
@ -145,12 +145,6 @@
marker.planehex = plane.hex;
Planes[plane.hex] = plane;
}
// FIXME: Set the title
// if (plane.flight.length == 0)
// marker.setTitle(plane.hex)
// else
// marker.setTitle(plane.flight+' ('+plane.hex+')')
}
NumPlanes = data.length;
@ -164,7 +158,8 @@
refreshGeneralInfo();
window.setTimeout(fetchData, 500);
}).always(function() {
window.requestAnimationFrame(fetchData);
});
}
@ -174,14 +169,10 @@
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: 'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
maxZoom: 18,
id: 'mapbox/streets-v11',
accessToken: 'your.mapbox.access.token'
}).addTo(Map);
/* Setup our timer to poll from the server. */
window.setInterval(function() {
fetchData();
}, 500);
/* start */
fetchData();
}
</script>