@opengeoweb/store 15.1.0 → 15.2.0
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/index.esm.js
CHANGED
|
@@ -1610,7 +1610,7 @@ var produceDraftStateForAllLayersForDimensionWithinMap = function produceDraftSt
|
|
|
1610
1610
|
var actionLayerSynced = isActionLayerSynced(draft, layerIdFromAction, dimension);
|
|
1611
1611
|
draft.allIds.forEach(function (layerId) {
|
|
1612
1612
|
var layer = draft.byId[layerId];
|
|
1613
|
-
if (!layer || layer.mapId !== mapId) {
|
|
1613
|
+
if (!layer || (layer === null || layer === void 0 ? void 0 : layer.mapId) !== mapId) {
|
|
1614
1614
|
return;
|
|
1615
1615
|
}
|
|
1616
1616
|
var wmjsDimension = webmapUtils.getWMJSDimensionForLayerAndDimension(layerId, dimension.name);
|
|
@@ -1823,6 +1823,9 @@ var slice$6 = createSlice({
|
|
|
1823
1823
|
if (draft.byId[layerId]) {
|
|
1824
1824
|
draft.byId[layerId].style = style;
|
|
1825
1825
|
}
|
|
1826
|
+
if (draft.activeLayerInfo) {
|
|
1827
|
+
draft.activeLayerInfo.style = style;
|
|
1828
|
+
}
|
|
1826
1829
|
},
|
|
1827
1830
|
layerChangeAcceptanceTime: function layerChangeAcceptanceTime(draft, action) {
|
|
1828
1831
|
var _action$payload7 = action.payload,
|
|
@@ -2012,7 +2015,8 @@ var slice$6 = createSlice({
|
|
|
2012
2015
|
mapId = _action$payload13.mapId;
|
|
2013
2016
|
// remove current baselayers for passed map
|
|
2014
2017
|
draft.availableBaseLayers.allIds = draft.availableBaseLayers.allIds.filter(function (layerId) {
|
|
2015
|
-
|
|
2018
|
+
var _draft$availableBaseL;
|
|
2019
|
+
if (((_draft$availableBaseL = draft.availableBaseLayers.byId[layerId]) === null || _draft$availableBaseL === void 0 ? void 0 : _draft$availableBaseL.mapId) === mapId) {
|
|
2016
2020
|
delete draft.availableBaseLayers.byId[layerId];
|
|
2017
2021
|
return false;
|
|
2018
2022
|
}
|
|
@@ -2192,7 +2196,15 @@ var slice$6 = createSlice({
|
|
|
2192
2196
|
currentLayer.selectedFeatureIndex = newFeatureIndex;
|
|
2193
2197
|
}
|
|
2194
2198
|
}
|
|
2195
|
-
|
|
2199
|
+
var updatedGeoJSONWithIds = shouldAllowMultipleShapes ? _objectSpread2(_objectSpread2({}, updatedGeoJSON), {}, {
|
|
2200
|
+
features: updatedGeoJSON.features.map(function (feature, index) {
|
|
2201
|
+
return _objectSpread2(_objectSpread2({}, feature), {}, {
|
|
2202
|
+
// Save the index as id so we can use it to select features
|
|
2203
|
+
id: index
|
|
2204
|
+
});
|
|
2205
|
+
})
|
|
2206
|
+
}) : updatedGeoJSON;
|
|
2207
|
+
currentLayer.geojson = updatedGeoJSONWithIds;
|
|
2196
2208
|
if (geoJSONIntersectionBoundsLayerId && geoJSONIntersectionLayerId) {
|
|
2197
2209
|
var _currentLayer$geojson;
|
|
2198
2210
|
var intersectionLayer = draft.byId[geoJSONIntersectionLayerId];
|
|
@@ -2202,7 +2214,7 @@ var slice$6 = createSlice({
|
|
|
2202
2214
|
}
|
|
2203
2215
|
var bounds = intersectionBoundsLayer.geojson;
|
|
2204
2216
|
var geoJSONProperties = intersectionLayer.defaultGeoJSONProperties || ((_currentLayer$geojson = currentLayer.geojson) === null || _currentLayer$geojson === void 0 || (_currentLayer$geojson = _currentLayer$geojson.features[0]) === null || _currentLayer$geojson === void 0 ? void 0 : _currentLayer$geojson.properties);
|
|
2205
|
-
intersectionLayer.geojson = createInterSections(
|
|
2217
|
+
intersectionLayer.geojson = createInterSections(updatedGeoJSONWithIds, bounds, geoJSONProperties);
|
|
2206
2218
|
}
|
|
2207
2219
|
},
|
|
2208
2220
|
updateFeatureProperties: function updateFeatureProperties(draft, action) {
|
|
@@ -2279,10 +2291,12 @@ var slice$6 = createSlice({
|
|
|
2279
2291
|
showLayerInfo: function showLayerInfo(draft, action) {
|
|
2280
2292
|
var _action$payload21 = action.payload,
|
|
2281
2293
|
serviceUrl = _action$payload21.serviceUrl,
|
|
2282
|
-
layerName = _action$payload21.layerName
|
|
2294
|
+
layerName = _action$payload21.layerName,
|
|
2295
|
+
style = _action$payload21.style;
|
|
2283
2296
|
draft.activeLayerInfo = {
|
|
2284
2297
|
serviceUrl: serviceUrl,
|
|
2285
|
-
layerName: layerName
|
|
2298
|
+
layerName: layerName,
|
|
2299
|
+
style: style
|
|
2286
2300
|
};
|
|
2287
2301
|
},
|
|
2288
2302
|
hideLayerInfo: function hideLayerInfo(draft) {
|
|
@@ -2340,7 +2354,7 @@ var slice$6 = createSlice({
|
|
|
2340
2354
|
var layers = draft.allIds.map(function (id) {
|
|
2341
2355
|
return draft.byId[id];
|
|
2342
2356
|
}).filter(function (layer) {
|
|
2343
|
-
return layer
|
|
2357
|
+
return (layer === null || layer === void 0 ? void 0 : layer.mapId) === mapId;
|
|
2344
2358
|
});
|
|
2345
2359
|
layers.forEach(function (layer) {
|
|
2346
2360
|
delete draft.byId[layer.id];
|
|
@@ -2731,14 +2745,29 @@ var slice$5 = createSlice({
|
|
|
2731
2745
|
return;
|
|
2732
2746
|
}
|
|
2733
2747
|
draft.byId[mapId].isClockVisible = isClockVisible;
|
|
2748
|
+
},
|
|
2749
|
+
setClockPositionSize: function setClockPositionSize(draft, action) {
|
|
2750
|
+
var _action$payload27 = action.payload,
|
|
2751
|
+
mapId = _action$payload27.mapId,
|
|
2752
|
+
position = _action$payload27.position,
|
|
2753
|
+
size = _action$payload27.size;
|
|
2754
|
+
if (!draft.byId[mapId]) {
|
|
2755
|
+
return;
|
|
2756
|
+
}
|
|
2757
|
+
if (position) {
|
|
2758
|
+
draft.byId[mapId].clockPosition = position;
|
|
2759
|
+
}
|
|
2760
|
+
if (size) {
|
|
2761
|
+
draft.byId[mapId].clockSize = size;
|
|
2762
|
+
}
|
|
2734
2763
|
}
|
|
2735
2764
|
},
|
|
2736
2765
|
extraReducers: function extraReducers(builder) {
|
|
2737
2766
|
builder.addCase(layerActions.addLayer, function (draft, action) {
|
|
2738
|
-
var _action$
|
|
2739
|
-
layerId = _action$
|
|
2740
|
-
mapId = _action$
|
|
2741
|
-
layer = _action$
|
|
2767
|
+
var _action$payload28 = action.payload,
|
|
2768
|
+
layerId = _action$payload28.layerId,
|
|
2769
|
+
mapId = _action$payload28.mapId,
|
|
2770
|
+
layer = _action$payload28.layer;
|
|
2742
2771
|
if (!draft.byId[mapId]) {
|
|
2743
2772
|
return;
|
|
2744
2773
|
}
|
|
@@ -2750,17 +2779,17 @@ var slice$5 = createSlice({
|
|
|
2750
2779
|
draft.byId[mapId].autoUpdateLayerId = layerId;
|
|
2751
2780
|
draft.byId[mapId].autoTimeStepLayerId = layerId;
|
|
2752
2781
|
}
|
|
2753
|
-
var isFeatureLayer = layer
|
|
2782
|
+
var isFeatureLayer = (layer === null || layer === void 0 ? void 0 : layer.layerType) === LayerType.featureLayer;
|
|
2754
2783
|
if (isFeatureLayer) {
|
|
2755
2784
|
draft.byId[mapId].featureLayers.unshift(layerId);
|
|
2756
2785
|
} else {
|
|
2757
2786
|
draft.byId[mapId].mapLayers.unshift(layerId);
|
|
2758
2787
|
}
|
|
2759
2788
|
}).addCase(layerActions.duplicateMapLayer, function (draft, action) {
|
|
2760
|
-
var _action$
|
|
2761
|
-
newLayerId = _action$
|
|
2762
|
-
oldLayerId = _action$
|
|
2763
|
-
mapId = _action$
|
|
2789
|
+
var _action$payload29 = action.payload,
|
|
2790
|
+
newLayerId = _action$payload29.newLayerId,
|
|
2791
|
+
oldLayerId = _action$payload29.oldLayerId,
|
|
2792
|
+
mapId = _action$payload29.mapId;
|
|
2764
2793
|
if (!draft.byId[mapId]) {
|
|
2765
2794
|
return;
|
|
2766
2795
|
}
|
|
@@ -2777,10 +2806,10 @@ var slice$5 = createSlice({
|
|
|
2777
2806
|
draft.byId[mapId].featureLayers.unshift(newLayerId);
|
|
2778
2807
|
}
|
|
2779
2808
|
}).addCase(layerActions.addBaseLayer, function (draft, action) {
|
|
2780
|
-
var _action$
|
|
2781
|
-
layer = _action$
|
|
2782
|
-
layerId = _action$
|
|
2783
|
-
mapId = _action$
|
|
2809
|
+
var _action$payload30 = action.payload,
|
|
2810
|
+
layer = _action$payload30.layer,
|
|
2811
|
+
layerId = _action$payload30.layerId,
|
|
2812
|
+
mapId = _action$payload30.mapId;
|
|
2784
2813
|
if (!draft.byId[mapId]) {
|
|
2785
2814
|
return;
|
|
2786
2815
|
}
|
|
@@ -2810,9 +2839,9 @@ var slice$5 = createSlice({
|
|
|
2810
2839
|
draft.byId[mapId].autoTimeStepLayerId = activeLayerId;
|
|
2811
2840
|
}
|
|
2812
2841
|
}).addCase(layerActions.setBaseLayers, function (draft, action) {
|
|
2813
|
-
var _action$
|
|
2814
|
-
layers = _action$
|
|
2815
|
-
mapId = _action$
|
|
2842
|
+
var _action$payload31 = action.payload,
|
|
2843
|
+
layers = _action$payload31.layers,
|
|
2844
|
+
mapId = _action$payload31.mapId;
|
|
2816
2845
|
// Split into base and overlayers
|
|
2817
2846
|
var baseLayers = [];
|
|
2818
2847
|
var overLayers = [];
|
|
@@ -2842,9 +2871,9 @@ var slice$5 = createSlice({
|
|
|
2842
2871
|
}
|
|
2843
2872
|
}
|
|
2844
2873
|
}).addCase(layerActions.layerDelete, function (draft, action) {
|
|
2845
|
-
var _action$
|
|
2846
|
-
mapId = _action$
|
|
2847
|
-
layerId = _action$
|
|
2874
|
+
var _action$payload32 = action.payload,
|
|
2875
|
+
mapId = _action$payload32.mapId,
|
|
2876
|
+
layerId = _action$payload32.layerId;
|
|
2848
2877
|
var map = draft.byId[mapId];
|
|
2849
2878
|
if (!map) {
|
|
2850
2879
|
return;
|
|
@@ -2870,9 +2899,9 @@ var slice$5 = createSlice({
|
|
|
2870
2899
|
return id !== layerId;
|
|
2871
2900
|
});
|
|
2872
2901
|
}).addCase(layerActions.baseLayerDelete, function (draft, action) {
|
|
2873
|
-
var _action$
|
|
2874
|
-
mapId = _action$
|
|
2875
|
-
layerId = _action$
|
|
2902
|
+
var _action$payload33 = action.payload,
|
|
2903
|
+
mapId = _action$payload33.mapId,
|
|
2904
|
+
layerId = _action$payload33.layerId;
|
|
2876
2905
|
if (!draft.byId[mapId]) {
|
|
2877
2906
|
return;
|
|
2878
2907
|
}
|
|
@@ -2883,14 +2912,14 @@ var slice$5 = createSlice({
|
|
|
2883
2912
|
return id !== layerId;
|
|
2884
2913
|
});
|
|
2885
2914
|
}).addCase(layerActions.layerChangeDimension, function (draft, action) {
|
|
2886
|
-
var _action$
|
|
2887
|
-
layerId = _action$
|
|
2888
|
-
dimension = _action$
|
|
2915
|
+
var _action$payload34 = action.payload,
|
|
2916
|
+
layerId = _action$payload34.layerId,
|
|
2917
|
+
dimension = _action$payload34.dimension;
|
|
2889
2918
|
produceDraftStateSetMapDimensionFromLayerChangeDimension(draft, layerId, dimension);
|
|
2890
2919
|
}).addCase(setTimeSync, function (draft, action) {
|
|
2891
|
-
var _action$
|
|
2892
|
-
targetsFromAction = _action$
|
|
2893
|
-
source = _action$
|
|
2920
|
+
var _action$payload35 = action.payload,
|
|
2921
|
+
targetsFromAction = _action$payload35.targets,
|
|
2922
|
+
source = _action$payload35.source;
|
|
2894
2923
|
/* Because we want backwards compatibility with the previous code, we also need to listen to the original source action */
|
|
2895
2924
|
var targets = [];
|
|
2896
2925
|
if (source) {
|
|
@@ -2943,9 +2972,9 @@ var slice$5 = createSlice({
|
|
|
2943
2972
|
}
|
|
2944
2973
|
});
|
|
2945
2974
|
}).addCase(setBboxSync, function (draft, action) {
|
|
2946
|
-
var _action$
|
|
2947
|
-
targetsFromAction = _action$
|
|
2948
|
-
source = _action$
|
|
2975
|
+
var _action$payload36 = action.payload,
|
|
2976
|
+
targetsFromAction = _action$payload36.targets,
|
|
2977
|
+
source = _action$payload36.source;
|
|
2949
2978
|
/* Because we want backwards compatibility with the previous code, we also need to listen to the original source action */
|
|
2950
2979
|
var targets = [];
|
|
2951
2980
|
if (source) {
|
|
@@ -2977,9 +3006,9 @@ var slice$5 = createSlice({
|
|
|
2977
3006
|
* These targets can be used as payloads in new Layer actions.
|
|
2978
3007
|
* These actions are here handled via the layer reducer, as it is the same logic
|
|
2979
3008
|
*/
|
|
2980
|
-
var _action$
|
|
2981
|
-
targets = _action$
|
|
2982
|
-
source = _action$
|
|
3009
|
+
var _action$payload37 = action.payload,
|
|
3010
|
+
targets = _action$payload37.targets,
|
|
3011
|
+
source = _action$payload37.source;
|
|
2983
3012
|
return targets.reduce(function (prevState, target) {
|
|
2984
3013
|
var actionType = (source === null || source === void 0 ? void 0 : source.type) || 'GENERIC_SYNC_SETLAYERACTIONS';
|
|
2985
3014
|
var action = {
|
|
@@ -3001,9 +3030,9 @@ var slice$5 = createSlice({
|
|
|
3001
3030
|
});
|
|
3002
3031
|
return draft;
|
|
3003
3032
|
}).addCase(mapChangeDimension, function (draft, action) {
|
|
3004
|
-
var _action$
|
|
3005
|
-
mapId = _action$
|
|
3006
|
-
dimensionFromAction = _action$
|
|
3033
|
+
var _action$payload38 = action.payload,
|
|
3034
|
+
mapId = _action$payload38.mapId,
|
|
3035
|
+
dimensionFromAction = _action$payload38.dimension;
|
|
3007
3036
|
produceDraftStateSetWebMapDimension(draft, mapId, dimensionFromAction, true);
|
|
3008
3037
|
}).addCase(setMapPreset, function (draft, action) {
|
|
3009
3038
|
var mapId = action.payload.mapId;
|
|
@@ -3023,9 +3052,9 @@ var slice$5 = createSlice({
|
|
|
3023
3052
|
draft.byId[mapId].animationDelay = defaultAnimationDelayAtStart;
|
|
3024
3053
|
draft.byId[mapId].dockedLayerManagerSize = '';
|
|
3025
3054
|
}).addCase(uiActions.registerDialog, function (draft, action) {
|
|
3026
|
-
var _action$
|
|
3027
|
-
mapId = _action$
|
|
3028
|
-
type = _action$
|
|
3055
|
+
var _action$payload39 = action.payload,
|
|
3056
|
+
mapId = _action$payload39.mapId,
|
|
3057
|
+
type = _action$payload39.type;
|
|
3029
3058
|
if (!draft.byId[mapId]) {
|
|
3030
3059
|
return;
|
|
3031
3060
|
}
|
|
@@ -3918,7 +3947,7 @@ function (state, mapId) {
|
|
|
3918
3947
|
var selectedFeature = (_features$ = features[0]) === null || _features$ === void 0 ? void 0 : _features$.geoJSON.features.find(function (feature) {
|
|
3919
3948
|
return feature.id === selectedFeatureId;
|
|
3920
3949
|
});
|
|
3921
|
-
if (selectedFeature
|
|
3950
|
+
if ((selectedFeature === null || selectedFeature === void 0 ? void 0 : selectedFeature.geometry.type) === 'Point') {
|
|
3922
3951
|
var _selectedFeature$prop, _selectedFeature$prop2, _selectedFeature$prop3;
|
|
3923
3952
|
var coordinates = selectedFeature.geometry.coordinates;
|
|
3924
3953
|
return {
|
|
@@ -5725,6 +5754,24 @@ var getLegendId = createSelector(getMapById, function (store) {
|
|
|
5725
5754
|
var getIsClockVisible = createSelector(getMapById, function (store) {
|
|
5726
5755
|
return store === null || store === void 0 ? void 0 : store.isClockVisible;
|
|
5727
5756
|
}, selectorMemoizationOptions);
|
|
5757
|
+
/**
|
|
5758
|
+
* Returns if clock position from webmap state
|
|
5759
|
+
*
|
|
5760
|
+
* @param {CoreAppStore} store - The Redux store from which the map state will be extracted.
|
|
5761
|
+
* @returns {ClockPosition | undefined} returnType: boolean
|
|
5762
|
+
*/
|
|
5763
|
+
var getClockPosition = createSelector(getMapById, function (store) {
|
|
5764
|
+
return store === null || store === void 0 ? void 0 : store.clockPosition;
|
|
5765
|
+
}, selectorMemoizationOptions);
|
|
5766
|
+
/**
|
|
5767
|
+
* Returns if clock size from webmap state
|
|
5768
|
+
*
|
|
5769
|
+
* @param {CoreAppStore} store - The Redux store from which the map state will be extracted.
|
|
5770
|
+
* @returns {ClockSize | undefined} returnType: boolean
|
|
5771
|
+
*/
|
|
5772
|
+
var getClockSize = createSelector(getMapById, function (store) {
|
|
5773
|
+
return store === null || store === void 0 ? void 0 : store.clockSize;
|
|
5774
|
+
}, selectorMemoizationOptions);
|
|
5728
5775
|
/**
|
|
5729
5776
|
* Creates a MapPreset from mapId
|
|
5730
5777
|
*
|
|
@@ -5734,14 +5781,14 @@ var getIsClockVisible = createSelector(getMapById, function (store) {
|
|
|
5734
5781
|
* @param {boolean} keepAllDims? keepAllDims: boolean - default false: whether or not to leave the time and reference_time dimentions
|
|
5735
5782
|
* @returns {MapPreset} returnType: MapPreset
|
|
5736
5783
|
*/
|
|
5737
|
-
var getMapPreset = createSelector(getMapLayers, getMapBaseLayers, getMapOverLayers, getBbox, getSrs, getActiveLayerId, getAutoTimeStepLayerId, getAutoUpdateLayerId, isAnimating, isAutoUpdating, isTimeSliderVisible, getDisplayMapPin, isZoomControlsVisible, getMapTimeStep, getMapAnimationDelay, getAnimationStartTime, getAnimationEndTime, getMapTimeSliderSpan, getMapDimensions, isTimestepAuto, isTimeSpanAuto, getLegendId, getIsClockVisible, getUiStore, function (_store, mapId) {
|
|
5784
|
+
var getMapPreset = createSelector(getMapLayers, getMapBaseLayers, getMapOverLayers, getBbox, getSrs, getActiveLayerId, getAutoTimeStepLayerId, getAutoUpdateLayerId, isAnimating, isAutoUpdating, isTimeSliderVisible, getDisplayMapPin, isZoomControlsVisible, getMapTimeStep, getMapAnimationDelay, getAnimationStartTime, getAnimationEndTime, getMapTimeSliderSpan, getMapDimensions, isTimestepAuto, isTimeSpanAuto, getLegendId, getIsClockVisible, getClockPosition, getClockSize, getUiStore, function (_store, mapId) {
|
|
5738
5785
|
return mapId;
|
|
5739
5786
|
}, function (_store, _mapId) {
|
|
5740
5787
|
var keepAllDims = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
5741
5788
|
return keepAllDims;
|
|
5742
|
-
}, function (mapLayers, baseLayers, overLayers, bbox, srs, activeLayerId, autoTimeStepLayerId, autoUpdateLayerId, isAnimating, isAutoUpdating, isTimeSliderVisible, displayMapPin, isZoomControlsVisible, mapTimeStep, mapAnimationDelay, animationStartTime, animationEndTime, timeSliderSpan, mapDimensions, isTimestepAuto, isTimeSpanAuto, legendId, isClockVisible, uiStore, mapId, keepAllDims) {
|
|
5789
|
+
}, function (mapLayers, baseLayers, overLayers, bbox, srs, activeLayerId, autoTimeStepLayerId, autoUpdateLayerId, isAnimating, isAutoUpdating, isTimeSliderVisible, displayMapPin, isZoomControlsVisible, mapTimeStep, mapAnimationDelay, animationStartTime, animationEndTime, timeSliderSpan, mapDimensions, isTimestepAuto, isTimeSpanAuto, legendId, isClockVisible, clockPosition, clockSize, uiStore, mapId, keepAllDims) {
|
|
5743
5790
|
var _overLayers$, _uiStore$dialogs$lege;
|
|
5744
|
-
var defaultOverlayer = arguments.length >
|
|
5791
|
+
var defaultOverlayer = arguments.length > 28 && arguments[28] !== undefined ? arguments[28] : ((_overLayers$ = overLayers[0]) === null || _overLayers$ === void 0 ? void 0 : _overLayers$.name) || 'none';
|
|
5745
5792
|
var allLayers = [].concat(_toConsumableArray(baseLayers), _toConsumableArray(overLayers), _toConsumableArray(mapLayers)).map(function (_ref3) {
|
|
5746
5793
|
_ref3.mapId;
|
|
5747
5794
|
var layer = _objectWithoutProperties(_ref3, _excluded$2);
|
|
@@ -5769,7 +5816,7 @@ var getMapPreset = createSelector(getMapLayers, getMapBaseLayers, getMapOverLaye
|
|
|
5769
5816
|
var shouldShowLegend = legendId ? uiStore === null || uiStore === void 0 || (_uiStore$dialogs$lege = uiStore.dialogs[legendId]) === null || _uiStore$dialogs$lege === void 0 ? void 0 : _uiStore$dialogs$lege.isOpen : false;
|
|
5770
5817
|
var dataExplorerDialog = uiStore === null || uiStore === void 0 ? void 0 : uiStore.dialogs[DialogTypes.DataExplorer];
|
|
5771
5818
|
var shouldShowDataExplorer = (dataExplorerDialog === null || dataExplorerDialog === void 0 ? void 0 : dataExplorerDialog.isOpen) && (dataExplorerDialog === null || dataExplorerDialog === void 0 ? void 0 : dataExplorerDialog.activeMapId) === mapId || false;
|
|
5772
|
-
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
|
|
5819
|
+
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
|
|
5773
5820
|
layers: allLayers
|
|
5774
5821
|
}, activeLayerId && {
|
|
5775
5822
|
activeLayerId: activeLayerId
|
|
@@ -5796,6 +5843,10 @@ var getMapPreset = createSelector(getMapLayers, getMapBaseLayers, getMapOverLaye
|
|
|
5796
5843
|
defaultOverlayer: defaultOverlayer
|
|
5797
5844
|
}, isClockVisible !== undefined && {
|
|
5798
5845
|
isClockVisible: isClockVisible
|
|
5846
|
+
}), clockPosition !== undefined && {
|
|
5847
|
+
clockPosition: clockPosition
|
|
5848
|
+
}), clockSize !== undefined && {
|
|
5849
|
+
clockSize: clockSize
|
|
5799
5850
|
}), keepAllDims && {
|
|
5800
5851
|
dimensions: mapDimensions
|
|
5801
5852
|
});
|
|
@@ -6025,6 +6076,8 @@ var selectors$1 = /*#__PURE__*/Object.freeze({
|
|
|
6025
6076
|
getAutoTimeStepLayerId: getAutoTimeStepLayerId,
|
|
6026
6077
|
getAutoUpdateLayerId: getAutoUpdateLayerId,
|
|
6027
6078
|
getBbox: getBbox,
|
|
6079
|
+
getClockPosition: getClockPosition,
|
|
6080
|
+
getClockSize: getClockSize,
|
|
6028
6081
|
getDataLimitsFromLayers: getDataLimitsFromLayers,
|
|
6029
6082
|
getDisableMapPin: getDisableMapPin,
|
|
6030
6083
|
getDisplayMapPin: getDisplayMapPin,
|
|
@@ -6658,7 +6711,7 @@ genericListener.startListening({
|
|
|
6658
6711
|
payload = _ref4.payload, type = _ref4.type;
|
|
6659
6712
|
listenerApi.cancelActiveListeners();
|
|
6660
6713
|
/* Should not listen to actions from itself */
|
|
6661
|
-
if (!(payload
|
|
6714
|
+
if (!((payload === null || payload === void 0 ? void 0 : payload.origin) === LayerActionOrigin.ReactMapViewParseLayer)) {
|
|
6662
6715
|
_context4.next = 4;
|
|
6663
6716
|
break;
|
|
6664
6717
|
}
|
|
@@ -6691,7 +6744,7 @@ genericListener.startListening({
|
|
|
6691
6744
|
payload = _ref5.payload, type = _ref5.type;
|
|
6692
6745
|
listenerApi.cancelActiveListeners();
|
|
6693
6746
|
/* Should not listen to actions from itself */
|
|
6694
|
-
if (!(payload
|
|
6747
|
+
if (!((payload === null || payload === void 0 ? void 0 : payload.origin) === LayerActionOrigin.ReactMapViewParseLayer)) {
|
|
6695
6748
|
_context5.next = 4;
|
|
6696
6749
|
break;
|
|
6697
6750
|
}
|
|
@@ -6756,7 +6809,7 @@ genericListener.startListening({
|
|
|
6756
6809
|
payload = _ref7.payload, type = _ref7.type;
|
|
6757
6810
|
listenerApi.cancelActiveListeners();
|
|
6758
6811
|
/* Should not listen to actions from itself */
|
|
6759
|
-
if (!(payload
|
|
6812
|
+
if (!((payload === null || payload === void 0 ? void 0 : payload.origin) === LayerActionOrigin.ReactMapViewParseLayer)) {
|
|
6760
6813
|
_context7.next = 4;
|
|
6761
6814
|
break;
|
|
6762
6815
|
}
|
|
@@ -6815,7 +6868,7 @@ genericListener.startListening({
|
|
|
6815
6868
|
payload = _ref9.payload, type = _ref9.type;
|
|
6816
6869
|
listenerApi.cancelActiveListeners();
|
|
6817
6870
|
/* Should not listen to actions from itself */
|
|
6818
|
-
if (!(payload
|
|
6871
|
+
if (!((payload === null || payload === void 0 ? void 0 : payload.origin) === LayerActionOrigin.ReactMapViewParseLayer)) {
|
|
6819
6872
|
_context9.next = 4;
|
|
6820
6873
|
break;
|
|
6821
6874
|
}
|
|
@@ -6848,7 +6901,7 @@ genericListener.startListening({
|
|
|
6848
6901
|
payload = _ref0.payload, type = _ref0.type;
|
|
6849
6902
|
listenerApi.cancelActiveListeners();
|
|
6850
6903
|
/* Should not listen to actions from itself */
|
|
6851
|
-
if (!(payload
|
|
6904
|
+
if (!((payload === null || payload === void 0 ? void 0 : payload.origin) === LayerActionOrigin.ReactMapViewParseLayer)) {
|
|
6852
6905
|
_context0.next = 4;
|
|
6853
6906
|
break;
|
|
6854
6907
|
}
|
|
@@ -7327,7 +7380,7 @@ mapListener.startListening({
|
|
|
7327
7380
|
actionCreator: mapActions.setMapPreset,
|
|
7328
7381
|
effect: function () {
|
|
7329
7382
|
var _effect2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref6, listenerApi) {
|
|
7330
|
-
var payload, mapId, initialProps, mapPreset, _mapPreset$dimensions, layers, activeLayerId, autoTimeStepLayerId, autoUpdateLayerId, proj, shouldAutoUpdate, shouldAnimate, animationPayload, toggleTimestepAuto, showTimeSlider, displayMapPin, shouldShowZoomControls, shouldShowLegend, shouldShowDataExplorer, dockedLayerManagerSize, timeSliderSpan, toggleTimeSpanAuto, defaultOverlayer, isClockVisible, _filterLayers, mapLayers, baseLayers, overLayers, _newLayerIds$layers$f, _newLayerIds$layers$f2, autoTimeStepLayerIdNew, autoUpdateLayerIdNew, onlyActiveLayerIdIsSet, newLayerIds, newAutoTimeStepLayerId, newAutoUpdateLayerId, customLayers, customBaseLayer, customOverLayer, baseLayersWithDefaultLayer, overLayersWithDefaultLayer, allBaseLayers, _overlayersFromStore$, overlayersFromStore, foundOverlayerId, checkIsprojectionSupported, animationLength, animationEndTime, shouldEndtimeOverride, interval, timeAlreadySet, endTime, startTime, centerTimeInSeconds, animationEnd, _startTime, duration, _animationEnd, animationStart, shouldOpenLegend, legendId, fiveMinuteDelayForAnimation, _animationEnd2, _animationStart;
|
|
7383
|
+
var payload, mapId, initialProps, mapPreset, _mapPreset$dimensions, layers, activeLayerId, autoTimeStepLayerId, autoUpdateLayerId, proj, shouldAutoUpdate, shouldAnimate, animationPayload, toggleTimestepAuto, showTimeSlider, displayMapPin, shouldShowZoomControls, shouldShowLegend, shouldShowDataExplorer, dockedLayerManagerSize, timeSliderSpan, toggleTimeSpanAuto, defaultOverlayer, isClockVisible, clockPosition, clockSize, _filterLayers, mapLayers, baseLayers, overLayers, _newLayerIds$layers$f, _newLayerIds$layers$f2, autoTimeStepLayerIdNew, autoUpdateLayerIdNew, onlyActiveLayerIdIsSet, newLayerIds, newAutoTimeStepLayerId, newAutoUpdateLayerId, customLayers, customBaseLayer, customOverLayer, baseLayersWithDefaultLayer, overLayersWithDefaultLayer, allBaseLayers, _overlayersFromStore$, overlayersFromStore, foundOverlayerId, checkIsprojectionSupported, animationLength, animationEndTime, shouldEndtimeOverride, interval, timeAlreadySet, endTime, startTime, centerTimeInSeconds, animationEnd, _startTime, duration, _animationEnd, animationStart, shouldOpenLegend, legendId, fiveMinuteDelayForAnimation, _animationEnd2, _animationStart;
|
|
7331
7384
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
7332
7385
|
while (1) switch (_context2.prev = _context2.next) {
|
|
7333
7386
|
case 0:
|
|
@@ -7336,10 +7389,10 @@ mapListener.startListening({
|
|
|
7336
7389
|
mapId = payload.mapId, initialProps = payload.initialProps;
|
|
7337
7390
|
mapPreset = initialProps.mapPreset;
|
|
7338
7391
|
if (!mapPreset) {
|
|
7339
|
-
_context2.next =
|
|
7392
|
+
_context2.next = 56;
|
|
7340
7393
|
break;
|
|
7341
7394
|
}
|
|
7342
|
-
layers = mapPreset.layers, activeLayerId = mapPreset.activeLayerId, autoTimeStepLayerId = mapPreset.autoTimeStepLayerId, autoUpdateLayerId = mapPreset.autoUpdateLayerId, proj = mapPreset.proj, shouldAutoUpdate = mapPreset.shouldAutoUpdate, shouldAnimate = mapPreset.shouldAnimate, animationPayload = mapPreset.animationPayload, toggleTimestepAuto = mapPreset.toggleTimestepAuto, showTimeSlider = mapPreset.showTimeSlider, displayMapPin = mapPreset.displayMapPin, shouldShowZoomControls = mapPreset.shouldShowZoomControls, shouldShowLegend = mapPreset.shouldShowLegend, shouldShowDataExplorer = mapPreset.shouldShowDataExplorer, dockedLayerManagerSize = mapPreset.dockedLayerManagerSize, timeSliderSpan = mapPreset.timeSliderSpan, toggleTimeSpanAuto = mapPreset.toggleTimeSpanAuto, defaultOverlayer = mapPreset.defaultOverlayer, isClockVisible = mapPreset.isClockVisible;
|
|
7395
|
+
layers = mapPreset.layers, activeLayerId = mapPreset.activeLayerId, autoTimeStepLayerId = mapPreset.autoTimeStepLayerId, autoUpdateLayerId = mapPreset.autoUpdateLayerId, proj = mapPreset.proj, shouldAutoUpdate = mapPreset.shouldAutoUpdate, shouldAnimate = mapPreset.shouldAnimate, animationPayload = mapPreset.animationPayload, toggleTimestepAuto = mapPreset.toggleTimestepAuto, showTimeSlider = mapPreset.showTimeSlider, displayMapPin = mapPreset.displayMapPin, shouldShowZoomControls = mapPreset.shouldShowZoomControls, shouldShowLegend = mapPreset.shouldShowLegend, shouldShowDataExplorer = mapPreset.shouldShowDataExplorer, dockedLayerManagerSize = mapPreset.dockedLayerManagerSize, timeSliderSpan = mapPreset.timeSliderSpan, toggleTimeSpanAuto = mapPreset.toggleTimeSpanAuto, defaultOverlayer = mapPreset.defaultOverlayer, isClockVisible = mapPreset.isClockVisible, clockPosition = mapPreset.clockPosition, clockSize = mapPreset.clockSize;
|
|
7343
7396
|
_filterLayers = filterLayers(layers), mapLayers = _filterLayers.mapLayers, baseLayers = _filterLayers.baseLayers, overLayers = _filterLayers.overLayers;
|
|
7344
7397
|
if (layers) {
|
|
7345
7398
|
// make sure all layers have a unique id before going forward
|
|
@@ -7472,6 +7525,20 @@ mapListener.startListening({
|
|
|
7472
7525
|
isClockVisible: isClockVisible
|
|
7473
7526
|
}));
|
|
7474
7527
|
}
|
|
7528
|
+
if (clockPosition !== undefined) {
|
|
7529
|
+
// set clock position
|
|
7530
|
+
listenerApi.dispatch(mapActions.setClockPositionSize({
|
|
7531
|
+
mapId: mapId,
|
|
7532
|
+
position: clockPosition
|
|
7533
|
+
}));
|
|
7534
|
+
}
|
|
7535
|
+
if (clockSize !== undefined) {
|
|
7536
|
+
// set clock size
|
|
7537
|
+
listenerApi.dispatch(mapActions.setClockPositionSize({
|
|
7538
|
+
mapId: mapId,
|
|
7539
|
+
size: clockSize
|
|
7540
|
+
}));
|
|
7541
|
+
}
|
|
7475
7542
|
// sets timestep by interval of animationPayload
|
|
7476
7543
|
interval = animationPayload === null || animationPayload === void 0 ? void 0 : animationPayload.interval;
|
|
7477
7544
|
if (interval) {
|
|
@@ -7591,15 +7658,15 @@ mapListener.startListening({
|
|
|
7591
7658
|
dockedLayerManagerSize: dockedLayerManagerSize
|
|
7592
7659
|
}));
|
|
7593
7660
|
}
|
|
7594
|
-
case
|
|
7661
|
+
case 46:
|
|
7595
7662
|
if (!(animationEndTime && (shouldEndtimeOverride || !(shouldAutoUpdate || shouldAnimate)))) {
|
|
7596
|
-
_context2.next =
|
|
7663
|
+
_context2.next = 56;
|
|
7597
7664
|
break;
|
|
7598
7665
|
}
|
|
7599
7666
|
fiveMinuteDelayForAnimation = 1000 * 60 * 5; // eslint-disable-next-line no-await-in-loop
|
|
7600
|
-
_context2.next =
|
|
7667
|
+
_context2.next = 50;
|
|
7601
7668
|
return listenerApi.delay(fiveMinuteDelayForAnimation);
|
|
7602
|
-
case
|
|
7669
|
+
case 50:
|
|
7603
7670
|
_animationEnd2 = getAnimationEndTime(listenerApi.getState(), mapId);
|
|
7604
7671
|
listenerApi.dispatch(mapActions.setAnimationEndTime({
|
|
7605
7672
|
mapId: mapId,
|
|
@@ -7614,13 +7681,13 @@ mapListener.startListening({
|
|
|
7614
7681
|
minutes: 5
|
|
7615
7682
|
}).toISOString()
|
|
7616
7683
|
}));
|
|
7617
|
-
_context2.next =
|
|
7618
|
-
break;
|
|
7619
|
-
case 54:
|
|
7620
|
-
_context2.next = 59;
|
|
7684
|
+
_context2.next = 46;
|
|
7621
7685
|
break;
|
|
7622
7686
|
case 56:
|
|
7623
|
-
_context2.
|
|
7687
|
+
_context2.next = 61;
|
|
7688
|
+
break;
|
|
7689
|
+
case 58:
|
|
7690
|
+
_context2.prev = 58;
|
|
7624
7691
|
_context2.t0 = _context2["catch"](1);
|
|
7625
7692
|
if (_context2.t0 instanceof Error) {
|
|
7626
7693
|
listenerApi.dispatch(mapActions.setMapPresetError({
|
|
@@ -7628,11 +7695,11 @@ mapListener.startListening({
|
|
|
7628
7695
|
error: _context2.t0.message
|
|
7629
7696
|
}));
|
|
7630
7697
|
}
|
|
7631
|
-
case
|
|
7698
|
+
case 61:
|
|
7632
7699
|
case "end":
|
|
7633
7700
|
return _context2.stop();
|
|
7634
7701
|
}
|
|
7635
|
-
}, _callee2, null, [[1,
|
|
7702
|
+
}, _callee2, null, [[1, 58]]);
|
|
7636
7703
|
}));
|
|
7637
7704
|
function effect(_x3, _x4) {
|
|
7638
7705
|
return _effect2.apply(this, arguments);
|
|
@@ -7665,6 +7732,7 @@ mapListener.startListening({
|
|
|
7665
7732
|
var payload = _ref8.payload;
|
|
7666
7733
|
var mapId = payload.mapId,
|
|
7667
7734
|
isForwardStep = payload.isForwardStep;
|
|
7735
|
+
// timeStep is stored in minutes
|
|
7668
7736
|
var timeStep = getMapTimeStep(listenerApi.getState(), mapId);
|
|
7669
7737
|
var currentTime = getSelectedTime(listenerApi.getState(), mapId);
|
|
7670
7738
|
var _mapSelectors$getData = getDataLimitsFromLayers(listenerApi.getState(), mapId),
|
|
@@ -7673,14 +7741,23 @@ mapListener.startListening({
|
|
|
7673
7741
|
dataEndTime = _mapSelectors$getData2[1];
|
|
7674
7742
|
if (dateUtils.isValid(currentTime)) {
|
|
7675
7743
|
var makeForwardStep = function makeForwardStep() {
|
|
7676
|
-
|
|
7677
|
-
var
|
|
7744
|
+
// timeStep is in minutes, convert to seconds
|
|
7745
|
+
var timeStepInSeconds = timeStep * 60;
|
|
7746
|
+
var nextTime = currentTime + timeStepInSeconds;
|
|
7747
|
+
// For large timesteps (>12h), round to nearest hour instead of timestep
|
|
7748
|
+
// This ensures 12:07 with 24h step goes to 12:00 next day, not 00:00
|
|
7749
|
+
var roundingStep = timeStep > 12 * 60 ? 60 : timeStep; // Use 1 hour for large steps
|
|
7750
|
+
var roundedTime = roundWithTimeStep(nextTime, roundingStep, 'round');
|
|
7678
7751
|
var newTime = Math.min(roundedTime, dataEndTime || roundedTime);
|
|
7679
7752
|
return dateUtils.fromUnix(newTime).toISOString();
|
|
7680
7753
|
};
|
|
7681
7754
|
var makeBackwardStep = function makeBackwardStep() {
|
|
7682
|
-
|
|
7683
|
-
var
|
|
7755
|
+
// timeStep is in minutes, convert to seconds
|
|
7756
|
+
var timeStepInSeconds = timeStep * 60;
|
|
7757
|
+
var nextTime = currentTime - timeStepInSeconds;
|
|
7758
|
+
// For large timesteps (>12h), round to nearest hour instead of timestep
|
|
7759
|
+
var roundingStep = timeStep > 12 * 60 ? 60 : timeStep; // Use 1 hour for large steps
|
|
7760
|
+
var roundedTime = roundWithTimeStep(nextTime, roundingStep, 'round');
|
|
7684
7761
|
var newTime = Math.max(roundedTime, dataStartTime || roundedTime);
|
|
7685
7762
|
return dateUtils.fromUnix(newTime).toISOString();
|
|
7686
7763
|
};
|
|
@@ -7876,7 +7953,7 @@ openlayersListener.startListening({
|
|
|
7876
7953
|
effect: function effect(_ref4, listenerApi) {
|
|
7877
7954
|
var payload = _ref4.payload;
|
|
7878
7955
|
var group = getSynchronizationGroup(listenerApi.getState(), payload.groupId);
|
|
7879
|
-
if (!group || group.type !== SYNCGROUPS_TYPE_SETBBOX) {
|
|
7956
|
+
if (!group || (group === null || group === void 0 ? void 0 : group.type) !== SYNCGROUPS_TYPE_SETBBOX) {
|
|
7880
7957
|
return;
|
|
7881
7958
|
}
|
|
7882
7959
|
var groupView = getViewObjectForSyncGroup(payload.groupId);
|
|
@@ -8466,8 +8543,9 @@ drawingToolListener.startListening({
|
|
|
8466
8543
|
_ref3 = currentGeoJSONLayer || {}, currentGeoJSON = _ref3.geojson, _ref3$selectedFeature = _ref3.selectedFeatureIndex, selectedFeatureIndex = _ref3$selectedFeature === void 0 ? 0 : _ref3$selectedFeature;
|
|
8467
8544
|
currentSelectionType = currentGeoJSON === null || currentGeoJSON === void 0 || (_currentGeoJSON$featu = currentGeoJSON.features[selectedFeatureIndex]) === null || _currentGeoJSON$featu === void 0 || (_currentGeoJSON$featu = _currentGeoJSON$featu.properties) === null || _currentGeoJSON$featu === void 0 ? void 0 : _currentGeoJSON$featu.selectionType;
|
|
8468
8545
|
newSelectionType = newDrawMode.selectionType;
|
|
8469
|
-
isNewToolSelected = currentSelectionType !== newSelectionType;
|
|
8470
|
-
|
|
8546
|
+
isNewToolSelected = currentSelectionType !== newSelectionType; // don't change anything if same tool is selected again
|
|
8547
|
+
// but for shouldAllowMultipleShapes same tool will also be a new drawing
|
|
8548
|
+
shouldUpdateNewShape = !(currentGeoJSON !== null && currentGeoJSON !== void 0 && (_currentGeoJSON$featu2 = currentGeoJSON.features) !== null && _currentGeoJSON$featu2 !== void 0 && _currentGeoJSON$featu2.length) || isNewToolSelected || shouldAllowMultipleShapes;
|
|
8471
8549
|
if (shouldUpdateNewShape && shouldUpdateShape) {
|
|
8472
8550
|
shapeWithSelectionType = addSelectionTypeToGeoJSON(newDrawMode.shape, newDrawMode.selectionType);
|
|
8473
8551
|
geoJSONFeatureCollection = getFeatureCollection(shapeWithSelectionType, shouldAllowMultipleShapes, currentGeoJSON);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/store",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.2.0",
|
|
4
4
|
"description": "GeoWeb Store library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@opengeoweb/shared": "15.
|
|
11
|
+
"@opengeoweb/shared": "15.2.0",
|
|
12
12
|
"react-redux": "^9.2.0",
|
|
13
13
|
"@reduxjs/toolkit": "^2.6.1",
|
|
14
|
-
"@opengeoweb/webmap-react": "15.
|
|
15
|
-
"@opengeoweb/webmap": "15.
|
|
14
|
+
"@opengeoweb/webmap-react": "15.2.0",
|
|
15
|
+
"@opengeoweb/webmap": "15.2.0",
|
|
16
16
|
"immer": "^10.0.3",
|
|
17
17
|
"lodash": "^4.17.21",
|
|
18
|
-
"@opengeoweb/metronome": "15.
|
|
19
|
-
"@opengeoweb/time-slider": "15.
|
|
18
|
+
"@opengeoweb/metronome": "15.2.0",
|
|
19
|
+
"@opengeoweb/time-slider": "15.2.0",
|
|
20
20
|
"react-router-dom": "^6.23.1",
|
|
21
21
|
"ol": "^10.4.0",
|
|
22
22
|
"@turf/turf": "^7.2.0",
|
|
@@ -2092,6 +2092,7 @@ export declare const getTimeStepForLayerId: ((state: any, layerId: any) => numbe
|
|
|
2092
2092
|
export declare const getActiveLayerInfo: ((state: CoreAppStore) => {
|
|
2093
2093
|
layerName: string;
|
|
2094
2094
|
serviceUrl: string;
|
|
2095
|
+
style?: string;
|
|
2095
2096
|
} | undefined) & {
|
|
2096
2097
|
clearCache: () => void;
|
|
2097
2098
|
resultsCount: () => number;
|
|
@@ -2100,10 +2101,12 @@ export declare const getActiveLayerInfo: ((state: CoreAppStore) => {
|
|
|
2100
2101
|
resultFunc: (resultFuncArgs_0: LayerState | undefined) => {
|
|
2101
2102
|
layerName: string;
|
|
2102
2103
|
serviceUrl: string;
|
|
2104
|
+
style?: string;
|
|
2103
2105
|
} | undefined;
|
|
2104
2106
|
memoizedResultFunc: ((resultFuncArgs_0: LayerState | undefined) => {
|
|
2105
2107
|
layerName: string;
|
|
2106
2108
|
serviceUrl: string;
|
|
2109
|
+
style?: string;
|
|
2107
2110
|
} | undefined) & {
|
|
2108
2111
|
clearCache: () => void;
|
|
2109
2112
|
resultsCount: () => number;
|
|
@@ -2112,6 +2115,7 @@ export declare const getActiveLayerInfo: ((state: CoreAppStore) => {
|
|
|
2112
2115
|
lastResult: () => {
|
|
2113
2116
|
layerName: string;
|
|
2114
2117
|
serviceUrl: string;
|
|
2118
|
+
style?: string;
|
|
2115
2119
|
} | undefined;
|
|
2116
2120
|
dependencies: [(store: CoreAppStore) => LayerState | undefined];
|
|
2117
2121
|
recomputations: () => number;
|
|
@@ -53,6 +53,7 @@ export interface LayerState {
|
|
|
53
53
|
activeLayerInfo?: {
|
|
54
54
|
layerName: string;
|
|
55
55
|
serviceUrl: string;
|
|
56
|
+
style?: string;
|
|
56
57
|
};
|
|
57
58
|
}
|
|
58
59
|
export interface LayerPayload {
|
|
@@ -170,4 +171,5 @@ export interface ShowLayerInfoPayload {
|
|
|
170
171
|
layerName: string;
|
|
171
172
|
mapId: string;
|
|
172
173
|
source?: uiTypes.Source;
|
|
174
|
+
style?: string;
|
|
173
175
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PayloadAction, Draft } from '@reduxjs/toolkit';
|
|
2
2
|
import type { MapPinLocationPayload, SetBboxPayload, SetStepBackWardOrForward, UpdateAllMapDimensionsPayload } from '@opengeoweb/webmap-react';
|
|
3
|
-
import type { WebMapState, SetAutoLayerIdPayload, SetMapAnimationStartPayload, SetMapAnimationStopPayload, SetTimeSliderSpanPayload, SetTimeStepPayload, SetAnimationStartTimePayload, SetAnimationEndTimePayload, SetAnimationDelayPayload, MoveLayerPayload, SetTimeSliderWidthPayload, SetTimeSliderCenterTimePayload, SetEndTimeOverriding, ToggleAutoUpdatePayload, ToggleTimestepAutoPayload, ToggleTimeSpanAutoPayload, ToggleTimeSliderHoverPayload, DisableMapPinPayload, ToggleTimeSliderIsVisiblePayload, SetDockedLayerManagerSize, ToggleAnimationLengthAutoPayload, SetDefaultMapSettingsPayload, ToggleClockPayload } from './types';
|
|
3
|
+
import type { WebMapState, SetAutoLayerIdPayload, SetMapAnimationStartPayload, SetMapAnimationStopPayload, SetTimeSliderSpanPayload, SetTimeStepPayload, SetAnimationStartTimePayload, SetAnimationEndTimePayload, SetAnimationDelayPayload, MoveLayerPayload, SetTimeSliderWidthPayload, SetTimeSliderCenterTimePayload, SetEndTimeOverriding, ToggleAutoUpdatePayload, ToggleTimestepAutoPayload, ToggleTimeSpanAutoPayload, ToggleTimeSliderHoverPayload, DisableMapPinPayload, ToggleTimeSliderIsVisiblePayload, SetDockedLayerManagerSize, ToggleAnimationLengthAutoPayload, SetDefaultMapSettingsPayload, ToggleClockPayload, SetClockPositionSizePayload } from './types';
|
|
4
4
|
import type { ToggleMapPinIsVisiblePayload, ToggleZoomControlsPayload } from '../types';
|
|
5
5
|
import type { MapActionOrigin } from './enums';
|
|
6
6
|
/**
|
|
@@ -56,7 +56,7 @@ export declare const slice: import("@reduxjs/toolkit").Slice<WebMapState, {
|
|
|
56
56
|
setDockedLayerManagerSize: (draft: Draft<WebMapState>, action: PayloadAction<SetDockedLayerManagerSize>) => void;
|
|
57
57
|
setMapPresetError: (_draft: Draft<WebMapState>, _action: PayloadAction<{
|
|
58
58
|
mapId: string;
|
|
59
|
-
error
|
|
59
|
+
error?: string;
|
|
60
60
|
}>) => void;
|
|
61
61
|
setDefaultMapSettings: (draft: Draft<WebMapState>, action: PayloadAction<SetDefaultMapSettingsPayload>) => void;
|
|
62
62
|
changeOverlayer: (draft: Draft<WebMapState>, action: PayloadAction<{
|
|
@@ -65,6 +65,7 @@ export declare const slice: import("@reduxjs/toolkit").Slice<WebMapState, {
|
|
|
65
65
|
origin: string;
|
|
66
66
|
}>) => void;
|
|
67
67
|
toggleClock: (draft: Draft<WebMapState>, action: PayloadAction<ToggleClockPayload>) => void;
|
|
68
|
+
setClockPositionSize: (draft: Draft<WebMapState>, action: PayloadAction<SetClockPositionSizePayload>) => void;
|
|
68
69
|
}, "mapReducer", "mapReducer", import("@reduxjs/toolkit").SliceSelectors<WebMapState>>;
|
|
69
70
|
export declare const mapActions: {
|
|
70
71
|
setMapPreset: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./types").SetMapPresetPayload, string>;
|
|
@@ -113,7 +114,7 @@ export declare const mapActions: {
|
|
|
113
114
|
setDockedLayerManagerSize: import("@reduxjs/toolkit").ActionCreatorWithPayload<SetDockedLayerManagerSize, "mapReducer/setDockedLayerManagerSize">;
|
|
114
115
|
setMapPresetError: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
115
116
|
mapId: string;
|
|
116
|
-
error
|
|
117
|
+
error?: string;
|
|
117
118
|
}, "mapReducer/setMapPresetError">;
|
|
118
119
|
setDefaultMapSettings: import("@reduxjs/toolkit").ActionCreatorWithPayload<SetDefaultMapSettingsPayload, "mapReducer/setDefaultMapSettings">;
|
|
119
120
|
changeOverlayer: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -122,5 +123,6 @@ export declare const mapActions: {
|
|
|
122
123
|
origin: string;
|
|
123
124
|
}, "mapReducer/changeOverlayer">;
|
|
124
125
|
toggleClock: import("@reduxjs/toolkit").ActionCreatorWithPayload<ToggleClockPayload, "mapReducer/toggleClock">;
|
|
126
|
+
setClockPositionSize: import("@reduxjs/toolkit").ActionCreatorWithPayload<SetClockPositionSizePayload, "mapReducer/setClockPositionSize">;
|
|
125
127
|
};
|
|
126
128
|
export declare const mapReducer: import("redux").Reducer<WebMapState>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Bbox, MapPreset, WebMap, WebMapState } from './types';
|
|
1
|
+
import type { Bbox, ClockPosition, ClockSize, MapPreset, WebMap, WebMapState } from './types';
|
|
2
2
|
import type { CoreAppStore } from '../../types';
|
|
3
3
|
import { uiTypes } from '../../ui';
|
|
4
4
|
import type { Dimension, HarmonieInitialPropsResult, InitialTimeSliderProps, Layer, MultiMapInitialProps, ReduxLayer, TimeSliderStartCenterEndTime, WebMapAnimationList } from '../types';
|
|
@@ -2094,6 +2094,60 @@ export declare const getIsClockVisible: ((state: CoreAppStore, mapId: string) =>
|
|
|
2094
2094
|
memoize: typeof import("reselect").weakMapMemoize;
|
|
2095
2095
|
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
2096
2096
|
};
|
|
2097
|
+
/**
|
|
2098
|
+
* Returns if clock position from webmap state
|
|
2099
|
+
*
|
|
2100
|
+
* @param {CoreAppStore} store - The Redux store from which the map state will be extracted.
|
|
2101
|
+
* @returns {ClockPosition | undefined} returnType: boolean
|
|
2102
|
+
*/
|
|
2103
|
+
export declare const getClockPosition: ((state: CoreAppStore, mapId: string) => ClockPosition | undefined) & {
|
|
2104
|
+
clearCache: () => void;
|
|
2105
|
+
resultsCount: () => number;
|
|
2106
|
+
resetResultsCount: () => void;
|
|
2107
|
+
} & {
|
|
2108
|
+
resultFunc: (resultFuncArgs_0: WebMap | undefined) => ClockPosition | undefined;
|
|
2109
|
+
memoizedResultFunc: ((resultFuncArgs_0: WebMap | undefined) => ClockPosition | undefined) & {
|
|
2110
|
+
clearCache: () => void;
|
|
2111
|
+
resultsCount: () => number;
|
|
2112
|
+
resetResultsCount: () => void;
|
|
2113
|
+
};
|
|
2114
|
+
lastResult: () => ClockPosition | undefined;
|
|
2115
|
+
dependencies: [(store: CoreAppStore, mapId: string) => WebMap | undefined];
|
|
2116
|
+
recomputations: () => number;
|
|
2117
|
+
resetRecomputations: () => void;
|
|
2118
|
+
dependencyRecomputations: () => number;
|
|
2119
|
+
resetDependencyRecomputations: () => void;
|
|
2120
|
+
} & {
|
|
2121
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
2122
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
2123
|
+
};
|
|
2124
|
+
/**
|
|
2125
|
+
* Returns if clock size from webmap state
|
|
2126
|
+
*
|
|
2127
|
+
* @param {CoreAppStore} store - The Redux store from which the map state will be extracted.
|
|
2128
|
+
* @returns {ClockSize | undefined} returnType: boolean
|
|
2129
|
+
*/
|
|
2130
|
+
export declare const getClockSize: ((state: CoreAppStore, mapId: string) => ClockSize | undefined) & {
|
|
2131
|
+
clearCache: () => void;
|
|
2132
|
+
resultsCount: () => number;
|
|
2133
|
+
resetResultsCount: () => void;
|
|
2134
|
+
} & {
|
|
2135
|
+
resultFunc: (resultFuncArgs_0: WebMap | undefined) => ClockSize | undefined;
|
|
2136
|
+
memoizedResultFunc: ((resultFuncArgs_0: WebMap | undefined) => ClockSize | undefined) & {
|
|
2137
|
+
clearCache: () => void;
|
|
2138
|
+
resultsCount: () => number;
|
|
2139
|
+
resetResultsCount: () => void;
|
|
2140
|
+
};
|
|
2141
|
+
lastResult: () => ClockSize | undefined;
|
|
2142
|
+
dependencies: [(store: CoreAppStore, mapId: string) => WebMap | undefined];
|
|
2143
|
+
recomputations: () => number;
|
|
2144
|
+
resetRecomputations: () => void;
|
|
2145
|
+
dependencyRecomputations: () => number;
|
|
2146
|
+
resetDependencyRecomputations: () => void;
|
|
2147
|
+
} & {
|
|
2148
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
2149
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
2150
|
+
};
|
|
2097
2151
|
/**
|
|
2098
2152
|
* Creates a MapPreset from mapId
|
|
2099
2153
|
*
|
|
@@ -2108,8 +2162,8 @@ export declare const getMapPreset: ((state: CoreAppStore & uiTypes.UIModuleState
|
|
|
2108
2162
|
resultsCount: () => number;
|
|
2109
2163
|
resetResultsCount: () => void;
|
|
2110
2164
|
} & {
|
|
2111
|
-
resultFunc: (resultFuncArgs_0: ReduxLayer[], resultFuncArgs_1: ReduxLayer[], resultFuncArgs_2: ReduxLayer[], resultFuncArgs_3: Bbox, resultFuncArgs_4: string, resultFuncArgs_5: string | undefined, resultFuncArgs_6: string | undefined, resultFuncArgs_7: string | undefined, resultFuncArgs_8: boolean, resultFuncArgs_9: boolean, resultFuncArgs_10: boolean | undefined, resultFuncArgs_11: boolean | undefined, resultFuncArgs_12: boolean | undefined, resultFuncArgs_13: number, resultFuncArgs_14: number | undefined, resultFuncArgs_15: string | undefined, resultFuncArgs_16: string | undefined, resultFuncArgs_17: number | undefined, resultFuncArgs_18: Dimension[] | undefined, resultFuncArgs_19: boolean | undefined, resultFuncArgs_20: boolean | undefined, resultFuncArgs_21: string | undefined, resultFuncArgs_22: boolean | undefined, resultFuncArgs_23: uiTypes.UIStoreType,
|
|
2112
|
-
memoizedResultFunc: ((resultFuncArgs_0: ReduxLayer[], resultFuncArgs_1: ReduxLayer[], resultFuncArgs_2: ReduxLayer[], resultFuncArgs_3: Bbox, resultFuncArgs_4: string, resultFuncArgs_5: string | undefined, resultFuncArgs_6: string | undefined, resultFuncArgs_7: string | undefined, resultFuncArgs_8: boolean, resultFuncArgs_9: boolean, resultFuncArgs_10: boolean | undefined, resultFuncArgs_11: boolean | undefined, resultFuncArgs_12: boolean | undefined, resultFuncArgs_13: number, resultFuncArgs_14: number | undefined, resultFuncArgs_15: string | undefined, resultFuncArgs_16: string | undefined, resultFuncArgs_17: number | undefined, resultFuncArgs_18: Dimension[] | undefined, resultFuncArgs_19: boolean | undefined, resultFuncArgs_20: boolean | undefined, resultFuncArgs_21: string | undefined, resultFuncArgs_22: boolean | undefined, resultFuncArgs_23: uiTypes.UIStoreType,
|
|
2165
|
+
resultFunc: (resultFuncArgs_0: ReduxLayer[], resultFuncArgs_1: ReduxLayer[], resultFuncArgs_2: ReduxLayer[], resultFuncArgs_3: Bbox, resultFuncArgs_4: string, resultFuncArgs_5: string | undefined, resultFuncArgs_6: string | undefined, resultFuncArgs_7: string | undefined, resultFuncArgs_8: boolean, resultFuncArgs_9: boolean, resultFuncArgs_10: boolean | undefined, resultFuncArgs_11: boolean | undefined, resultFuncArgs_12: boolean | undefined, resultFuncArgs_13: number, resultFuncArgs_14: number | undefined, resultFuncArgs_15: string | undefined, resultFuncArgs_16: string | undefined, resultFuncArgs_17: number | undefined, resultFuncArgs_18: Dimension[] | undefined, resultFuncArgs_19: boolean | undefined, resultFuncArgs_20: boolean | undefined, resultFuncArgs_21: string | undefined, resultFuncArgs_22: boolean | undefined, resultFuncArgs_23: ClockPosition | undefined, resultFuncArgs_24: ClockSize | undefined, resultFuncArgs_25: uiTypes.UIStoreType, resultFuncArgs_26: string, resultFuncArgs_27: string) => MapPreset;
|
|
2166
|
+
memoizedResultFunc: ((resultFuncArgs_0: ReduxLayer[], resultFuncArgs_1: ReduxLayer[], resultFuncArgs_2: ReduxLayer[], resultFuncArgs_3: Bbox, resultFuncArgs_4: string, resultFuncArgs_5: string | undefined, resultFuncArgs_6: string | undefined, resultFuncArgs_7: string | undefined, resultFuncArgs_8: boolean, resultFuncArgs_9: boolean, resultFuncArgs_10: boolean | undefined, resultFuncArgs_11: boolean | undefined, resultFuncArgs_12: boolean | undefined, resultFuncArgs_13: number, resultFuncArgs_14: number | undefined, resultFuncArgs_15: string | undefined, resultFuncArgs_16: string | undefined, resultFuncArgs_17: number | undefined, resultFuncArgs_18: Dimension[] | undefined, resultFuncArgs_19: boolean | undefined, resultFuncArgs_20: boolean | undefined, resultFuncArgs_21: string | undefined, resultFuncArgs_22: boolean | undefined, resultFuncArgs_23: ClockPosition | undefined, resultFuncArgs_24: ClockSize | undefined, resultFuncArgs_25: uiTypes.UIStoreType, resultFuncArgs_26: string, resultFuncArgs_27: string) => MapPreset) & {
|
|
2113
2167
|
clearCache: () => void;
|
|
2114
2168
|
resultsCount: () => number;
|
|
2115
2169
|
resetResultsCount: () => void;
|
|
@@ -2675,6 +2729,46 @@ export declare const getMapPreset: ((state: CoreAppStore & uiTypes.UIModuleState
|
|
|
2675
2729
|
} & {
|
|
2676
2730
|
memoize: typeof import("reselect").weakMapMemoize;
|
|
2677
2731
|
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
2732
|
+
}, ((state: CoreAppStore, mapId: string) => ClockPosition | undefined) & {
|
|
2733
|
+
clearCache: () => void;
|
|
2734
|
+
resultsCount: () => number;
|
|
2735
|
+
resetResultsCount: () => void;
|
|
2736
|
+
} & {
|
|
2737
|
+
resultFunc: (resultFuncArgs_0: WebMap | undefined) => ClockPosition | undefined;
|
|
2738
|
+
memoizedResultFunc: ((resultFuncArgs_0: WebMap | undefined) => ClockPosition | undefined) & {
|
|
2739
|
+
clearCache: () => void;
|
|
2740
|
+
resultsCount: () => number;
|
|
2741
|
+
resetResultsCount: () => void;
|
|
2742
|
+
};
|
|
2743
|
+
lastResult: () => ClockPosition | undefined;
|
|
2744
|
+
dependencies: [(store: CoreAppStore, mapId: string) => WebMap | undefined];
|
|
2745
|
+
recomputations: () => number;
|
|
2746
|
+
resetRecomputations: () => void;
|
|
2747
|
+
dependencyRecomputations: () => number;
|
|
2748
|
+
resetDependencyRecomputations: () => void;
|
|
2749
|
+
} & {
|
|
2750
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
2751
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
2752
|
+
}, ((state: CoreAppStore, mapId: string) => ClockSize | undefined) & {
|
|
2753
|
+
clearCache: () => void;
|
|
2754
|
+
resultsCount: () => number;
|
|
2755
|
+
resetResultsCount: () => void;
|
|
2756
|
+
} & {
|
|
2757
|
+
resultFunc: (resultFuncArgs_0: WebMap | undefined) => ClockSize | undefined;
|
|
2758
|
+
memoizedResultFunc: ((resultFuncArgs_0: WebMap | undefined) => ClockSize | undefined) & {
|
|
2759
|
+
clearCache: () => void;
|
|
2760
|
+
resultsCount: () => number;
|
|
2761
|
+
resetResultsCount: () => void;
|
|
2762
|
+
};
|
|
2763
|
+
lastResult: () => ClockSize | undefined;
|
|
2764
|
+
dependencies: [(store: CoreAppStore, mapId: string) => WebMap | undefined];
|
|
2765
|
+
recomputations: () => number;
|
|
2766
|
+
resetRecomputations: () => void;
|
|
2767
|
+
dependencyRecomputations: () => number;
|
|
2768
|
+
resetDependencyRecomputations: () => void;
|
|
2769
|
+
} & {
|
|
2770
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
2771
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
2678
2772
|
}, (store: uiTypes.UIModuleState) => uiTypes.UIStoreType, (_store: CoreAppStore, mapId: string) => string, (_store: CoreAppStore, _mapId: string, keepAllDims?: any) => string];
|
|
2679
2773
|
recomputations: () => number;
|
|
2680
2774
|
resetRecomputations: () => void;
|
|
@@ -55,6 +55,8 @@ export interface WebMap {
|
|
|
55
55
|
isTimeScrollingEnabled?: boolean;
|
|
56
56
|
selectedMapIds?: string[];
|
|
57
57
|
isClockVisible?: boolean;
|
|
58
|
+
clockPosition?: ClockPosition;
|
|
59
|
+
clockSize?: ClockSize;
|
|
58
60
|
}
|
|
59
61
|
export type DockedLayerManagerSize = 'sizeSmall' | 'sizeMedium' | 'sizeLarge' | '';
|
|
60
62
|
export interface WebMapState {
|
|
@@ -113,6 +115,8 @@ export interface MapPreset {
|
|
|
113
115
|
defaultOverlayer?: string;
|
|
114
116
|
refTimeDimensionModes?: RefTimeDimensionModes;
|
|
115
117
|
isClockVisible?: boolean;
|
|
118
|
+
clockPosition?: ClockPosition;
|
|
119
|
+
clockSize?: ClockSize;
|
|
116
120
|
}
|
|
117
121
|
export interface MapPresetInitialProps {
|
|
118
122
|
mapPreset: MapPreset;
|
|
@@ -282,3 +286,17 @@ export interface ToggleClockPayload {
|
|
|
282
286
|
isClockVisible: boolean;
|
|
283
287
|
origin?: MapActionOrigin;
|
|
284
288
|
}
|
|
289
|
+
export interface ClockPosition {
|
|
290
|
+
x: number;
|
|
291
|
+
y: number;
|
|
292
|
+
}
|
|
293
|
+
export interface ClockSize {
|
|
294
|
+
width: number;
|
|
295
|
+
height: number;
|
|
296
|
+
}
|
|
297
|
+
export interface SetClockPositionSizePayload {
|
|
298
|
+
mapId: string;
|
|
299
|
+
position?: ClockPosition;
|
|
300
|
+
size?: ClockSize;
|
|
301
|
+
origin?: MapActionOrigin;
|
|
302
|
+
}
|