diff --git a/satnogs_api_client.pyc b/satnogs_api_client.pyc deleted file mode 100644 index 91a2e0b..0000000 Binary files a/satnogs_api_client.pyc and /dev/null differ diff --git a/templates/map.html b/templates/map.html index 56f5ce2..df6d341 100644 --- a/templates/map.html +++ b/templates/map.html @@ -91,7 +91,8 @@ function UpdateMap(e) { var name = e.data[1] var satPos = e.data[2] if (norad in Sats){ - + Sats[norad]._latlng = {"lat":satPos[0],"lng":satPos[1]} + Sats[norad].update() }else{ Sats[norad] = L.marker(satPos,{icon: dark_sat,zIndexOffset:1000}).addTo(mymap); Sats[norad].bindPopup("Name: "+name+"
Norad: "+norad+""); @@ -101,15 +102,13 @@ function UpdateMap(e) { Lines[norad][x].addTo(mymap) }); } - Sats[norad]._latlng = {"lat":satPos[0],"lng":satPos[1]} - Sats[norad].update() + Object.keys(Lines[norad]).forEach(function(x){ - if (e.data[3].includes(x)){ + if (e.data[3].includes(Number(x))){ Lines[norad][x]._latlngs[1]= {"lat":satPos[0],"lng":satPos[1]} - Lines[norad][x].update() }else{ - - + Lines[norad][x].removeFrom(mymap) + delete Lines[norad][x] } })