Interactive interface for browsing global, full-resolution satellite imagery
Changed multi-day return to remove all dates matching today's dates Relates to Issue #226 - Found that some mult-day events return multiple same dates but different time stamps. I updated my checks to remove all dates in the array matching today's date instead of removing just the latest event.
ZachTRicef273364eb7f8
diff --git a/web/js/naturalEvents/wv.naturalEvents.ui.js b/web/js/naturalEvents/wv.naturalEvents.ui.jsindex 46ede10ea..cbe1c9ddc 100644--- a/web/js/naturalEvents/wv.naturalEvents.ui.js+++ b/web/js/naturalEvents/wv.naturalEvents.ui.js@@ -300,11 +300,10 @@ wv.naturalEvents.ui = wv.naturalEvents.ui || function(models, ui, config, requesvar eventDateISOString = wv.util.toISOStringDate(geomsLatestDate);var todayDateISOString = wv.util.toISOStringDate(wv.util.today());- // If the latest date is equal to today,- // then remove that date as it might have incomplete data.- if(eventDateISOString == todayDateISOString) {- geoms.shift();- }+ // Remove all items in the multi-day array matching today's date+ geoms = geoms.filter(function(e) {+ return e !== todayDateISOString;+ });}