diff --git a/decoder/html/database.class.php b/decoder/html/database.class.php index d153c0c..40c3c76 100644 --- a/decoder/html/database.class.php +++ b/decoder/html/database.class.php @@ -33,7 +33,7 @@ class MyDB extends SQLite3 { AND position.lat != 0 AND position.lon != 0 AND position.isnew = 1 - AND position.time + 86400*14 > CAST(strftime('%s', 'now') as DECIMAL) + -- AND position.time + 86400*14 > CAST(strftime('%s', 'now') as DECIMAL) GROUP BY position.call,position.time ORDER BY position.time ASC "); diff --git a/decoder/html/index.php b/decoder/html/index.php index 787527c..12d8e09 100644 --- a/decoder/html/index.php +++ b/decoder/html/index.php @@ -68,17 +68,20 @@ function drawItems() { } // Line between points - if(last) - var line = new google.maps.Polyline({ - path: [last,value], - geodesic: true, - strokeColor: last.org == 'log' || value.org == 'log' ? '#FF0000' : '#008000', - strokeOpacity: 0.4, - strokeWeight: 5, - map: map - }); + if(last) { + if(last.lat != last.lng || value.lat != value.lng) { + var line = new google.maps.Polyline({ + path: [last,value], + geodesic: true, + strokeColor: last.org == 'log' || value.org == 'log' ? '#FF0000' : '#008000', + strokeOpacity: 0.4, + strokeWeight: 5, + map: map + }); + console.log(last,value); + } items.push(line); - + } last = value; }); });