File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,10 @@ const CONFIG = {
4
4
mapboxAccessToken : 'pk.eyJ1IjoieWVsZGFyYnkiLCJhIjoiY2w3czRlcG5qMGxvbDNxbnVoOTUzeW9nNCJ9.RKnzgCuuLaaFzcFsuZWdFQ' ,
5
5
6
6
// if detections are closer than this constant, combine them into a single marker
7
- MIN_SEPARATION_OF_DETECTIONS_IN_METERS : 20
7
+ MIN_SEPARATION_OF_DETECTIONS_IN_METERS : 20 ,
8
+
9
+ // wait until a detection is made on this number of distinct frames before showing the marker
10
+ MIN_DETECTIONS_TO_MAKE_VISIBLE : 2
8
11
}
9
12
10
13
// Dependency for map rendering
@@ -230,7 +233,7 @@ var renderMap = async function(videoFile, flightLogFile) {
230
233
231
234
// only show a panel if it has been detected at least twice
232
235
// (this prevents noisy predictions from clogging up the map)
233
- if ( ! p . marker && p . points . length >= 2 ) {
236
+ if ( ! p . marker && p . points . length >= CONFIG . MIN_DETECTIONS_TO_MAKE_VISIBLE ) {
234
237
var marker = new mapboxgl . Marker ( )
235
238
. setLngLat ( location )
236
239
. addTo ( map ) ;
You can’t perform that action at this time.
0 commit comments