@eodash/eodash 5.6.1 → 5.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/client/components/DashboardLayout.vue +1 -1
- package/core/client/components/EodashOverlay.vue +27 -4
- package/core/client/composables/DefineEodash.js +0 -1
- package/core/client/composables/DefineWidgets.js +3 -1
- package/core/client/composables/index.js +6 -2
- package/core/client/eodashSTAC/EodashCollection.js +79 -45
- package/core/client/eodashSTAC/cql.js +64 -0
- package/core/client/eodashSTAC/createLayers.js +192 -125
- package/core/client/eodashSTAC/helpers.js +423 -97
- package/core/client/eodashSTAC/mosaic.js +416 -0
- package/core/client/plugins/axios.js +31 -1
- package/core/client/store/actions.js +1 -1
- package/core/client/store/stac.js +25 -4
- package/core/client/store/states.js +20 -2
- package/core/client/types.ts +155 -29
- package/core/client/utils/bands-editor/exampleSchema.json +50 -50
- package/core/client/utils/index.js +4 -0
- package/core/client/utils/states.js +10 -0
- package/dist/client/{DashboardLayout-CqMb7OXc.js → DashboardLayout-ePbdvUTE.js} +5 -5
- package/dist/client/{DynamicWebComponent-DqKqTf7l.js → DynamicWebComponent-g5SdRbjY.js} +1 -1
- package/dist/client/{EodashChart-PkUQfH0k.js → EodashChart-ChrkA5oS.js} +7 -6
- package/dist/client/{EodashDatePicker-DLJGdTtX.js → EodashDatePicker-CY1TrsDo.js} +3 -3
- package/dist/client/{EodashItemFilter-Dk8KjFcX.js → EodashItemFilter-DzshHDlS.js} +2 -1
- package/dist/client/{EodashLayerControl-CC1Cogrn.js → EodashLayerControl-DMCeMkSd.js} +70 -22
- package/dist/client/{EodashLayoutSwitcher-5WZYd6rr.js → EodashLayoutSwitcher-iJ8mX1rF.js} +3 -3
- package/dist/client/EodashMapBtns-C7Cr7q5Y.js +592 -0
- package/dist/client/EodashStacInfo-K7-iuXa7.js +169 -0
- package/dist/client/{EodashTools-CGZtTh45.js → EodashTools-BEK7e7JM.js} +4 -4
- package/dist/client/{ExportState-Ce0ZnrX_.js → ExportState-CqIzfMYQ.js} +6 -168
- package/dist/client/{Footer-CnZqEiop.js → Footer-1P0cmBOZ.js} +1 -1
- package/dist/client/{Header-Dr5PBIm8.js → Header-CkkBaBNh.js} +2 -2
- package/dist/client/MobileLayout-BPf49kDU.js +118 -0
- package/dist/client/{PopUp-DjvE_71e.js → PopUp-DPZq5SWI.js} +4 -168
- package/dist/client/{ProcessList-kf3olI7W.js → ProcessList-DuI6WpS1.js} +5 -5
- package/dist/client/VDivider-Bj9LG_JV.js +168 -0
- package/dist/client/{VImg-Bj6uWt6j.js → VImg-Ddv5OyMz.js} +2 -2
- package/dist/client/{VMain-Cm0UmKGi.js → VMain-7yqk_qC3.js} +1 -1
- package/dist/client/{VTooltip-DbBu-ky3.js → VTooltip-2hAJyEoa.js} +2 -2
- package/dist/client/{WidgetsContainer-CfLnd44U.js → WidgetsContainer-2DOrlwCB.js} +1 -1
- package/dist/client/{asWebComponent-DfULAbpq.js → asWebComponent-BlFN2lkB.js} +493 -335
- package/dist/client/{async-CIbKXEEe.js → async-B2H8ZwUK.js} +21 -10
- package/dist/client/create-layers-config-u_vn5hPk.js +182 -0
- package/dist/client/dialog-transition-BrMkMiNa.js +170 -0
- package/dist/client/eo-dash.js +1 -1
- package/dist/client/{forwardRefs-yj3VWOK5.js → forwardRefs-DAlror6d.js} +8 -87
- package/dist/client/{handling-s8xt2JwF.js → handling-B6I1V5eG.js} +123 -85
- package/dist/client/{helpers-DAVGYl_f.js → helpers-CBqIUSXJ.js} +3034 -1649
- package/dist/client/index-BWq1ZKaV.js +3168 -0
- package/dist/client/{index-CYz6dT7K.js → index-CJ9UI3ln.js} +2 -2
- package/dist/client/index-DXLz4sFR.js +442 -0
- package/dist/client/{index-4TrjfJ32.js → index-DhKU6KqM.js} +230 -231
- package/dist/client/{index-Bu8BMA9q.js → index-DjQlbWbJ.js} +70 -83
- package/dist/client/material-symbols-outlined.woff2 +0 -0
- package/dist/client/material-symbols-rounded.woff2 +0 -0
- package/dist/client/material-symbols-sharp.woff2 +0 -0
- package/dist/client/material-symbols-subset.woff2 +0 -0
- package/dist/client/mosaic-BFYLEwyx.js +455 -0
- package/dist/client/templates.js +250 -119
- package/dist/client/{transition-DaOsiD4u.js → transition-D_W6Wn9v.js} +1 -1
- package/dist/node/cli.js +5 -5
- package/dist/node/types.d.ts +4 -0
- package/dist/types/core/client/composables/DefineEodash.d.ts +1 -1
- package/dist/types/core/client/composables/index.d.ts +1 -3
- package/dist/types/core/client/eodashSTAC/EodashCollection.d.ts +62 -31
- package/dist/types/core/client/eodashSTAC/cql.d.ts +15 -0
- package/dist/types/core/client/eodashSTAC/createLayers.d.ts +44 -25
- package/dist/types/core/client/eodashSTAC/helpers.d.ts +78 -18
- package/dist/types/core/client/eodashSTAC/mosaic.d.ts +56 -0
- package/dist/types/core/client/store/stac.d.ts +31 -7
- package/dist/types/core/client/store/states.d.ts +24 -2
- package/dist/types/core/client/types.d.ts +131 -25
- package/dist/types/core/client/utils/states.d.ts +12 -0
- package/dist/types/templates/baseConfig.d.ts +1 -88
- package/dist/types/templates/compare.d.ts +32 -3
- package/dist/types/templates/expert.d.ts +18 -0
- package/dist/types/templates/explore.d.ts +9 -1
- package/dist/types/templates/lite.d.ts +11 -0
- package/dist/types/widgets/EodashChart.vue.d.ts +5 -3
- package/dist/types/widgets/EodashItemCatalog/index.vue.d.ts +129 -2
- package/dist/types/widgets/EodashItemCatalog/methods/filters.d.ts +28 -6
- package/dist/types/widgets/EodashItemCatalog/methods/handlers.d.ts +17 -4
- package/dist/types/widgets/EodashItemCatalog/methods/map.d.ts +16 -4
- package/dist/types/widgets/EodashLayerControl.vue.d.ts +36 -17
- package/dist/types/widgets/EodashMap/EodashMapBtns.vue.d.ts +23 -10
- package/dist/types/widgets/EodashMap/index.vue.d.ts +91 -35
- package/dist/types/widgets/EodashMap/methods/create-layers-config.d.ts +1 -8
- package/dist/types/widgets/EodashMap/methods/index.d.ts +5 -1
- package/dist/types/widgets/EodashMap/methods/use-map-loading.d.ts +1 -0
- package/dist/types/widgets/EodashProcess/index.vue.d.ts +5 -3
- package/dist/types/widgets/EodashProcess/methods/composables.d.ts +1 -1
- package/dist/types/widgets/EodashProcess/methods/handling.d.ts +13 -8
- package/dist/types/widgets/EodashProcess/states.d.ts +1 -1
- package/dist/types/widgets/EodashStacInfo.vue.d.ts +20 -0
- package/dist/types/widgets/EodashTimeSlider/index.vue.d.ts +54 -0
- package/dist/types/widgets/EodashTimeSlider/methods/index.d.ts +34 -0
- package/dist/types/widgets/EodashTimeSlider/types.d.ts +52 -0
- package/dist/types/widgets/EodashTools.vue.d.ts +5 -5
- package/package.json +46 -46
- package/templates/baseConfig.js +36 -6
- package/templates/compare.js +62 -7
- package/templates/expert.js +23 -0
- package/templates/explore.js +11 -5
- package/templates/lite.js +14 -0
- package/widgets/EodashChart.vue +1 -0
- package/widgets/EodashItemCatalog/index.vue +363 -35
- package/widgets/EodashItemCatalog/methods/filters.js +134 -70
- package/widgets/EodashItemCatalog/methods/handlers.js +113 -19
- package/widgets/EodashItemCatalog/methods/map.js +142 -28
- package/widgets/EodashLayerControl.vue +64 -14
- package/widgets/EodashMap/EodashMapBtns.vue +153 -47
- package/widgets/EodashMap/index.vue +101 -105
- package/widgets/EodashMap/methods/btns.js +37 -5
- package/widgets/EodashMap/methods/create-layers-config.js +18 -16
- package/widgets/EodashMap/methods/index.js +89 -8
- package/widgets/EodashMap/methods/use-map-loading.js +52 -0
- package/widgets/EodashProcess/index.vue +2 -1
- package/widgets/EodashProcess/methods/async.js +19 -8
- package/widgets/EodashProcess/methods/composables.js +63 -77
- package/widgets/EodashProcess/methods/custom-endpoints/chart/sentinelhub-endpoint.js +9 -5
- package/widgets/EodashProcess/methods/custom-endpoints/chart/veda-endpoint.js +7 -4
- package/widgets/EodashProcess/methods/handling.js +105 -72
- package/widgets/EodashProcess/states.js +1 -1
- package/widgets/EodashStacInfo.vue +64 -2
- package/widgets/EodashTimeSlider/index.vue +208 -0
- package/widgets/EodashTimeSlider/methods/index.js +236 -0
- package/widgets/EodashTimeSlider/types.ts +54 -0
- package/dist/client/EodashMapBtns-BHrSDNoC.js +0 -435
- package/dist/client/EodashStacInfo-B90wobPc.js +0 -107
- package/dist/client/EodashTimeSlider-5vm7F3ju.js +0 -53
- package/dist/client/MobileLayout-DyMjaeif.js +0 -118
- package/dist/client/index-CugS__t5.js +0 -570
- package/dist/types/widgets/EodashTimeSlider.vue.d.ts +0 -15
- package/widgets/EodashTimeSlider.vue +0 -40
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
:enableZoom="(indicator || compareIndicator || poi) ? btnsProps.enableZoom : false
|
|
62
62
|
"
|
|
63
63
|
:enableGlobe="(indicator || compareIndicator || poi) ? btnsProps.enableGlobe : false"
|
|
64
|
+
:enableFeedback="(indicator || compareIndicator || poi) ? btnsProps.enableFeedback : false"
|
|
64
65
|
:searchParams="btnsProps.searchParams"
|
|
65
66
|
/>
|
|
66
67
|
</div>
|
|
@@ -69,7 +70,7 @@
|
|
|
69
70
|
<script setup>
|
|
70
71
|
import "@eox/map";
|
|
71
72
|
import "@eox/map/src/plugins/advancedLayersAndSources";
|
|
72
|
-
import { computed, onMounted, ref, toRaw, useTemplateRef } from "vue";
|
|
73
|
+
import { nextTick, computed, onMounted, ref, toRaw, useTemplateRef } from "vue";
|
|
73
74
|
import {
|
|
74
75
|
datetime,
|
|
75
76
|
mapEl,
|
|
@@ -79,6 +80,7 @@ import {
|
|
|
79
80
|
compareIndicator,
|
|
80
81
|
poi,
|
|
81
82
|
isGlobe,
|
|
83
|
+
tooltipAdapter,
|
|
82
84
|
} from "@/store/states";
|
|
83
85
|
import { storeToRefs } from "pinia";
|
|
84
86
|
import { useSTAcStore } from "@/store/stac";
|
|
@@ -92,6 +94,7 @@ import {
|
|
|
92
94
|
import {
|
|
93
95
|
useHandleMapMoveEnd,
|
|
94
96
|
useInitMap,
|
|
97
|
+
useMapLoading,
|
|
95
98
|
useUpdateTooltipProperties,
|
|
96
99
|
} from "^/EodashMap/methods";
|
|
97
100
|
import { inAndOut } from "ol/easing.js";
|
|
@@ -99,42 +102,73 @@ import mustache from "mustache";
|
|
|
99
102
|
import EodashMapBtns from "^/EodashMap/EodashMapBtns.vue";
|
|
100
103
|
|
|
101
104
|
const props = defineProps({
|
|
105
|
+
baseLayers: {
|
|
106
|
+
/** @type {import("vue").PropType<import("@eox/map").EoxLayer[]>} */
|
|
107
|
+
type: Array,
|
|
108
|
+
default: () => [
|
|
109
|
+
{
|
|
110
|
+
type: "Tile",
|
|
111
|
+
source: { type: "OSM" },
|
|
112
|
+
properties: {
|
|
113
|
+
id: "osm",
|
|
114
|
+
title: "Background",
|
|
115
|
+
layerControlExclusive: true,
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
},
|
|
102
120
|
enableCompare: {
|
|
103
121
|
type: Boolean,
|
|
104
122
|
default: false,
|
|
105
123
|
},
|
|
106
|
-
/**
|
|
124
|
+
/**
|
|
125
|
+
* Initial map center as [lon, lat]; falls back to the last stored map position.
|
|
126
|
+
* @default [15, 48]
|
|
127
|
+
*/
|
|
107
128
|
center: {
|
|
108
|
-
|
|
109
|
-
|
|
129
|
+
type: /** @type {import("vue").PropType<[number, number]>} */ (
|
|
130
|
+
/** @type {unknown} */ (Array)
|
|
131
|
+
),
|
|
110
132
|
default: () => [mapPosition.value?.[0] ?? 15, mapPosition.value?.[1] ?? 48],
|
|
111
133
|
},
|
|
134
|
+
/**
|
|
135
|
+
* Initial zoom level; falls back to the last stored map position.
|
|
136
|
+
* @default 4
|
|
137
|
+
*/
|
|
112
138
|
zoom: {
|
|
113
139
|
type: Number,
|
|
114
140
|
default: mapPosition.value?.[2] ?? 4,
|
|
115
141
|
},
|
|
142
|
+
/** Fly to the selected collection's spatial extent on selection. */
|
|
116
143
|
zoomToExtent: {
|
|
117
144
|
type: Boolean,
|
|
118
145
|
default: true,
|
|
119
146
|
},
|
|
147
|
+
/** Show live cursor coordinates as a fixed overlay at the bottom-left of the map. */
|
|
120
148
|
enableCursorCoordinates: {
|
|
121
149
|
type: Boolean,
|
|
122
150
|
default: true,
|
|
123
151
|
},
|
|
152
|
+
/** Show an OpenLayers scale-line control at the bottom-left of the map. */
|
|
124
153
|
enableScaleLine: {
|
|
125
154
|
type: Boolean,
|
|
126
155
|
default: true,
|
|
127
156
|
},
|
|
157
|
+
/** Grid position of the floating button toolbar. `x` accepts responsive `"mobile/tablet/desktop"` column notation. */
|
|
128
158
|
btnsPosition: {
|
|
129
|
-
type:
|
|
159
|
+
type: /** @type {import("vue").PropType<{ x: string | number; y: number; gap: number }>} */ (
|
|
160
|
+
Object
|
|
161
|
+
),
|
|
130
162
|
default: () => ({
|
|
131
163
|
x: "12/9/10",
|
|
132
164
|
y: 1,
|
|
133
165
|
gap: 16,
|
|
134
166
|
}),
|
|
135
167
|
},
|
|
168
|
+
/** Toolbar feature flags; set any flag to `false` to hide the corresponding button. */
|
|
136
169
|
btns: {
|
|
137
|
-
|
|
170
|
+
type: /**
|
|
171
|
+
* @type {import("vue").PropType<{
|
|
138
172
|
* enableExportMap?: boolean;
|
|
139
173
|
* enableChangeProjection?: boolean;
|
|
140
174
|
* enableBackToPOIs?: boolean;
|
|
@@ -142,13 +176,14 @@ const props = defineProps({
|
|
|
142
176
|
* searchParams?: object;
|
|
143
177
|
* enableZoom?: boolean;
|
|
144
178
|
* enableGlobe?: boolean;
|
|
179
|
+
* enableMosaic?: boolean;
|
|
180
|
+
* enableFeedback?: boolean;
|
|
145
181
|
* enableCompareIndicators?: boolean | {
|
|
146
182
|
* compareTemplate?:string;
|
|
147
183
|
* fallbackTemplate?:string;
|
|
148
184
|
* itemFilterConfig?:InstanceType<import("../EodashItemFilter.vue").default>["$props"]
|
|
149
185
|
* };
|
|
150
|
-
* }> }*/
|
|
151
|
-
type: Object,
|
|
186
|
+
* }> } */ (Object),
|
|
152
187
|
default: () => ({
|
|
153
188
|
enableExportMap: true,
|
|
154
189
|
enableChangeProjection: true,
|
|
@@ -157,6 +192,8 @@ const props = defineProps({
|
|
|
157
192
|
enableSearch: true,
|
|
158
193
|
enableZoom: true,
|
|
159
194
|
enableGlobe: true,
|
|
195
|
+
enableMosaic: true,
|
|
196
|
+
enableFeedback: true,
|
|
160
197
|
searchParams: {},
|
|
161
198
|
}),
|
|
162
199
|
},
|
|
@@ -200,6 +237,8 @@ const btnsProps = computed(() => ({
|
|
|
200
237
|
enableSearch: props.btns.enableSearch ?? true,
|
|
201
238
|
enableZoom: props.btns.enableZoom ?? true,
|
|
202
239
|
enableGlobe: props.btns.enableGlobe ?? true,
|
|
240
|
+
enableMosaic: props.btns.enableMosaic ?? true,
|
|
241
|
+
enableFeedback: props.btns.enableFeedback ?? true,
|
|
203
242
|
searchParams: props.btns.searchParams,
|
|
204
243
|
}));
|
|
205
244
|
|
|
@@ -214,22 +253,13 @@ const cursorCoordsRef = useTemplateRef("cursor-coords");
|
|
|
214
253
|
const tooltipProperties = ref([]);
|
|
215
254
|
/** @type {import("vue").Ref<Exclude<import("@/types").EodashStyleJson["tooltip"], undefined>>} */
|
|
216
255
|
const compareTooltipProperties = ref([]);
|
|
217
|
-
|
|
218
|
-
Attribution: { collapsible: boolean };
|
|
219
|
-
ScaleLine?: { target: HTMLElement };
|
|
220
|
-
MousePosition?: { projection: string; coordinateFormat: (c: [number, number]) => string; target: HTMLElement };
|
|
221
|
-
}>} */
|
|
256
|
+
|
|
222
257
|
const controls = computed(() => {
|
|
223
|
-
/** @type {{
|
|
224
|
-
Attribution: { collapsible: boolean };
|
|
225
|
-
ScaleLine?: { target: HTMLElement };
|
|
226
|
-
MousePosition?: { projection: string; coordinateFormat: (c: [number, number]) => string; target: HTMLElement };
|
|
227
|
-
}} */
|
|
228
|
-
const controlsObj = {
|
|
258
|
+
const controlsObj = /** @type {import("@eox/map").ControlDictionary} */ ({
|
|
229
259
|
Attribution: {
|
|
230
260
|
collapsible: true,
|
|
231
261
|
},
|
|
232
|
-
};
|
|
262
|
+
});
|
|
233
263
|
|
|
234
264
|
if (props.enableScaleLine && scaleLineRef.value) {
|
|
235
265
|
controlsObj.ScaleLine = {
|
|
@@ -240,8 +270,8 @@ const controls = computed(() => {
|
|
|
240
270
|
if (props.enableCursorCoordinates && cursorCoordsRef.value) {
|
|
241
271
|
controlsObj.MousePosition = {
|
|
242
272
|
projection: "EPSG:4326",
|
|
243
|
-
coordinateFormat: (
|
|
244
|
-
return `${c[1].toFixed(3)} °N, ${c[0].toFixed(3)} °E`;
|
|
273
|
+
coordinateFormat: (c) => {
|
|
274
|
+
return `${c?.[1].toFixed(3)} °N, ${c?.[0].toFixed(3)} °E`;
|
|
245
275
|
},
|
|
246
276
|
target: cursorCoordsRef.value,
|
|
247
277
|
};
|
|
@@ -253,38 +283,28 @@ const controls = computed(() => {
|
|
|
253
283
|
const initialCenter = toRaw(props.center);
|
|
254
284
|
const initialZoom = toRaw(mapPosition.value?.[2] ?? props.zoom);
|
|
255
285
|
/** @type {import("vue").Ref<Record<string,any>[]>} */
|
|
256
|
-
const eoxMapLayers = ref(
|
|
257
|
-
{
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
id: "osm",
|
|
262
|
-
title: "Background",
|
|
263
|
-
},
|
|
264
|
-
},
|
|
265
|
-
]);
|
|
286
|
+
const eoxMapLayers = ref(
|
|
287
|
+
/** @type {Record<string,any>[]} */ (
|
|
288
|
+
structuredClone(toRaw(props.baseLayers))
|
|
289
|
+
),
|
|
290
|
+
);
|
|
266
291
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
properties: {
|
|
273
|
-
id: "osm",
|
|
274
|
-
title: "Background",
|
|
275
|
-
},
|
|
276
|
-
},
|
|
277
|
-
]);
|
|
292
|
+
const eoxMapCompareLayers = ref(
|
|
293
|
+
/** @type {Record<string,any>[]} */ (
|
|
294
|
+
structuredClone(toRaw(props.baseLayers))
|
|
295
|
+
),
|
|
296
|
+
);
|
|
278
297
|
|
|
279
|
-
const animationOptions = {
|
|
280
|
-
duration:
|
|
298
|
+
const animationOptions = ref({
|
|
299
|
+
duration: 0, // Initially set to 0 for an instant "jump"
|
|
281
300
|
easing: inAndOut,
|
|
282
|
-
};
|
|
301
|
+
});
|
|
283
302
|
|
|
284
303
|
/** @type {import("vue").Ref<import("@eox/map").EOxMap | null>} */
|
|
285
|
-
const eoxMap =
|
|
304
|
+
const eoxMap = useTemplateRef("eoxMap");
|
|
286
305
|
/** @type {import("vue").Ref<import("@eox/map").EOxMap | null>} */
|
|
287
|
-
const compareMap =
|
|
306
|
+
const compareMap = useTemplateRef("compareMap");
|
|
307
|
+
|
|
288
308
|
const { selectedCompareStac } = storeToRefs(useSTAcStore());
|
|
289
309
|
const showCompare = computed(() =>
|
|
290
310
|
props.enableCompare && !!selectedCompareStac.value ? "" : "first",
|
|
@@ -293,10 +313,20 @@ const showCompare = computed(() =>
|
|
|
293
313
|
useHandleMapMoveEnd(eoxMap, mapPosition);
|
|
294
314
|
|
|
295
315
|
onMounted(() => {
|
|
296
|
-
const {
|
|
297
|
-
|
|
316
|
+
const {
|
|
317
|
+
selectedCompareStac,
|
|
318
|
+
selectedStac,
|
|
319
|
+
selectedItem,
|
|
320
|
+
selectedCompareItem,
|
|
321
|
+
} = storeToRefs(useSTAcStore());
|
|
322
|
+
if (!eoxMap.value) {
|
|
323
|
+
console.error("EOxMap reference is not available on mounted.");
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
298
326
|
// assign map Element state to eox map
|
|
299
327
|
mapEl.value = eoxMap.value;
|
|
328
|
+
// enable terrain
|
|
329
|
+
mapEl.value.globeConfig.terrain = true;
|
|
300
330
|
|
|
301
331
|
if (props.enableCompare) {
|
|
302
332
|
mapCompareEl.value = compareMap.value;
|
|
@@ -311,6 +341,8 @@ onMounted(() => {
|
|
|
311
341
|
eoxMapCompareLayers,
|
|
312
342
|
eoxMap,
|
|
313
343
|
false,
|
|
344
|
+
selectedCompareItem,
|
|
345
|
+
props.baseLayers,
|
|
314
346
|
);
|
|
315
347
|
|
|
316
348
|
useUpdateTooltipProperties(
|
|
@@ -329,17 +361,31 @@ onMounted(() => {
|
|
|
329
361
|
compareMap,
|
|
330
362
|
props.zoomToExtent,
|
|
331
363
|
selectedItem,
|
|
364
|
+
props.baseLayers,
|
|
332
365
|
);
|
|
366
|
+
// After the initial mount and "jump", set the animation duration for subsequent flyTo calls
|
|
367
|
+
nextTick(() => {
|
|
368
|
+
animationOptions.value.duration = 1200;
|
|
369
|
+
});
|
|
333
370
|
});
|
|
334
371
|
|
|
372
|
+
// sync map loading with the global loading state
|
|
373
|
+
useMapLoading(eoxMap, compareMap);
|
|
374
|
+
|
|
335
375
|
useUpdateTooltipProperties(eodashCollections, tooltipProperties);
|
|
336
376
|
|
|
337
377
|
const mainTooltipStyles = computed(() => ({
|
|
338
|
-
visibility:
|
|
378
|
+
visibility:
|
|
379
|
+
tooltipProperties.value.length || !!tooltipAdapter.value
|
|
380
|
+
? "visible"
|
|
381
|
+
: "hidden",
|
|
339
382
|
}));
|
|
340
383
|
|
|
341
384
|
const compareTooltipStyles = computed(() => ({
|
|
342
|
-
visibility:
|
|
385
|
+
visibility:
|
|
386
|
+
compareTooltipProperties.value.length || !!tooltipAdapter.value
|
|
387
|
+
? "visible"
|
|
388
|
+
: "hidden",
|
|
343
389
|
}));
|
|
344
390
|
/**
|
|
345
391
|
* @param {"main" | "compare"} map
|
|
@@ -365,6 +411,9 @@ const tooltipPropertyTransform = (map) => {
|
|
|
365
411
|
(prop) => prop.id === param.key,
|
|
366
412
|
);
|
|
367
413
|
if (!tooltipProp) {
|
|
414
|
+
if (tooltipAdapter.value) {
|
|
415
|
+
return tooltipAdapter.value(param, map);
|
|
416
|
+
}
|
|
368
417
|
return undefined;
|
|
369
418
|
}
|
|
370
419
|
if (typeof param.value === "object") {
|
|
@@ -376,7 +425,6 @@ const tooltipPropertyTransform = (map) => {
|
|
|
376
425
|
: 4;
|
|
377
426
|
param.value = Number(param.value).toFixed(decimals).toString();
|
|
378
427
|
}
|
|
379
|
-
|
|
380
428
|
return {
|
|
381
429
|
key: tooltipProp.title || tooltipProp.id,
|
|
382
430
|
value: param.value + " " + (tooltipProp.appendix || ""),
|
|
@@ -393,58 +441,6 @@ onMounted(() => {
|
|
|
393
441
|
</script>
|
|
394
442
|
|
|
395
443
|
<style scoped>
|
|
396
|
-
#cursor-coordinates {
|
|
397
|
-
position: fixed;
|
|
398
|
-
left: 24px;
|
|
399
|
-
bottom: 54px; /* Tighter spacing: watermark at 6px + ~48px */
|
|
400
|
-
color: rgba(0, 0, 0, 0.9);
|
|
401
|
-
font-size: 10px;
|
|
402
|
-
font-family: var(--eox-body-font-family);
|
|
403
|
-
background: #fffe;
|
|
404
|
-
border-radius: 4px;
|
|
405
|
-
border: none;
|
|
406
|
-
padding: 0px 3px;
|
|
407
|
-
max-height: 24px;
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
@media (max-width: 959px) {
|
|
411
|
-
#cursor-coordinates {
|
|
412
|
-
display: none; /* Hidden in mobile mode */
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
#scale-line {
|
|
417
|
-
position: fixed;
|
|
418
|
-
left: 24px;
|
|
419
|
-
bottom: 28px; /* Tighter spacing: watermark at 6px + ~22px */
|
|
420
|
-
color: #fff;
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
@media (max-width: 959px) {
|
|
424
|
-
#scale-line {
|
|
425
|
-
bottom: 102px; /* Adjusted for mobile bottom nav - closer to coordinates */
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
:deep(.ol-scale-line) {
|
|
430
|
-
background: #fffe !important;
|
|
431
|
-
border-radius: 4px !important;
|
|
432
|
-
border: none !important;
|
|
433
|
-
padding: 0px 3px 3px 3px !important;
|
|
434
|
-
font-size: 10px !important;
|
|
435
|
-
font-family: var(--eox-body-font-family);
|
|
436
|
-
max-height: 20px;
|
|
437
|
-
}
|
|
438
|
-
:deep(.ol-scale-line-inner) {
|
|
439
|
-
display: flex;
|
|
440
|
-
justify-content: center;
|
|
441
|
-
border: 1px solid rgba(0, 0, 0, 0.5) !important;
|
|
442
|
-
border-top: none !important;
|
|
443
|
-
color: #333 !important;
|
|
444
|
-
font-weight: 500 !important;
|
|
445
|
-
transform: translateY(1px);
|
|
446
|
-
}
|
|
447
|
-
|
|
448
444
|
.map-buttons-container {
|
|
449
445
|
position: fixed;
|
|
450
446
|
left: 0;
|
|
@@ -11,7 +11,20 @@ export const switchGlobe = () => {
|
|
|
11
11
|
return;
|
|
12
12
|
}
|
|
13
13
|
if (!isGlobe.value) {
|
|
14
|
-
|
|
14
|
+
// tmp: we remove the vector layers from the globe until
|
|
15
|
+
// we have better support for them
|
|
16
|
+
const layers = addCorsAnonym([...getLayers()])
|
|
17
|
+
.filter((layer) => layer.type !== "Vector")
|
|
18
|
+
.map((layer) => {
|
|
19
|
+
if (layer.type === "Group") {
|
|
20
|
+
return {
|
|
21
|
+
...layer,
|
|
22
|
+
layers: layer.layers.filter((l) => l.type !== "Vector"),
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
return layer;
|
|
26
|
+
});
|
|
27
|
+
mapEl.value.layers = layers;
|
|
15
28
|
}
|
|
16
29
|
mapEl.value.projection = isGlobe.value ? "EPSG:3857" : "globe";
|
|
17
30
|
if (isGlobe.value) {
|
|
@@ -20,27 +33,46 @@ export const switchGlobe = () => {
|
|
|
20
33
|
isGlobe.value = !isGlobe.value;
|
|
21
34
|
};
|
|
22
35
|
|
|
36
|
+
function getRoot() {
|
|
37
|
+
const eodashComponent = document.querySelector("eo-dash");
|
|
38
|
+
return eodashComponent ? eodashComponent.shadowRoot : document;
|
|
39
|
+
}
|
|
40
|
+
|
|
23
41
|
function hideAllPanels() {
|
|
24
|
-
const
|
|
42
|
+
const root = getRoot();
|
|
43
|
+
const allPanels = root?.querySelectorAll(
|
|
25
44
|
"eox-layout-item:not([class='bg-panel'])",
|
|
26
45
|
);
|
|
27
|
-
|
|
46
|
+
|
|
47
|
+
allPanels?.forEach((panel) => {
|
|
28
48
|
if (!panel || !(panel instanceof HTMLElement)) {
|
|
29
49
|
return;
|
|
30
50
|
}
|
|
31
51
|
panel.style.display = "none";
|
|
32
52
|
});
|
|
53
|
+
|
|
54
|
+
const mapButtons = root?.querySelector(".map-buttons");
|
|
55
|
+
if (mapButtons instanceof HTMLElement) {
|
|
56
|
+
mapButtons.style.padding = "1rem";
|
|
57
|
+
}
|
|
33
58
|
}
|
|
59
|
+
|
|
34
60
|
function showAllPanels() {
|
|
35
|
-
const
|
|
61
|
+
const root = getRoot();
|
|
62
|
+
const allPanels = root?.querySelectorAll(
|
|
36
63
|
"eox-layout-item:not([class='bg-panel'])",
|
|
37
64
|
);
|
|
38
|
-
allPanels
|
|
65
|
+
allPanels?.forEach((panel) => {
|
|
39
66
|
if (!panel || !(panel instanceof HTMLElement)) {
|
|
40
67
|
return;
|
|
41
68
|
}
|
|
42
69
|
panel.style.display = "";
|
|
43
70
|
});
|
|
71
|
+
|
|
72
|
+
const mapButtons = root?.querySelector(".map-buttons");
|
|
73
|
+
if (mapButtons instanceof HTMLElement) {
|
|
74
|
+
mapButtons.style.padding = "";
|
|
75
|
+
}
|
|
44
76
|
}
|
|
45
77
|
/**
|
|
46
78
|
*
|
|
@@ -10,12 +10,15 @@ import log from "loglevel";
|
|
|
10
10
|
* } selectedIndicator
|
|
11
11
|
* @param {EodashCollection[]} eodashCols
|
|
12
12
|
* @param {string | import("stac-ts").StacItem | null} [timeOrItem] - time as a string, or a stac item
|
|
13
|
+
* @param {Record<string, any>[]} [defaultBaseLayers] - Optional default baselayers to use if the indicator does not provide any
|
|
14
|
+
* @returns {Promise<Record<string, any>[]>}
|
|
13
15
|
*/
|
|
14
16
|
|
|
15
17
|
export const createLayersConfig = async (
|
|
16
18
|
selectedIndicator,
|
|
17
19
|
eodashCols,
|
|
18
20
|
timeOrItem,
|
|
21
|
+
defaultBaseLayers = [],
|
|
19
22
|
) => {
|
|
20
23
|
log.debug(
|
|
21
24
|
"Creating layers config",
|
|
@@ -37,17 +40,25 @@ export const createLayersConfig = async (
|
|
|
37
40
|
for (const ec of eodashCols) {
|
|
38
41
|
/** @type {Record<string,any>[]} */
|
|
39
42
|
let layers;
|
|
43
|
+
let dateOrItem;
|
|
40
44
|
if (timeOrItem) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
45
|
+
if (typeof timeOrItem === "string" && timeOrItem.includes("/")) {
|
|
46
|
+
dateOrItem = timeOrItem;
|
|
47
|
+
} else {
|
|
48
|
+
dateOrItem =
|
|
49
|
+
typeof timeOrItem === "string" ? new Date(timeOrItem) : timeOrItem;
|
|
50
|
+
}
|
|
51
|
+
layers = await ec.createLayersJson(/** @type {any} */ (dateOrItem));
|
|
44
52
|
} else {
|
|
45
53
|
layers = await ec.createLayersJson(undefined);
|
|
46
54
|
}
|
|
55
|
+
|
|
47
56
|
// Add expand to all analysis layers
|
|
48
57
|
layers.forEach((dl) => {
|
|
49
|
-
dl.properties
|
|
50
|
-
|
|
58
|
+
if (!dl.properties?.layerControlExclusive) {
|
|
59
|
+
dl.properties.layerControlExpand = true;
|
|
60
|
+
dl.properties.layerControlToolsExpand = true;
|
|
61
|
+
}
|
|
51
62
|
});
|
|
52
63
|
dataLayers.layers.push(...layers);
|
|
53
64
|
}
|
|
@@ -68,6 +79,7 @@ export const createLayersConfig = async (
|
|
|
68
79
|
if (targetLayer) {
|
|
69
80
|
if (Array.isArray(vl.roles) && vl.roles.includes("disable")) {
|
|
70
81
|
targetLayer.properties.visible = false;
|
|
82
|
+
targetLayer.properties.layerControlExpand = false;
|
|
71
83
|
} else if (Array.isArray(vl.roles) && vl.roles.includes("hidden")) {
|
|
72
84
|
targetLayer.properties.layerControlHide = true;
|
|
73
85
|
}
|
|
@@ -139,17 +151,7 @@ export const createLayersConfig = async (
|
|
|
139
151
|
});
|
|
140
152
|
} else {
|
|
141
153
|
// Default to some baselayer
|
|
142
|
-
baseLayers.layers.push(
|
|
143
|
-
type: "Tile",
|
|
144
|
-
properties: {
|
|
145
|
-
id: "osm",
|
|
146
|
-
title: "Background",
|
|
147
|
-
layerControlExclusive: true,
|
|
148
|
-
},
|
|
149
|
-
source: {
|
|
150
|
-
type: "OSM",
|
|
151
|
-
},
|
|
152
|
-
});
|
|
154
|
+
baseLayers.layers.push(...defaultBaseLayers);
|
|
153
155
|
}
|
|
154
156
|
|
|
155
157
|
if (baseLayers.layers.length) {
|