Skip to content

Commit

Permalink
update map icons for dynamic regions to show no-rating icon after for…
Browse files Browse the repository at this point in the history
…ecast expires
  • Loading branch information
BryceSc committed Feb 15, 2022
1 parent eb19e66 commit f25695a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion server/api/forecasts/icon_set.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
var assert = require('assert');
var moment = require('moment-timezone');
var dateFns = require('date-fns');

var AVCAN_TO_INT = {
"1:Low": 1,
Expand Down Expand Up @@ -49,9 +50,18 @@ function genMovingDangerIconSet(region_tz, dangerRatings) {
iconType: 'RATINGS' },

{ from: days[2],
to: END_DATE,
to: dateFns.addDays(days[2], 1),
ratings: ratingsToInts(dangerRatings[2].dangerRating),
iconType: 'RATINGS' },

{ from: dateFns.addDays(days[2], 1),
to: END_DATE,
ratings: {
alp: 0,
tln: 0,
btl: 0,
},
iconType: 'RATINGS' },
];
}

Expand Down

0 comments on commit f25695a

Please sign in to comment.