Skip to content

Commit e921517

Browse files
committed
Merge branch 'staging' of github.com:eurodatacube/eodash into CropOM-Story
2 parents 9ba7fe7 + 0d90fbc commit e921517

File tree

3 files changed

+47
-3
lines changed

3 files changed

+47
-3
lines changed

Diff for: app/src/components/OLExportButton.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<div>
4747
Copy and paste this code into the map <b>layers</b> field of the storytelling editor:
4848
</div>
49-
<div
49+
<div v-if="dialog"
5050
class="pa-3"
5151
style="background-color: #ddd;font-family: monospace;font-size: 11px;max-height: 300px; overflow-y: auto;">
5252
{{ layersConfig }}
@@ -283,7 +283,7 @@ Text describing the current step of the tour and why it is interesting what the
283283
if (foundType === 'Vector') {
284284
// We can't export a function style function
285285
// only flat styles, for now we ignore this case
286-
if (typeof l.getStyle !== 'function') {
286+
if (typeof l.getStyle() !== 'function') {
287287
layerConfig.style = l.getStyle();
288288
}
289289
}

Diff for: app/src/components/map/MapOverlay.vue

+37
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,43 @@ export default {
8383
border-bottom: 0;
8484
margin-left: -10px;
8585
margin-bottom: -10px;
86+
}
87+
.loading-indicator {
88+
top: unset;
89+
bottom: 0.5em !important;
90+
left: 0.5em !important;
91+
height: 22px;
92+
pointer-events: none !important;
93+
}
94+
95+
.loading-indicator.hidden {
96+
display: none;
97+
}
98+
99+
@keyframes spinner {
100+
to {
101+
transform: rotate(360deg);
102+
}
103+
}
104+
105+
.spinner:after {
106+
content: "";
107+
box-sizing: border-box;
108+
position: absolute;
109+
top: 50%;
110+
left: 50%;
111+
width: 18px;
112+
height: 18px;
113+
margin-top: -9px;
114+
margin-left: -9px;
115+
border-radius: 50%;
116+
border: 5px solid rgba(180, 180, 180, 0.6);
117+
border-top-color: rgba(0, 0, 0, 0.6);
118+
animation: spinner 0.6s linear infinite;
119+
}
120+
.theme--dark .spinner:after {
121+
border: 5px solid rgba(180, 180, 180, 0.6);
122+
border-top-color: rgba(255, 255, 255, 0.6);
86123
}`;
87124
if ('mapContainer' in this.$parent.$refs && this.$parent.$refs.mapContainer.shadowRoot) {
88125
this.$parent.$refs.mapContainer.shadowRoot.appendChild(style);

Diff for: app/src/components/map/timeLayerUtils.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import GeoTIFF from 'ol/source/GeoTIFF';
1111

1212
// eslint-disable-next-line import/prefer-default-export
1313
export function updateTimeLayer(layer, config, time, drawnArea, sourceGet = 'updateTime') {
14-
if (config.protocol === 'cog' && !config.features) {
14+
if (config.protocol === 'cog' && 'sources' in config && !config.features) {
1515
const updatedSources = config.sources.map((item) => {
1616
const url = item.url.replace(/{time}/i, config.dateFormatFunction(time));
1717
return { url };
@@ -21,6 +21,13 @@ export function updateTimeLayer(layer, config, time, drawnArea, sourceGet = 'upd
2121
normalize: config.normalize ? config.normalize : false,
2222
interpolate: false,
2323
}));
24+
} else if (Array.isArray(time)) {
25+
// This case if for geotiff assets passed in the time
26+
layer.setSource(new GeoTIFF({
27+
sources: time[1].map((url) => ({ url })),
28+
normalize: config.normalize ? config.normalize : false,
29+
interpolate: false,
30+
}));
2431
} else {
2532
const source = layer.getSource();
2633
const updateTimeFunction = source.get(sourceGet);

0 commit comments

Comments
 (0)