@eodash/eodash 5.7.0 → 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/EodashOverlay.vue +27 -4
- package/core/client/composables/DefineEodash.js +0 -1
- package/core/client/composables/DefineWidgets.js +3 -1
- package/core/client/eodashSTAC/EodashCollection.js +74 -20
- package/core/client/eodashSTAC/cql.js +64 -0
- package/core/client/eodashSTAC/createLayers.js +169 -116
- package/core/client/eodashSTAC/helpers.js +391 -98
- 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 +147 -28
- package/core/client/utils/bands-editor/exampleSchema.json +50 -50
- package/core/client/utils/states.js +10 -0
- package/dist/client/{DashboardLayout-kRsmsNW5.js → DashboardLayout-ePbdvUTE.js} +2 -2
- package/dist/client/{DynamicWebComponent-CnKhYo0K.js → DynamicWebComponent-g5SdRbjY.js} +1 -1
- package/dist/client/{EodashChart-CLDqE93C.js → EodashChart-ChrkA5oS.js} +7 -6
- package/dist/client/{EodashDatePicker-CMPDT-ce.js → EodashDatePicker-CY1TrsDo.js} +3 -3
- package/dist/client/{EodashItemFilter-BpdA8QQa.js → EodashItemFilter-DzshHDlS.js} +2 -1
- package/dist/client/{EodashLayerControl-BHpDA4_0.js → EodashLayerControl-DMCeMkSd.js} +50 -20
- package/dist/client/{EodashLayoutSwitcher-B1fRUt7G.js → EodashLayoutSwitcher-iJ8mX1rF.js} +3 -3
- package/dist/client/{EodashMapBtns-Cpned0tc.js → EodashMapBtns-C7Cr7q5Y.js} +200 -86
- package/dist/client/EodashStacInfo-K7-iuXa7.js +169 -0
- package/dist/client/{EodashTools-1zHz26gv.js → EodashTools-BEK7e7JM.js} +4 -4
- package/dist/client/{ExportState-DbOm8hBI.js → ExportState-CqIzfMYQ.js} +6 -168
- package/dist/client/{Footer-BKg-VVkj.js → Footer-1P0cmBOZ.js} +1 -1
- package/dist/client/{Header-DCrwCvmY.js → Header-CkkBaBNh.js} +2 -2
- package/dist/client/{MobileLayout-vWSHpluo.js → MobileLayout-BPf49kDU.js} +2 -2
- package/dist/client/{PopUp-9uimfK49.js → PopUp-DPZq5SWI.js} +4 -168
- package/dist/client/{ProcessList-CTTIZa06.js → ProcessList-DuI6WpS1.js} +5 -5
- package/dist/client/VDivider-Bj9LG_JV.js +168 -0
- package/dist/client/{VImg-CrmB76ZY.js → VImg-Ddv5OyMz.js} +2 -2
- package/dist/client/{VMain-OKZNpcEG.js → VMain-7yqk_qC3.js} +1 -1
- package/dist/client/{VTooltip-CJw2FyWk.js → VTooltip-2hAJyEoa.js} +2 -2
- package/dist/client/{WidgetsContainer-BaWOnE5R.js → WidgetsContainer-2DOrlwCB.js} +1 -1
- package/dist/client/{asWebComponent-BHWpMuE3.js → asWebComponent-BlFN2lkB.js} +456 -306
- package/dist/client/{async-DSKj6g1f.js → async-B2H8ZwUK.js} +2 -2
- package/dist/client/{create-layers-config-CBoYedqB.js → create-layers-config-u_vn5hPk.js} +17 -17
- package/dist/client/dialog-transition-BrMkMiNa.js +170 -0
- package/dist/client/eo-dash.js +1 -1
- package/dist/client/{forwardRefs-DH51zPUr.js → forwardRefs-DAlror6d.js} +8 -87
- package/dist/client/{handling-BrcDDlgS.js → handling-B6I1V5eG.js} +3 -3
- package/dist/client/{helpers-DjZVl_WF.js → helpers-CBqIUSXJ.js} +794 -182
- package/dist/client/index-BWq1ZKaV.js +3168 -0
- package/dist/client/{index-CUjl-ZsI.js → index-CJ9UI3ln.js} +2 -2
- package/dist/client/{index-CSG_JoOA.js → index-DXLz4sFR.js} +62 -56
- package/dist/client/{index-1JKE68n3.js → index-DhKU6KqM.js} +211 -67
- package/dist/client/{index-Cu3-13Xg.js → index-DjQlbWbJ.js} +7 -6
- package/dist/client/mosaic-BFYLEwyx.js +455 -0
- package/dist/client/templates.js +250 -119
- package/dist/client/{transition-OHcz5Qq1.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/eodashSTAC/EodashCollection.d.ts +57 -25
- package/dist/types/core/client/eodashSTAC/cql.d.ts +15 -0
- package/dist/types/core/client/eodashSTAC/createLayers.d.ts +42 -23
- package/dist/types/core/client/eodashSTAC/helpers.d.ts +77 -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 +123 -24
- package/dist/types/core/client/utils/states.d.ts +12 -0
- package/dist/types/templates/baseConfig.d.ts +1 -100
- 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 +35 -16
- package/dist/types/widgets/EodashMap/EodashMapBtns.vue.d.ts +14 -10
- package/dist/types/widgets/EodashMap/index.vue.d.ts +86 -37
- package/dist/types/widgets/EodashMap/methods/create-layers-config.d.ts +1 -1
- 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/states.d.ts +1 -1
- package/dist/types/widgets/EodashStacInfo.vue.d.ts +20 -0
- package/dist/types/widgets/EodashTimeSlider/index.vue.d.ts +20 -0
- package/dist/types/widgets/EodashTimeSlider/methods/index.d.ts +3 -8
- package/dist/types/widgets/EodashTimeSlider/types.d.ts +6 -16
- package/dist/types/widgets/EodashTools.vue.d.ts +5 -5
- package/package.json +33 -33
- 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 +42 -11
- package/widgets/EodashMap/EodashMapBtns.vue +109 -48
- package/widgets/EodashMap/index.vue +89 -105
- package/widgets/EodashMap/methods/btns.js +37 -5
- package/widgets/EodashMap/methods/create-layers-config.js +16 -16
- package/widgets/EodashMap/methods/index.js +71 -8
- package/widgets/EodashMap/methods/use-map-loading.js +52 -0
- package/widgets/EodashProcess/index.vue +1 -0
- package/widgets/EodashProcess/states.js +1 -1
- package/widgets/EodashStacInfo.vue +64 -2
- package/widgets/EodashTimeSlider/index.vue +58 -2
- package/widgets/EodashTimeSlider/methods/index.js +5 -48
- package/widgets/EodashTimeSlider/types.ts +7 -17
- package/dist/client/EodashStacInfo-BQspAHKH.js +0 -107
- package/dist/client/index-5Jhsa8Xe.js +0 -570
|
@@ -1,14 +1,64 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { watch, onUnmounted, onMounted, computed, withAsyncContext, useTemplateRef, ref, toRaw, nextTick, openBlock, createElementBlock, createElementVNode, unref, normalizeStyle, createCommentVNode, createVNode } from 'vue';
|
|
2
2
|
import { transformExtent } from '@eox/map';
|
|
3
3
|
import '@eox/map/src/plugins/advancedLayersAndSources';
|
|
4
|
-
import {
|
|
4
|
+
import { Y as loading, a6 as isGlobe, a7 as setMapProjFromCol, L as isFirstLoad, K as mapPosition, $ as sanitizeBbox, n as mapEl, a1 as mapCompareEl, a0 as tooltipAdapter, M as indicator, Q as compareIndicator, I as poi, a4 as layerControlFormValue, a3 as layerControlFormValueCompare, H as datetime, P as eodashCompareCollections, S as eodashCollections } from './helpers-CBqIUSXJ.js';
|
|
5
5
|
import { storeToRefs } from 'pinia';
|
|
6
|
-
import { H as useSTAcStore,
|
|
7
|
-
import { c as createLayersConfig } from './create-layers-config-
|
|
6
|
+
import { H as useSTAcStore, aa as useEmitLayersUpdate, L as useOnLayersUpdate, _ as _export_sfc, G as useDisplay, a as useLayout } from './asWebComponent-BlFN2lkB.js';
|
|
7
|
+
import { c as createLayersConfig } from './create-layers-config-u_vn5hPk.js';
|
|
8
8
|
import log from 'loglevel';
|
|
9
9
|
import { i as inAndOut } from './easing-CH0-9wR8.js';
|
|
10
10
|
import mustache from 'mustache';
|
|
11
|
-
import EodashMapBtns from './EodashMapBtns-
|
|
11
|
+
import EodashMapBtns from './EodashMapBtns-C7Cr7q5Y.js';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Tracks map loading state at the source level via `loading.activeLoads`,
|
|
15
|
+
* the same counter used by the axios plugin. Re-attaches source listeners
|
|
16
|
+
* whenever eox-map fires `layerschanged`, using `getFlatLayersArray`.
|
|
17
|
+
*
|
|
18
|
+
* @param {import("vue").Ref<import("@eox/map").EOxMap | null>} mapElement
|
|
19
|
+
* @param {import("vue").Ref<import("@eox/map").EOxMap | null>} compareMapElement
|
|
20
|
+
*/
|
|
21
|
+
const useMapLoading = (mapElement, compareMapElement) => {
|
|
22
|
+
const startHandler = () => {
|
|
23
|
+
loading.activeLoads++;
|
|
24
|
+
};
|
|
25
|
+
const endHandler = () => {
|
|
26
|
+
loading.activeLoads--;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @param {import("@eox/map").EOxMap | null} newMapEl */
|
|
30
|
+
const watcherHandler = (newMapEl) => {
|
|
31
|
+
if (!newMapEl) return;
|
|
32
|
+
|
|
33
|
+
const hasStartListener = newMapEl.map
|
|
34
|
+
.getListeners("loadstart")
|
|
35
|
+
?.some((listner) => listner === startHandler);
|
|
36
|
+
const hasEndListener = newMapEl.map
|
|
37
|
+
.getListeners("loadend")
|
|
38
|
+
?.some((listner) => listner === endHandler);
|
|
39
|
+
|
|
40
|
+
if (!hasStartListener) {
|
|
41
|
+
newMapEl.map.addEventListener("loadstart", startHandler);
|
|
42
|
+
}
|
|
43
|
+
if (!hasEndListener) {
|
|
44
|
+
newMapEl.map.addEventListener("loadend", endHandler);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const stopMainWatcher = watch(mapElement, watcherHandler, {
|
|
48
|
+
immediate: true,
|
|
49
|
+
});
|
|
50
|
+
const stopCompareWatcher = watch(compareMapElement, watcherHandler, {
|
|
51
|
+
immediate: true,
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
onUnmounted(() => {
|
|
55
|
+
mapElement.value?.map.removeEventListener("loadstart", startHandler);
|
|
56
|
+
mapElement.value?.map.removeEventListener("loadend", endHandler);
|
|
57
|
+
stopMainWatcher();
|
|
58
|
+
stopCompareWatcher();
|
|
59
|
+
loading.activeLoads = 0;
|
|
60
|
+
});
|
|
61
|
+
};
|
|
12
62
|
|
|
13
63
|
/**
|
|
14
64
|
* Holder for previous compare map view as it is overwritten by sync
|
|
@@ -40,14 +90,52 @@ const useHandleMapMoveEnd = (mapElement, mapPosition) => {
|
|
|
40
90
|
}
|
|
41
91
|
};
|
|
42
92
|
|
|
93
|
+
const handleGlobeMoveEnd = () => {
|
|
94
|
+
const camera = mapElement.value?.globe?.planet?.camera;
|
|
95
|
+
const lonLat = camera?.getLonLat();
|
|
96
|
+
if (!lonLat) return;
|
|
97
|
+
const { lon, lat, height } = lonLat;
|
|
98
|
+
if (![lon, lat, height].some(Number.isNaN)) {
|
|
99
|
+
mapPosition.value = [lon, lat, height];
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/** @type {{ events: { off: Function } } | null} */
|
|
104
|
+
let subscribedCamera = null;
|
|
105
|
+
|
|
106
|
+
const subscribeGlobe = (retries = 3) => {
|
|
107
|
+
if (!isGlobe.value) return; // toggled back out during retry
|
|
108
|
+
const camera = mapElement.value?.globe?.planet?.camera;
|
|
109
|
+
if (camera) {
|
|
110
|
+
if (subscribedCamera === camera) return;
|
|
111
|
+
camera.events.on("moveend", handleGlobeMoveEnd);
|
|
112
|
+
subscribedCamera = camera;
|
|
113
|
+
handleGlobeMoveEnd();
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
if (retries > 0) setTimeout(() => subscribeGlobe(retries - 1), 50);
|
|
117
|
+
};
|
|
118
|
+
const unsubscribeGlobe = () => {
|
|
119
|
+
subscribedCamera?.events.off("moveend", handleGlobeMoveEnd);
|
|
120
|
+
subscribedCamera = null;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
const stopGlobeWatch = watch(isGlobe, (globe) =>
|
|
124
|
+
globe ? subscribeGlobe() : unsubscribeGlobe(),
|
|
125
|
+
);
|
|
126
|
+
|
|
43
127
|
onMounted(() => {
|
|
44
|
-
|
|
45
|
-
|
|
128
|
+
const map = mapElement.value?.map;
|
|
129
|
+
map?.on("moveend", handleMoveEnd);
|
|
130
|
+
// Seed mapPosition from the initial view
|
|
131
|
+
handleMoveEnd(/** @type {any} */ ({ map }));
|
|
46
132
|
});
|
|
47
133
|
|
|
48
134
|
onUnmounted(() => {
|
|
49
135
|
/** @type {import('ol/Map').default} */
|
|
50
136
|
(mapElement.value?.map)?.un("moveend", handleMoveEnd);
|
|
137
|
+
unsubscribeGlobe();
|
|
138
|
+
stopGlobeWatch();
|
|
51
139
|
});
|
|
52
140
|
};
|
|
53
141
|
|
|
@@ -62,6 +150,7 @@ const useHandleMapMoveEnd = (mapElement, mapPosition) => {
|
|
|
62
150
|
* @param {import("vue").Ref<import("@eox/map").EOxMap| null>} partnerMap
|
|
63
151
|
* @param {boolean} zoomToExtent
|
|
64
152
|
* @param {import("vue").Ref<import("stac-ts").StacItem | import("stac-ts").StacLink | null>} [selectedItem]
|
|
153
|
+
* @param {Record<string, any>[]} [defaultBaseLayers]
|
|
65
154
|
*/
|
|
66
155
|
const useInitMap = (
|
|
67
156
|
mapElement,
|
|
@@ -72,6 +161,7 @@ const useInitMap = (
|
|
|
72
161
|
partnerMap,
|
|
73
162
|
zoomToExtent,
|
|
74
163
|
selectedItem,
|
|
164
|
+
defaultBaseLayers,
|
|
75
165
|
) => {
|
|
76
166
|
log.debug(
|
|
77
167
|
"InitMap",
|
|
@@ -101,12 +191,24 @@ const useInitMap = (
|
|
|
101
191
|
);
|
|
102
192
|
|
|
103
193
|
if (updatedStac) {
|
|
104
|
-
|
|
194
|
+
const isSameStac = updatedStac?.id === previousStac?.id;
|
|
195
|
+
const isSameItem = updatedItem?.id === previousItem?.id;
|
|
196
|
+
|
|
197
|
+
// Item deselect: overview render is owned by the item catalog widget.
|
|
198
|
+
const isItemDeselect =
|
|
199
|
+
previousItem &&
|
|
200
|
+
!updatedItem &&
|
|
201
|
+
isSameStac &&
|
|
202
|
+
updatedTime === previousTime;
|
|
203
|
+
if (isItemDeselect) return;
|
|
204
|
+
|
|
205
|
+
// Re-fire from our own datetime.value write, skip and clear
|
|
206
|
+
const isOwnDatetimeUpdate =
|
|
105
207
|
internalDatetime !== null &&
|
|
106
208
|
updatedTime === internalDatetime &&
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
) {
|
|
209
|
+
isSameStac &&
|
|
210
|
+
isSameItem;
|
|
211
|
+
if (isOwnDatetimeUpdate) {
|
|
110
212
|
internalDatetime = null;
|
|
111
213
|
return;
|
|
112
214
|
}
|
|
@@ -154,7 +256,9 @@ const useInitMap = (
|
|
|
154
256
|
updatedStac,
|
|
155
257
|
eodashCols,
|
|
156
258
|
updatedItem ?? updatedTime,
|
|
259
|
+
defaultBaseLayers,
|
|
157
260
|
);
|
|
261
|
+
|
|
158
262
|
log.debug(
|
|
159
263
|
"Assigned layers after changing time only",
|
|
160
264
|
JSON.parse(JSON.stringify(layersCollection)),
|
|
@@ -176,6 +280,11 @@ const useInitMap = (
|
|
|
176
280
|
if (interval && interval.length > 0 && interval[0].length > 1) {
|
|
177
281
|
// @ts-expect-error this is the defined STAC structure
|
|
178
282
|
endInterval = new Date(interval[0][1]);
|
|
283
|
+
// If end interval is in the future, set to now,
|
|
284
|
+
// for item fetching based on search endpoint
|
|
285
|
+
if (endInterval.getTime() > Date.now()) {
|
|
286
|
+
endInterval = new Date();
|
|
287
|
+
}
|
|
179
288
|
log.debug(
|
|
180
289
|
"Indicator load: found stac extent, setting time to latest value",
|
|
181
290
|
endInterval,
|
|
@@ -201,7 +310,8 @@ const useInitMap = (
|
|
|
201
310
|
layersCollection = await createLayersConfig(
|
|
202
311
|
updatedStac,
|
|
203
312
|
eodashCols,
|
|
204
|
-
resolvedTime,
|
|
313
|
+
updatedItem ?? resolvedTime,
|
|
314
|
+
defaultBaseLayers,
|
|
205
315
|
);
|
|
206
316
|
|
|
207
317
|
if (zoomToExtent) {
|
|
@@ -284,7 +394,7 @@ const useUpdateTooltipProperties = (
|
|
|
284
394
|
});
|
|
285
395
|
};
|
|
286
396
|
|
|
287
|
-
const _style_0 = "
|
|
397
|
+
const _style_0 = ".map-buttons-container[data-v-6d08ac44]{position:fixed;left:0;width:100%;height:100%;display:grid;grid-template-columns:repeat(12,1fr);grid-template-rows:repeat(12,1fr);pointer-events:none;z-index:1}.map-buttons-container[data-v-6d08ac44]>*{pointer-events:auto}";
|
|
288
398
|
|
|
289
399
|
const _hoisted_1 = [".enabled"];
|
|
290
400
|
const _hoisted_2 = [".animationOptions", ".center", ".zoom", ".layers", ".controls"];
|
|
@@ -306,42 +416,73 @@ const _hoisted_7 = {
|
|
|
306
416
|
const _sfc_main = {
|
|
307
417
|
__name: 'index',
|
|
308
418
|
props: {
|
|
419
|
+
baseLayers: {
|
|
420
|
+
/** @type {import("vue").PropType<import("@eox/map").EoxLayer[]>} */
|
|
421
|
+
type: Array,
|
|
422
|
+
default: () => [
|
|
423
|
+
{
|
|
424
|
+
type: "Tile",
|
|
425
|
+
source: { type: "OSM" },
|
|
426
|
+
properties: {
|
|
427
|
+
id: "osm",
|
|
428
|
+
title: "Background",
|
|
429
|
+
layerControlExclusive: true,
|
|
430
|
+
},
|
|
431
|
+
},
|
|
432
|
+
],
|
|
433
|
+
},
|
|
309
434
|
enableCompare: {
|
|
310
435
|
type: Boolean,
|
|
311
436
|
default: false,
|
|
312
437
|
},
|
|
313
|
-
/**
|
|
438
|
+
/**
|
|
439
|
+
* Initial map center as [lon, lat]; falls back to the last stored map position.
|
|
440
|
+
* @default [15, 48]
|
|
441
|
+
*/
|
|
314
442
|
center: {
|
|
315
|
-
|
|
316
|
-
|
|
443
|
+
type: /** @type {import("vue").PropType<[number, number]>} */ (
|
|
444
|
+
/** @type {unknown} */ (Array)
|
|
445
|
+
),
|
|
317
446
|
default: () => [mapPosition.value?.[0] ?? 15, mapPosition.value?.[1] ?? 48],
|
|
318
447
|
},
|
|
448
|
+
/**
|
|
449
|
+
* Initial zoom level; falls back to the last stored map position.
|
|
450
|
+
* @default 4
|
|
451
|
+
*/
|
|
319
452
|
zoom: {
|
|
320
453
|
type: Number,
|
|
321
454
|
default: mapPosition.value?.[2] ?? 4,
|
|
322
455
|
},
|
|
456
|
+
/** Fly to the selected collection's spatial extent on selection. */
|
|
323
457
|
zoomToExtent: {
|
|
324
458
|
type: Boolean,
|
|
325
459
|
default: true,
|
|
326
460
|
},
|
|
461
|
+
/** Show live cursor coordinates as a fixed overlay at the bottom-left of the map. */
|
|
327
462
|
enableCursorCoordinates: {
|
|
328
463
|
type: Boolean,
|
|
329
464
|
default: true,
|
|
330
465
|
},
|
|
466
|
+
/** Show an OpenLayers scale-line control at the bottom-left of the map. */
|
|
331
467
|
enableScaleLine: {
|
|
332
468
|
type: Boolean,
|
|
333
469
|
default: true,
|
|
334
470
|
},
|
|
471
|
+
/** Grid position of the floating button toolbar. `x` accepts responsive `"mobile/tablet/desktop"` column notation. */
|
|
335
472
|
btnsPosition: {
|
|
336
|
-
type:
|
|
473
|
+
type: /** @type {import("vue").PropType<{ x: string | number; y: number; gap: number }>} */ (
|
|
474
|
+
Object
|
|
475
|
+
),
|
|
337
476
|
default: () => ({
|
|
338
477
|
x: "12/9/10",
|
|
339
478
|
y: 1,
|
|
340
479
|
gap: 16,
|
|
341
480
|
}),
|
|
342
481
|
},
|
|
482
|
+
/** Toolbar feature flags; set any flag to `false` to hide the corresponding button. */
|
|
343
483
|
btns: {
|
|
344
|
-
|
|
484
|
+
type: /**
|
|
485
|
+
* @type {import("vue").PropType<{
|
|
345
486
|
* enableExportMap?: boolean;
|
|
346
487
|
* enableChangeProjection?: boolean;
|
|
347
488
|
* enableBackToPOIs?: boolean;
|
|
@@ -349,14 +490,14 @@ const _sfc_main = {
|
|
|
349
490
|
* searchParams?: object;
|
|
350
491
|
* enableZoom?: boolean;
|
|
351
492
|
* enableGlobe?: boolean;
|
|
493
|
+
* enableMosaic?: boolean;
|
|
352
494
|
* enableFeedback?: boolean;
|
|
353
495
|
* enableCompareIndicators?: boolean | {
|
|
354
496
|
* compareTemplate?:string;
|
|
355
497
|
* fallbackTemplate?:string;
|
|
356
498
|
* itemFilterConfig?:InstanceType<import("../EodashItemFilter.vue").default>["$props"]
|
|
357
499
|
* };
|
|
358
|
-
* }> }*/
|
|
359
|
-
type: Object,
|
|
500
|
+
* }> } */ (Object),
|
|
360
501
|
default: () => ({
|
|
361
502
|
enableExportMap: true,
|
|
362
503
|
enableChangeProjection: true,
|
|
@@ -365,6 +506,7 @@ const _sfc_main = {
|
|
|
365
506
|
enableSearch: true,
|
|
366
507
|
enableZoom: true,
|
|
367
508
|
enableGlobe: true,
|
|
509
|
+
enableMosaic: true,
|
|
368
510
|
enableFeedback: true,
|
|
369
511
|
searchParams: {},
|
|
370
512
|
}),
|
|
@@ -414,6 +556,7 @@ const btnsProps = computed(() => ({
|
|
|
414
556
|
enableSearch: props.btns.enableSearch ?? true,
|
|
415
557
|
enableZoom: props.btns.enableZoom ?? true,
|
|
416
558
|
enableGlobe: props.btns.enableGlobe ?? true,
|
|
559
|
+
enableMosaic: props.btns.enableMosaic ?? true,
|
|
417
560
|
enableFeedback: props.btns.enableFeedback ?? true,
|
|
418
561
|
searchParams: props.btns.searchParams,
|
|
419
562
|
}));
|
|
@@ -433,22 +576,13 @@ const cursorCoordsRef = useTemplateRef("cursor-coords");
|
|
|
433
576
|
const tooltipProperties = ref([]);
|
|
434
577
|
/** @type {import("vue").Ref<Exclude<import("@/types").EodashStyleJson["tooltip"], undefined>>} */
|
|
435
578
|
const compareTooltipProperties = ref([]);
|
|
436
|
-
|
|
437
|
-
Attribution: { collapsible: boolean };
|
|
438
|
-
ScaleLine?: { target: HTMLElement };
|
|
439
|
-
MousePosition?: { projection: string; coordinateFormat: (c: [number, number]) => string; target: HTMLElement };
|
|
440
|
-
}>} */
|
|
579
|
+
|
|
441
580
|
const controls = computed(() => {
|
|
442
|
-
/** @type {{
|
|
443
|
-
Attribution: { collapsible: boolean };
|
|
444
|
-
ScaleLine?: { target: HTMLElement };
|
|
445
|
-
MousePosition?: { projection: string; coordinateFormat: (c: [number, number]) => string; target: HTMLElement };
|
|
446
|
-
}} */
|
|
447
|
-
const controlsObj = {
|
|
581
|
+
const controlsObj = /** @type {import("@eox/map").ControlDictionary} */ ({
|
|
448
582
|
Attribution: {
|
|
449
583
|
collapsible: true,
|
|
450
584
|
},
|
|
451
|
-
};
|
|
585
|
+
});
|
|
452
586
|
|
|
453
587
|
if (props.enableScaleLine && scaleLineRef.value) {
|
|
454
588
|
controlsObj.ScaleLine = {
|
|
@@ -459,12 +593,8 @@ const controls = computed(() => {
|
|
|
459
593
|
if (props.enableCursorCoordinates && cursorCoordsRef.value) {
|
|
460
594
|
controlsObj.MousePosition = {
|
|
461
595
|
projection: "EPSG:4326",
|
|
462
|
-
coordinateFormat: (
|
|
463
|
-
|
|
464
|
-
const lng = c[0];
|
|
465
|
-
const latStr = `${Math.abs(lat).toFixed(3)}°${lat >= 0 ? "N" : "S"}`;
|
|
466
|
-
const lngStr = `${Math.abs(lng).toFixed(3)}°${lng >= 0 ? "E" : "W"}`;
|
|
467
|
-
return `${latStr}, ${lngStr}`;
|
|
596
|
+
coordinateFormat: (c) => {
|
|
597
|
+
return `${c?.[1].toFixed(3)} °N, ${c?.[0].toFixed(3)} °E`;
|
|
468
598
|
},
|
|
469
599
|
target: cursorCoordsRef.value,
|
|
470
600
|
};
|
|
@@ -476,28 +606,17 @@ const controls = computed(() => {
|
|
|
476
606
|
const initialCenter = toRaw(props.center);
|
|
477
607
|
const initialZoom = toRaw(mapPosition.value?.[2] ?? props.zoom);
|
|
478
608
|
/** @type {import("vue").Ref<Record<string,any>[]>} */
|
|
479
|
-
const eoxMapLayers = ref(
|
|
480
|
-
{
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
id: "osm",
|
|
485
|
-
title: "Background",
|
|
486
|
-
},
|
|
487
|
-
},
|
|
488
|
-
]);
|
|
609
|
+
const eoxMapLayers = ref(
|
|
610
|
+
/** @type {Record<string,any>[]} */ (
|
|
611
|
+
structuredClone(toRaw(props.baseLayers))
|
|
612
|
+
),
|
|
613
|
+
);
|
|
489
614
|
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
properties: {
|
|
496
|
-
id: "osm",
|
|
497
|
-
title: "Background",
|
|
498
|
-
},
|
|
499
|
-
},
|
|
500
|
-
]);
|
|
615
|
+
const eoxMapCompareLayers = ref(
|
|
616
|
+
/** @type {Record<string,any>[]} */ (
|
|
617
|
+
structuredClone(toRaw(props.baseLayers))
|
|
618
|
+
),
|
|
619
|
+
);
|
|
501
620
|
|
|
502
621
|
const animationOptions = ref({
|
|
503
622
|
duration: 0, // Initially set to 0 for an instant "jump"
|
|
@@ -505,9 +624,10 @@ const animationOptions = ref({
|
|
|
505
624
|
});
|
|
506
625
|
|
|
507
626
|
/** @type {import("vue").Ref<import("@eox/map").EOxMap | null>} */
|
|
508
|
-
const eoxMap =
|
|
627
|
+
const eoxMap = useTemplateRef("eoxMap");
|
|
509
628
|
/** @type {import("vue").Ref<import("@eox/map").EOxMap | null>} */
|
|
510
|
-
const compareMap =
|
|
629
|
+
const compareMap = useTemplateRef("compareMap");
|
|
630
|
+
|
|
511
631
|
const { selectedCompareStac } = storeToRefs(useSTAcStore());
|
|
512
632
|
const showCompare = computed(() =>
|
|
513
633
|
props.enableCompare && !!selectedCompareStac.value ? "" : "first",
|
|
@@ -516,10 +636,20 @@ const showCompare = computed(() =>
|
|
|
516
636
|
useHandleMapMoveEnd(eoxMap, mapPosition);
|
|
517
637
|
|
|
518
638
|
onMounted(() => {
|
|
519
|
-
const {
|
|
520
|
-
|
|
639
|
+
const {
|
|
640
|
+
selectedCompareStac,
|
|
641
|
+
selectedStac,
|
|
642
|
+
selectedItem,
|
|
643
|
+
selectedCompareItem,
|
|
644
|
+
} = storeToRefs(useSTAcStore());
|
|
645
|
+
if (!eoxMap.value) {
|
|
646
|
+
console.error("EOxMap reference is not available on mounted.");
|
|
647
|
+
return;
|
|
648
|
+
}
|
|
521
649
|
// assign map Element state to eox map
|
|
522
650
|
mapEl.value = eoxMap.value;
|
|
651
|
+
// enable terrain
|
|
652
|
+
mapEl.value.globeConfig.terrain = true;
|
|
523
653
|
|
|
524
654
|
if (props.enableCompare) {
|
|
525
655
|
mapCompareEl.value = compareMap.value;
|
|
@@ -534,6 +664,8 @@ onMounted(() => {
|
|
|
534
664
|
eoxMapCompareLayers,
|
|
535
665
|
eoxMap,
|
|
536
666
|
false,
|
|
667
|
+
selectedCompareItem,
|
|
668
|
+
props.baseLayers,
|
|
537
669
|
);
|
|
538
670
|
|
|
539
671
|
useUpdateTooltipProperties(
|
|
@@ -552,6 +684,7 @@ onMounted(() => {
|
|
|
552
684
|
compareMap,
|
|
553
685
|
props.zoomToExtent,
|
|
554
686
|
selectedItem,
|
|
687
|
+
props.baseLayers,
|
|
555
688
|
);
|
|
556
689
|
// After the initial mount and "jump", set the animation duration for subsequent flyTo calls
|
|
557
690
|
nextTick(() => {
|
|
@@ -559,14 +692,23 @@ onMounted(() => {
|
|
|
559
692
|
});
|
|
560
693
|
});
|
|
561
694
|
|
|
695
|
+
// sync map loading with the global loading state
|
|
696
|
+
useMapLoading(eoxMap, compareMap);
|
|
697
|
+
|
|
562
698
|
useUpdateTooltipProperties(eodashCollections, tooltipProperties);
|
|
563
699
|
|
|
564
700
|
const mainTooltipStyles = computed(() => ({
|
|
565
|
-
visibility:
|
|
701
|
+
visibility:
|
|
702
|
+
tooltipProperties.value.length || !!tooltipAdapter.value
|
|
703
|
+
? "visible"
|
|
704
|
+
: "hidden",
|
|
566
705
|
}));
|
|
567
706
|
|
|
568
707
|
const compareTooltipStyles = computed(() => ({
|
|
569
|
-
visibility:
|
|
708
|
+
visibility:
|
|
709
|
+
compareTooltipProperties.value.length || !!tooltipAdapter.value
|
|
710
|
+
? "visible"
|
|
711
|
+
: "hidden",
|
|
570
712
|
}));
|
|
571
713
|
/**
|
|
572
714
|
* @param {"main" | "compare"} map
|
|
@@ -592,6 +734,9 @@ const tooltipPropertyTransform = (map) => {
|
|
|
592
734
|
(prop) => prop.id === param.key,
|
|
593
735
|
);
|
|
594
736
|
if (!tooltipProp) {
|
|
737
|
+
if (tooltipAdapter.value) {
|
|
738
|
+
return tooltipAdapter.value(param, map);
|
|
739
|
+
}
|
|
595
740
|
return undefined;
|
|
596
741
|
}
|
|
597
742
|
if (typeof param.value === "object") {
|
|
@@ -603,7 +748,6 @@ const tooltipPropertyTransform = (map) => {
|
|
|
603
748
|
: 4;
|
|
604
749
|
param.value = Number(param.value).toFixed(decimals).toString();
|
|
605
750
|
}
|
|
606
|
-
|
|
607
751
|
return {
|
|
608
752
|
key: tooltipProp.title || tooltipProp.id,
|
|
609
753
|
value: param.value + " " + (tooltipProp.appendix || ""),
|
|
@@ -692,6 +836,6 @@ return (_ctx, _cache) => {
|
|
|
692
836
|
}
|
|
693
837
|
|
|
694
838
|
};
|
|
695
|
-
const index = /*#__PURE__*/_export_sfc(_sfc_main, [['styles',[_style_0]],['__scopeId',"data-v-
|
|
839
|
+
const index = /*#__PURE__*/_export_sfc(_sfc_main, [['styles',[_style_0]],['__scopeId',"data-v-6d08ac44"]]);
|
|
696
840
|
|
|
697
841
|
export { index as default };
|
|
@@ -2,13 +2,13 @@ import { onMounted, watch, nextTick, onUnmounted, ref, useTemplateRef, computed,
|
|
|
2
2
|
import '@eox/chart';
|
|
3
3
|
import '@eox/drawtools';
|
|
4
4
|
import '@eox/jsonform';
|
|
5
|
-
import {
|
|
5
|
+
import { L as useOnLayersUpdate, _ as _export_sfc, H as useSTAcStore, J as VBtn } from './asWebComponent-BlFN2lkB.js';
|
|
6
6
|
import { storeToRefs } from 'pinia';
|
|
7
|
-
import { P as ProcessList, c as compareJobs, j as jobs } from './ProcessList-
|
|
8
|
-
import EodashChart from './EodashChart-
|
|
9
|
-
import { i as initProcess, u as updateJsonformIdentifier, h as handleProcesses } from './handling-
|
|
10
|
-
import {
|
|
11
|
-
import { u as updateJobsStatus, d as download, g as getDrawToolsProperties } from './async-
|
|
7
|
+
import { P as ProcessList, c as compareJobs, j as jobs } from './ProcessList-DuI6WpS1.js';
|
|
8
|
+
import EodashChart from './EodashChart-ChrkA5oS.js';
|
|
9
|
+
import { i as initProcess, u as updateJsonformIdentifier, h as handleProcesses } from './handling-B6I1V5eG.js';
|
|
10
|
+
import { ab as getCompareLayers, B as getLayers, Q as compareIndicator, M as indicator, a1 as mapCompareEl, n as mapEl, V as areChartsSeparateLayout, X as compareChartSpec, W as chartSpec } from './helpers-CBqIUSXJ.js';
|
|
11
|
+
import { u as updateJobsStatus, d as download, g as getDrawToolsProperties } from './async-B2H8ZwUK.js';
|
|
12
12
|
import { mdiCogPlayOutline, mdiDownloadCircleOutline } from '@mdi/js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -158,6 +158,7 @@ const _sfc_main = {
|
|
|
158
158
|
default: false,
|
|
159
159
|
},
|
|
160
160
|
vegaEmbedOptions: {
|
|
161
|
+
/** @type {import("vue").PropType<import("vega-embed").EmbedOptions>} */
|
|
161
162
|
type: Object,
|
|
162
163
|
default() {
|
|
163
164
|
return { actions: true };
|