Interactive interface for browsing global, full-resolution satellite imagery
Make image request using `YYYY-MM-DDThh:mm:ssZ` & Fix HH:MM increment - When passing in the date to layerbuilder, format the date using ISOString without milliseconds, rather than just the date - Fix `minute` case in util.dateAdd method to properly get & set UTC minutes
ZachTRice922bd2e41ec8
diff --git a/web/js/map/layerbuilder.js b/web/js/map/layerbuilder.jsindex 908872e00..bbad766f0 100644--- a/web/js/map/layerbuilder.js+++ b/web/js/map/layerbuilder.js@@ -205,7 +205,7 @@ export function mapLayerBuilder(models, config, cache, Parent) {if (day) {date = util.dateAdd(date, 'day', day);}- extra = '?TIME=' + util.toISOStringDate(date);+ extra = '?TIME=' + date.toISOString().split('.')[0] + 'Z';}var sourceOptions = {url: source.url + extra,diff --git a/web/js/util/util.js b/web/js/util/util.jsindex 20663b46b..8300a2972 100644--- a/web/js/util/util.js+++ b/web/js/util/util.js@@ -284,7 +284,7 @@ export default (function (self) {var newDate = new Date(date.getTime());switch (interval) {case 'minute':- newDate.setUTCDate(newDate.getUTCDate() + amount);+ newDate.setUTCMinutes(newDate.getUTCMinutes() + amount);break;case 'day':newDate.setUTCDate(newDate.getUTCDate() + amount);