mirror of
https://github.com/jketterl/openwebrx.git
synced 2026-04-04 14:08:38 +00:00
fully implement location TTL functionality
This commit is contained in:
parent
b2ddb8f3bb
commit
25947ac177
3 changed files with 31 additions and 8 deletions
|
|
@ -152,6 +152,7 @@ $(function(){
|
|||
position: pos,
|
||||
title: sourceToString(update.source)
|
||||
}, aprsOptions, getMarkerOpacityOptions(update.lastseen) ));
|
||||
marker.source = update.source;
|
||||
marker.lastseen = update.lastseen;
|
||||
marker.mode = update.mode;
|
||||
marker.band = update.band;
|
||||
|
|
@ -520,7 +521,7 @@ $(function(){
|
|||
});
|
||||
Object.values(markers).forEach(function(m) {
|
||||
var age = now - m.lastseen;
|
||||
if (age > retention_time) {
|
||||
if (age > retention_time || (m.ttl && age > m.ttl)) {
|
||||
delete markers[sourceToKey(m.source)];
|
||||
m.setMap();
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue