From a80e15487e33011c40f54018f4a3502aac1399a4 Mon Sep 17 00:00:00 2001 From: Astro Date: Thu, 14 Oct 2021 02:10:18 +0200 Subject: [PATCH] sdrweb: enhance adsb.hq.c3d2.de --- hosts/containers/sdrweb/adsb.html | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/hosts/containers/sdrweb/adsb.html b/hosts/containers/sdrweb/adsb.html index 572e18a3..199c3bd8 100644 --- a/hosts/containers/sdrweb/adsb.html +++ b/hosts/containers/sdrweb/adsb.html @@ -68,7 +68,7 @@ } else { selhtml = ''; } - he = '
'; + he = ''; 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 © OpenStreetMap contributors, CC-BY-SA, Imagery © Mapbox', 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(); }