Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Change GIF dialog to only show hourly info when subdaily is available - Only show hourly information in GIF dialog box when a subdaily layer is available / maxZoom is less than 4 - Optimize layer requests to speed up precache and not exceed tileCache

ZachTRice0308d51d2c08
diff --git a/web/js/animation/gif.js b/web/js/animation/gif.js
index a153299cd..3404a17fa 100644
--- a/web/js/animation/gif.js
+++ b/web/js/animation/gif.js
@@ -108,7 +108,17 @@ export function animationGif(models, config, ui) {
self.reactComponent = renderPanel(options, panelCase);
};
var getUpdatedProps = function() {
+ var startDate, endDate;
var state = animModel.rangeState;
+
+ if (models.date.maxZoom < 4) {
+ startDate = state.startDate.split('T')[0];
+ endDate = state.endDate.split('T')[0];
+ } else {
+ startDate = state.startDate;
+ endDate = state.endDate;
+ }
+
return {
resolution: resolution,
resolutions: models.proj.selected.id === 'geographic' ? resolutionsGeo : resolutionsPolar,
@@ -117,8 +127,8 @@ export function animationGif(models, config, ui) {
requestSize: lodashRound(requestSize, 3),
imgHeight: lodashRound(imgHeight, 2),
imgWidth: lodashRound(imgWidth, 2),
- startDate: state.startDate,
- endDate: state.endDate,
+ startDate: startDate,
+ endDate: endDate,
speed: lodashRound(state.speed, 2),
increment: lodashCapitalize(ui.anim.widget.getIncrements())
};
@@ -542,7 +552,11 @@ export function animationGif(models, config, ui) {
while (current <= toDate) {
j++;
- strDate = util.toISOStringSeconds(current);
+ if (models.date.maxZoom > 3) {
+ strDate = util.toISOStringSeconds(current);
+ } else {
+ strDate = util.toISOStringDate(current);
+ }
products = getProducts(current);
layers = getLayers(products, proj);
@@ -557,7 +571,7 @@ export function animationGif(models, config, ui) {
} else {
a.push(src);
}
- if(ui.anim.ui.getInterval() === 'minute') {
+ if (ui.anim.ui.getInterval() === 'minute') {
intervalAmount = 10;
} else {
intervalAmount = 1;
diff --git a/web/js/animation/ui.js b/web/js/animation/ui.js
index 13b4b7180..15d3e65c4 100644
--- a/web/js/animation/ui.js
+++ b/web/js/animation/ui.js
@@ -133,16 +133,16 @@ export function animationUi(models, ui) {
var speed = animModel.rangeState.speed;
switch (true) {
case (speed > 8 && speed <= 10):
- queueLength = 500;
+ queueLength = 40;
break;
case (speed > 7 && speed <= 8):
- queueLength = 250;
+ queueLength = 32;
break;
case (speed > 5 && speed <= 7):
- queueLength = 100;
+ queueLength = 24;
break;
case (speed > 3 && speed <= 5):
- queueLength = 20;
+ queueLength = 16;
break;
case (speed > 0 && speed <= 3):
queueLength = 10;