@opengeoweb/webmap-react 12.11.0 → 12.13.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 +314 -137
- package/package.json +4 -4
- package/src/lib/components/MapDimensionSelect/MapDimensionSelect.d.ts +1 -0
- package/src/lib/components/OpenLayers/layers/FeatureLayer.d.ts +2 -0
- package/src/lib/components/OpenLayers/layers/OpenLayersFeatureLayer.d.ts +2 -0
- package/src/lib/components/OpenLayers/layers/TimeAwareEDRLocationLayer.d.ts +1 -0
- package/src/lib/components/OpenLayers/utils/ShowTimeAwareLayerInfo.spec.d.ts +1 -0
- package/src/lib/components/OpenLayers/utils/coverageCollectionToFeatureCollection.d.ts +1 -1
- package/src/lib/edr-layer-api/colormaps/edrOlLegendUtils.d.ts +3 -1
package/index.esm.js
CHANGED
|
@@ -3953,10 +3953,40 @@ var MapDimensionSelect = function MapDimensionSelect(_ref2) {
|
|
|
3953
3953
|
dimensionName = _ref2.dimensionName,
|
|
3954
3954
|
handleDimensionValueChanged = _ref2.handleDimensionValueChanged,
|
|
3955
3955
|
handleSyncChanged = _ref2.handleSyncChanged,
|
|
3956
|
-
layerDimension = _ref2.layerDimension
|
|
3956
|
+
layerDimension = _ref2.layerDimension,
|
|
3957
|
+
layerName = _ref2.layerName;
|
|
3957
3958
|
var _useWebmapReactTransl = useWebmapReactTranslation(),
|
|
3958
3959
|
t = _useWebmapReactTransl.t;
|
|
3959
3960
|
var wmLayer = webmapUtils.getWMLayerById(layerId);
|
|
3961
|
+
var _React$useState = React.useState(layerName),
|
|
3962
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
3963
|
+
layerTitle = _React$useState2[0],
|
|
3964
|
+
setLayerTitle = _React$useState2[1];
|
|
3965
|
+
React.useEffect(function () {
|
|
3966
|
+
// if the layername changes, the title needs to be updated
|
|
3967
|
+
var updateTitle = /*#__PURE__*/function () {
|
|
3968
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
3969
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
3970
|
+
while (1) switch (_context.prev = _context.next) {
|
|
3971
|
+
case 0:
|
|
3972
|
+
_context.next = 2;
|
|
3973
|
+
return wmLayer.parseLayer();
|
|
3974
|
+
case 2:
|
|
3975
|
+
setLayerTitle(wmLayer.title || layerName);
|
|
3976
|
+
case 3:
|
|
3977
|
+
case "end":
|
|
3978
|
+
return _context.stop();
|
|
3979
|
+
}
|
|
3980
|
+
}, _callee);
|
|
3981
|
+
}));
|
|
3982
|
+
return function updateTitle() {
|
|
3983
|
+
return _ref3.apply(this, arguments);
|
|
3984
|
+
};
|
|
3985
|
+
}();
|
|
3986
|
+
if (wmLayer) {
|
|
3987
|
+
void updateTitle();
|
|
3988
|
+
}
|
|
3989
|
+
}, [layerName, wmLayer]);
|
|
3960
3990
|
var dimConfig = dimensionConfig(t).find(function (cnf) {
|
|
3961
3991
|
return cnf.name === dimensionName;
|
|
3962
3992
|
});
|
|
@@ -3967,7 +3997,6 @@ var MapDimensionSelect = function MapDimensionSelect(_ref2) {
|
|
|
3967
3997
|
if (!wmsDimension) {
|
|
3968
3998
|
return null;
|
|
3969
3999
|
}
|
|
3970
|
-
var layerTitle = wmLayer.title;
|
|
3971
4000
|
var marks = marksByDimension(t, wmsDimension);
|
|
3972
4001
|
var isLayerDimensionSynced = layerDimension.synced !== undefined && layerDimension.synced === true;
|
|
3973
4002
|
var tooltipTitle = isLayerDimensionSynced ? t('webmap-react-click-disconnect') : t('webmap-react-click-connect');
|
|
@@ -5003,6 +5032,47 @@ var getTimeStepsToCheck = function getTimeStepsToCheck(timespan) {
|
|
|
5003
5032
|
*/
|
|
5004
5033
|
var getTimeStepsToCheckMemoized = memoize(getTimeStepsToCheck);
|
|
5005
5034
|
|
|
5035
|
+
var getDimensionName = function getDimensionName(dimName) {
|
|
5036
|
+
switch (dimName) {
|
|
5037
|
+
case 'time':
|
|
5038
|
+
return 'val';
|
|
5039
|
+
case 'reference_time':
|
|
5040
|
+
return 'ref';
|
|
5041
|
+
default:
|
|
5042
|
+
{
|
|
5043
|
+
var split = dimName.split('_');
|
|
5044
|
+
if (split[0] === 'pressure') {
|
|
5045
|
+
return 'p';
|
|
5046
|
+
}
|
|
5047
|
+
if (split[0] === 'height') {
|
|
5048
|
+
return 'h';
|
|
5049
|
+
}
|
|
5050
|
+
return split[0];
|
|
5051
|
+
}
|
|
5052
|
+
}
|
|
5053
|
+
};
|
|
5054
|
+
var formatDimensionVal = function formatDimensionVal(dimName, dimVal) {
|
|
5055
|
+
switch (dimName) {
|
|
5056
|
+
case 'time':
|
|
5057
|
+
case 'reference_time':
|
|
5058
|
+
{
|
|
5059
|
+
var date = dateUtils.stringToDate(dimVal, "yyyy-MM-dd'T'HH:mm:ss'Z'", true);
|
|
5060
|
+
if (date) {
|
|
5061
|
+
return dateUtils.dateToString(date, "MM-dd HH:mm'Z'", true);
|
|
5062
|
+
}
|
|
5063
|
+
return dimVal;
|
|
5064
|
+
}
|
|
5065
|
+
default:
|
|
5066
|
+
{
|
|
5067
|
+
return dimVal;
|
|
5068
|
+
}
|
|
5069
|
+
}
|
|
5070
|
+
};
|
|
5071
|
+
var getDimensionInfo = function getDimensionInfo(wmLayerDimension) {
|
|
5072
|
+
var layerName = getDimensionName(wmLayerDimension.name);
|
|
5073
|
+
var layerVal = formatDimensionVal(wmLayerDimension.name, wmLayerDimension.currentValue);
|
|
5074
|
+
return "".concat(layerName, " ").concat(layerVal);
|
|
5075
|
+
};
|
|
5006
5076
|
var ShowTimeAwareLayerInfo = function ShowTimeAwareLayerInfo(_ref) {
|
|
5007
5077
|
var _wmLayer$dimensions;
|
|
5008
5078
|
var wmLayer = _ref.wmLayer,
|
|
@@ -5039,9 +5109,9 @@ var ShowTimeAwareLayerInfo = function ShowTimeAwareLayerInfo(_ref) {
|
|
|
5039
5109
|
var isSelectedStep = visible && (wmTimeDim === null || wmTimeDim === void 0 ? void 0 : wmTimeDim.currentValue) === closestValue;
|
|
5040
5110
|
var colorImageIsAvailable = requestedStepHasImage ? '#40AF50' : '#FF0000';
|
|
5041
5111
|
var colorLayerIsOutsideRange = requestedStepIsOutsideRange ? '#5080FA' : colorImageIsAvailable;
|
|
5042
|
-
var height = requestedStepIsOutsideRange ? '15px' : '
|
|
5043
|
-
var top = requestedStepIsOutsideRange ? '5px' : '
|
|
5044
|
-
var left = "".concat(index * itemWidth, "px");
|
|
5112
|
+
var height = requestedStepIsOutsideRange ? '15px' : '20px';
|
|
5113
|
+
var top = requestedStepIsOutsideRange ? '5px' : '2px';
|
|
5114
|
+
var left = "calc(25% + ".concat(index * itemWidth, "px)");
|
|
5045
5115
|
var opacity = isSelectedStep ? 1 : 0.8;
|
|
5046
5116
|
return jsx("span", {
|
|
5047
5117
|
style: {
|
|
@@ -5060,62 +5130,87 @@ var ShowTimeAwareLayerInfo = function ShowTimeAwareLayerInfo(_ref) {
|
|
|
5060
5130
|
});
|
|
5061
5131
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5062
5132
|
}, [layer, timeStepsToCheck, visible, wmTimeDim === null || wmTimeDim === void 0 ? void 0 : wmTimeDim.currentValue, render]);
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
}
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
}), jsxs("div", {
|
|
5133
|
+
var dimsInfo = wmLayer === null || wmLayer === void 0 ? void 0 : wmLayer.dimensions.map(function (wmLayerDimension) {
|
|
5134
|
+
return getDimensionInfo(wmLayerDimension);
|
|
5135
|
+
});
|
|
5136
|
+
var tooltipText = jsxs("span", {
|
|
5137
|
+
children: [wmLayer === null || wmLayer === void 0 ? void 0 : wmLayer.title, ": ", jsx("br", {}), wmLayer === null || wmLayer === void 0 ? void 0 : wmLayer.dimensions.map(function (dim, index) {
|
|
5138
|
+
return jsxs("span", {
|
|
5139
|
+
children: [dim.name, ": ", formatDimensionVal(dim.name, dim.currentValue), index < dimsInfo.length - 1 && jsx("br", {})]
|
|
5140
|
+
}, "".concat(dim.name, "-").concat(dim.currentValue));
|
|
5141
|
+
})]
|
|
5142
|
+
});
|
|
5143
|
+
return jsx(CustomTooltip, {
|
|
5144
|
+
title: tooltipText,
|
|
5145
|
+
children: jsxs("div", {
|
|
5077
5146
|
style: {
|
|
5078
|
-
position: '
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5147
|
+
position: 'relative',
|
|
5148
|
+
width: 'calc(100% - 60px)',
|
|
5149
|
+
left: '50px',
|
|
5150
|
+
right: '10px',
|
|
5151
|
+
marginTop: '12px',
|
|
5152
|
+
marginBottom: '-10px'
|
|
5084
5153
|
},
|
|
5085
|
-
|
|
5154
|
+
"data-testid": "debug-info",
|
|
5155
|
+
children: [jsx("div", {
|
|
5086
5156
|
style: {
|
|
5087
|
-
width: '
|
|
5088
|
-
position: 'absolute',
|
|
5089
|
-
display: 'inline-block',
|
|
5090
|
-
height: '15px'
|
|
5157
|
+
width: '100%'
|
|
5091
5158
|
},
|
|
5092
|
-
children:
|
|
5093
|
-
|
|
5159
|
+
children: jsx("div", {
|
|
5160
|
+
children: items
|
|
5161
|
+
})
|
|
5162
|
+
}), jsxs("div", {
|
|
5094
5163
|
style: {
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
opacity:
|
|
5164
|
+
left: '10px',
|
|
5165
|
+
paddingTop: '3px',
|
|
5166
|
+
fontSize: '12px',
|
|
5167
|
+
fontFamily: 'Roboto',
|
|
5168
|
+
opacity: 0.85,
|
|
5169
|
+
width: '100%'
|
|
5100
5170
|
},
|
|
5101
|
-
children:
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5171
|
+
children: [jsx("span", {
|
|
5172
|
+
style: {
|
|
5173
|
+
display: 'inline-block',
|
|
5174
|
+
verticalAlign: 'top',
|
|
5175
|
+
width: '25%',
|
|
5176
|
+
overflow: 'hidden',
|
|
5177
|
+
textOverflow: 'ellipsis',
|
|
5178
|
+
whiteSpace: 'nowrap',
|
|
5179
|
+
fontSize: '12px',
|
|
5180
|
+
paddingRight: '4px',
|
|
5181
|
+
paddingLeft: '4px',
|
|
5182
|
+
color: '#051039',
|
|
5183
|
+
backgroundColor: 'rgba(236, 237, 238, 0.7)',
|
|
5184
|
+
borderRadius: 2
|
|
5185
|
+
},
|
|
5186
|
+
children: wmLayer === null || wmLayer === void 0 ? void 0 : wmLayer.title
|
|
5187
|
+
}), jsx("span", {
|
|
5188
|
+
style: {
|
|
5189
|
+
display: 'inline-block',
|
|
5190
|
+
width: '75%',
|
|
5191
|
+
opacity: '0.7'
|
|
5192
|
+
},
|
|
5193
|
+
children: dimsInfo.map(function (dimension) {
|
|
5194
|
+
return jsx("span", {
|
|
5195
|
+
style: {
|
|
5196
|
+
margin: '0 0 0 0px',
|
|
5197
|
+
padding: '1px 5px',
|
|
5198
|
+
background: 'blue',
|
|
5199
|
+
borderRadius: 2,
|
|
5200
|
+
color: 'white',
|
|
5201
|
+
fontSize: '11px'
|
|
5202
|
+
},
|
|
5203
|
+
children: dimension
|
|
5204
|
+
}, dimension);
|
|
5205
|
+
})
|
|
5206
|
+
})]
|
|
5113
5207
|
})]
|
|
5114
|
-
})
|
|
5115
|
-
});
|
|
5208
|
+
})
|
|
5209
|
+
}, wmLayer.id);
|
|
5116
5210
|
};
|
|
5117
5211
|
|
|
5118
5212
|
var TimeawareImageSourceWMSLayer = function TimeawareImageSourceWMSLayer(_ref) {
|
|
5213
|
+
var _wmLayer$dimensions$f, _wmLayer$dimensions4;
|
|
5119
5214
|
var layerId = _ref.layerId,
|
|
5120
5215
|
getCapsURL = _ref.getCapsURL,
|
|
5121
5216
|
layerOptions = _ref.layerOptions,
|
|
@@ -5184,47 +5279,53 @@ var TimeawareImageSourceWMSLayer = function TimeawareImageSourceWMSLayer(_ref) {
|
|
|
5184
5279
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
5185
5280
|
while (1) switch (_context.prev = _context.next) {
|
|
5186
5281
|
case 0:
|
|
5187
|
-
if (wmLayer && visible !== false) {
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5282
|
+
if (!(wmLayer && visible !== false)) {
|
|
5283
|
+
_context.next = 11;
|
|
5284
|
+
break;
|
|
5285
|
+
}
|
|
5286
|
+
wmTimeDim = wmLayer === null || wmLayer === void 0 || (_wmLayer$dimensions = wmLayer.dimensions) === null || _wmLayer$dimensions === void 0 ? void 0 : _wmLayer$dimensions.find(function (dimension) {
|
|
5287
|
+
return dimension.name === 'time';
|
|
5288
|
+
}); // Set time dimension current value based on layerprops dimension value
|
|
5289
|
+
layerPropsTimeDim = dimensions === null || dimensions === void 0 ? void 0 : dimensions.find(function (dimension) {
|
|
5290
|
+
return dimension.name === 'time';
|
|
5291
|
+
});
|
|
5292
|
+
timeValueToInitialize = (layerPropsTimeDim === null || layerPropsTimeDim === void 0 ? void 0 : layerPropsTimeDim.currentValue) || (wmTimeDim === null || wmTimeDim === void 0 ? void 0 : wmTimeDim.getValue());
|
|
5293
|
+
wmTimeDim && timeValueToInitialize && wmTimeDim.setValue(timeValueToInitialize);
|
|
5294
|
+
refTimeDim = wmLayer === null || wmLayer === void 0 || (_wmLayer$dimensions2 = wmLayer.dimensions) === null || _wmLayer$dimensions2 === void 0 ? void 0 : _wmLayer$dimensions2.find(function (dimension) {
|
|
5295
|
+
return dimension.name === 'reference_time';
|
|
5296
|
+
}); // Update reference time dimension value, this will change the time values to prefetch. Depends on model run.
|
|
5297
|
+
if (refTimeDim && wmTimeDim) {
|
|
5298
|
+
layerPropsRefTimeDim = dimensions === null || dimensions === void 0 ? void 0 : dimensions.find(function (dimension) {
|
|
5197
5299
|
return dimension.name === 'reference_time';
|
|
5198
|
-
}); //
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
refTimeDim && (layerPropsRefTimeDim === null || layerPropsRefTimeDim === void 0 ? void 0 : layerPropsRefTimeDim.currentValue) && refTimeDim.setValue(layerPropsRefTimeDim === null || layerPropsRefTimeDim === void 0 ? void 0 : layerPropsRefTimeDim.currentValue);
|
|
5204
|
-
refTimeToFind = wmTimeDim.getValue();
|
|
5205
|
-
firstRefTime = refTimeDim === null || refTimeDim === void 0 ? void 0 : refTimeDim.getClosestValue(refTimeToFind, true);
|
|
5206
|
-
firstRefTime && refTimeDim && wmTimeDim && wmTimeDim.setTimeValuesForReferenceTime(firstRefTime, refTimeDim);
|
|
5207
|
-
}
|
|
5208
|
-
// Make sure style is set in wmLayer as well
|
|
5209
|
-
styleName && wmLayer.setStyle(styleName);
|
|
5210
|
-
onInitializeLayer && onInitializeLayer({
|
|
5211
|
-
layerId: wmLayer.id,
|
|
5212
|
-
style: wmLayer.currentStyle,
|
|
5213
|
-
dimensions: wmLayer.dimensions.map(function (dimension) {
|
|
5214
|
-
return {
|
|
5215
|
-
name: dimension.name,
|
|
5216
|
-
units: dimension.units,
|
|
5217
|
-
currentValue: dimension.currentValue,
|
|
5218
|
-
maxValue: dimension.getLastValue(),
|
|
5219
|
-
minValue: dimension.getFirstValue(),
|
|
5220
|
-
synced: dimension.synced,
|
|
5221
|
-
values: dimension.values,
|
|
5222
|
-
unitSymbol: dimension.unitSymbol
|
|
5223
|
-
};
|
|
5224
|
-
})
|
|
5225
|
-
});
|
|
5300
|
+
}); // Set reftime dimension current value based on layerprops dimension value
|
|
5301
|
+
refTimeDim && (layerPropsRefTimeDim === null || layerPropsRefTimeDim === void 0 ? void 0 : layerPropsRefTimeDim.currentValue) && refTimeDim.setValue(layerPropsRefTimeDim === null || layerPropsRefTimeDim === void 0 ? void 0 : layerPropsRefTimeDim.currentValue);
|
|
5302
|
+
refTimeToFind = wmTimeDim.getValue();
|
|
5303
|
+
firstRefTime = refTimeDim === null || refTimeDim === void 0 ? void 0 : refTimeDim.getClosestValue(refTimeToFind, true);
|
|
5304
|
+
firstRefTime && refTimeDim && wmTimeDim && wmTimeDim.setTimeValuesForReferenceTime(firstRefTime, refTimeDim);
|
|
5226
5305
|
}
|
|
5227
|
-
|
|
5306
|
+
// Make sure style is set in wmLayer as well
|
|
5307
|
+
styleName && wmLayer.setStyle(styleName);
|
|
5308
|
+
// Make sure we have the latest dimension values before initializing
|
|
5309
|
+
_context.next = 10;
|
|
5310
|
+
return wmLayer.parseLayer();
|
|
5311
|
+
case 10:
|
|
5312
|
+
onInitializeLayer && onInitializeLayer({
|
|
5313
|
+
layerId: wmLayer.id,
|
|
5314
|
+
style: wmLayer.currentStyle,
|
|
5315
|
+
dimensions: wmLayer.dimensions.map(function (dimension) {
|
|
5316
|
+
return {
|
|
5317
|
+
name: dimension.name,
|
|
5318
|
+
units: dimension.units,
|
|
5319
|
+
currentValue: dimension.currentValue,
|
|
5320
|
+
maxValue: dimension.getLastValue(),
|
|
5321
|
+
minValue: dimension.getFirstValue(),
|
|
5322
|
+
synced: dimension.synced,
|
|
5323
|
+
values: dimension.values,
|
|
5324
|
+
unitSymbol: dimension.unitSymbol
|
|
5325
|
+
};
|
|
5326
|
+
})
|
|
5327
|
+
});
|
|
5328
|
+
case 11:
|
|
5228
5329
|
case "end":
|
|
5229
5330
|
return _context.stop();
|
|
5230
5331
|
}
|
|
@@ -5311,7 +5412,11 @@ var TimeawareImageSourceWMSLayer = function TimeawareImageSourceWMSLayer(_ref) {
|
|
|
5311
5412
|
// - dimensionsValues,
|
|
5312
5413
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5313
5414
|
}, [layer, wmLayer, timespan === null || timespan === void 0 ? void 0 : timespan.start, timespan === null || timespan === void 0 ? void 0 : timespan.end, timespan === null || timespan === void 0 ? void 0 : timespan.step, layerName, styleName, dimensionsValuesEffectCheck]);
|
|
5314
|
-
|
|
5415
|
+
// Only show debug info for data layers with time dimension
|
|
5416
|
+
var hasTimeDim = (_wmLayer$dimensions$f = wmLayer === null || wmLayer === void 0 || (_wmLayer$dimensions4 = wmLayer.dimensions) === null || _wmLayer$dimensions4 === void 0 ? void 0 : _wmLayer$dimensions4.findIndex(function (dimension) {
|
|
5417
|
+
return dimension.name === 'time';
|
|
5418
|
+
})) !== null && _wmLayer$dimensions$f !== void 0 ? _wmLayer$dimensions$f : -1;
|
|
5419
|
+
return debugMode && hasTimeDim !== -1 ? jsx(ShowTimeAwareLayerInfo, {
|
|
5315
5420
|
wmLayer: wmLayer,
|
|
5316
5421
|
stepsToCheck: getTimeStepsToCheckMemoized(timespan),
|
|
5317
5422
|
layer: layer,
|
|
@@ -5485,7 +5590,9 @@ var XYZLayer = function XYZLayer(_ref) {
|
|
|
5485
5590
|
var layer = new TileLayer({
|
|
5486
5591
|
source: new XYZ({
|
|
5487
5592
|
url: urlTemplate,
|
|
5488
|
-
projection: tileProjectionCode
|
|
5593
|
+
projection: tileProjectionCode,
|
|
5594
|
+
minZoom: layerOptions === null || layerOptions === void 0 ? void 0 : layerOptions.minZoom,
|
|
5595
|
+
maxZoom: layerOptions === null || layerOptions === void 0 ? void 0 : layerOptions.maxZoom
|
|
5489
5596
|
})
|
|
5490
5597
|
});
|
|
5491
5598
|
map.addLayer(layer);
|
|
@@ -5494,7 +5601,7 @@ var XYZLayer = function XYZLayer(_ref) {
|
|
|
5494
5601
|
map.removeLayer(layer);
|
|
5495
5602
|
setLayer(undefined);
|
|
5496
5603
|
};
|
|
5497
|
-
}, [map, tileProjectionCode, urlTemplate]);
|
|
5604
|
+
}, [map, tileProjectionCode, urlTemplate, layerOptions === null || layerOptions === void 0 ? void 0 : layerOptions.minZoom, layerOptions === null || layerOptions === void 0 ? void 0 : layerOptions.maxZoom]);
|
|
5498
5605
|
useEffect(function () {
|
|
5499
5606
|
if (!layerOptions || !layer) {
|
|
5500
5607
|
return;
|
|
@@ -6550,23 +6657,6 @@ var colorMaps = {
|
|
|
6550
6657
|
temperatureLegendColorsCWK: temperatureLegendColorsCWK
|
|
6551
6658
|
};
|
|
6552
6659
|
|
|
6553
|
-
/* *
|
|
6554
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6555
|
-
* you may not use this file except in compliance with the License.
|
|
6556
|
-
* You may obtain a copy of the License at
|
|
6557
|
-
*
|
|
6558
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
6559
|
-
*
|
|
6560
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
6561
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
6562
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
6563
|
-
* See the License for the specific language governing permissions and
|
|
6564
|
-
* limitations under the License.
|
|
6565
|
-
*
|
|
6566
|
-
* Copyright 2025 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
6567
|
-
* Copyright 2025 - Finnish Meteorological Institute (FMI)
|
|
6568
|
-
* Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
|
|
6569
|
-
* */
|
|
6570
6660
|
var makeLegendFromColorMap = function makeLegendFromColorMap(props) {
|
|
6571
6661
|
var numClasses = props.colors.length;
|
|
6572
6662
|
var minVal = props.min;
|
|
@@ -6614,10 +6704,61 @@ var getLegendClass = function getLegendClass(edrColorLegend, value) {
|
|
|
6614
6704
|
return value >= entry.min && value < entry.max;
|
|
6615
6705
|
});
|
|
6616
6706
|
};
|
|
6617
|
-
var
|
|
6707
|
+
var getOffsetValues = function getOffsetValues(factor) {
|
|
6708
|
+
return [[0, -20], [0, 0], [0, 20], [-30 * factor, -20], [-30 * factor, 0], [-30 * factor, 20], [30 * factor, -20], [30 * factor, 0], [30 * factor, 20], [60 * factor, -20], [60 * factor, 0], [60 * factor, 20], [-60 * factor, -20], [-60 * factor, 0], [-60 * factor, 20]];
|
|
6709
|
+
};
|
|
6710
|
+
var makeFeatureStyleMultiParam = function makeFeatureStyleMultiParam(feature) {
|
|
6618
6711
|
var _feature$getPropertie = feature.getProperties(),
|
|
6619
|
-
|
|
6620
|
-
var
|
|
6712
|
+
values = _feature$getPropertie.values;
|
|
6713
|
+
var paramValues = Object.values(values);
|
|
6714
|
+
// Determine offset between columns (long strings need more space)
|
|
6715
|
+
var maxLength = Math.max.apply(Math, _toConsumableArray(paramValues.map(function (el) {
|
|
6716
|
+
return el !== undefined ? el.toString().length : 1;
|
|
6717
|
+
})));
|
|
6718
|
+
var factor = maxLength > 5 ? 1.4 : 1;
|
|
6719
|
+
var offsetValues = getOffsetValues(factor);
|
|
6720
|
+
// Don't allow showing more than 15 params
|
|
6721
|
+
var params = paramValues.slice(0, 15);
|
|
6722
|
+
return params.map(function (paramVal, index) {
|
|
6723
|
+
return new Style({
|
|
6724
|
+
text: new Text({
|
|
6725
|
+
text: paramVal ? paramVal.toString() : '-',
|
|
6726
|
+
offsetX: offsetValues[index][0],
|
|
6727
|
+
offsetY: offsetValues[index][1],
|
|
6728
|
+
scale: 1.0,
|
|
6729
|
+
stroke: new Stroke({
|
|
6730
|
+
color: '#ffffffff',
|
|
6731
|
+
width: 1
|
|
6732
|
+
}),
|
|
6733
|
+
fill: new Fill({
|
|
6734
|
+
color: '#000000'
|
|
6735
|
+
}),
|
|
6736
|
+
font: 'bold 11px Arial',
|
|
6737
|
+
padding: [-5, -5, -5, -5]
|
|
6738
|
+
})
|
|
6739
|
+
});
|
|
6740
|
+
});
|
|
6741
|
+
};
|
|
6742
|
+
var makeFeatureStyleMultiParamLoading = function makeFeatureStyleMultiParamLoading() {
|
|
6743
|
+
return new Style({
|
|
6744
|
+
text: new Text({
|
|
6745
|
+
scale: 1.2,
|
|
6746
|
+
stroke: new Stroke({
|
|
6747
|
+
color: '#ffffffff',
|
|
6748
|
+
width: 3
|
|
6749
|
+
}),
|
|
6750
|
+
fill: new Fill({
|
|
6751
|
+
color: '#000000'
|
|
6752
|
+
}),
|
|
6753
|
+
text: '...'
|
|
6754
|
+
})
|
|
6755
|
+
});
|
|
6756
|
+
};
|
|
6757
|
+
var makeFeatureStyleDisc = function makeFeatureStyleDisc(feature, legend) {
|
|
6758
|
+
var _feature$getPropertie2 = feature.getProperties(),
|
|
6759
|
+
values = _feature$getPropertie2.values;
|
|
6760
|
+
var textValue = Object.values(values)[0];
|
|
6761
|
+
var legendEntry = getLegendClass(legend, textValue);
|
|
6621
6762
|
return new Style({
|
|
6622
6763
|
image: legendEntry === null || legendEntry === void 0 ? void 0 : legendEntry.image,
|
|
6623
6764
|
text: new Text({
|
|
@@ -6626,13 +6767,14 @@ var makeFeatureStyleDisc = function makeFeatureStyleDisc(feature, legend) {
|
|
|
6626
6767
|
fill: new Fill({
|
|
6627
6768
|
color: '#000000'
|
|
6628
6769
|
}),
|
|
6629
|
-
text:
|
|
6770
|
+
text: "".concat(textValue)
|
|
6630
6771
|
})
|
|
6631
6772
|
});
|
|
6632
6773
|
};
|
|
6633
6774
|
var makeFeatureStyleLoading = function makeFeatureStyleLoading(feature) {
|
|
6634
|
-
var _feature$
|
|
6635
|
-
|
|
6775
|
+
var _feature$getPropertie3 = feature.getProperties(),
|
|
6776
|
+
values = _feature$getPropertie3.values;
|
|
6777
|
+
var textValue = Object.values(values)[0];
|
|
6636
6778
|
return new Style({
|
|
6637
6779
|
image: new Circle({
|
|
6638
6780
|
radius: 14,
|
|
@@ -6650,7 +6792,7 @@ var makeFeatureStyleLoading = function makeFeatureStyleLoading(feature) {
|
|
|
6650
6792
|
fill: new Fill({
|
|
6651
6793
|
color: '#303030'
|
|
6652
6794
|
}),
|
|
6653
|
-
text:
|
|
6795
|
+
text: textValue
|
|
6654
6796
|
})
|
|
6655
6797
|
});
|
|
6656
6798
|
};
|
|
@@ -6667,7 +6809,12 @@ var defaultStyle$1 = function defaultStyle(feature) {
|
|
|
6667
6809
|
* @param styleName Strings like temperatureLegendColorsWoW:0,20 will get the legend temperatureLegendColorsWoW with a range from 0,20. This makes it flexible to adjust the colorrange via the stylename.
|
|
6668
6810
|
* @returns StyleLike
|
|
6669
6811
|
*/
|
|
6670
|
-
var styleNameToStyleLikeNotMemoed = function styleNameToStyleLikeNotMemoed(styleName) {
|
|
6812
|
+
var styleNameToStyleLikeNotMemoed = function styleNameToStyleLikeNotMemoed(styleName, multiParam) {
|
|
6813
|
+
if (multiParam) {
|
|
6814
|
+
return function (feature) {
|
|
6815
|
+
return makeFeatureStyleMultiParam(feature);
|
|
6816
|
+
};
|
|
6817
|
+
}
|
|
6671
6818
|
var minMaxPartFromNumericIndex = styleName.indexOf(':');
|
|
6672
6819
|
var legMinMax = minMaxPartFromNumericIndex > 0 ? styleName.substring(minMaxPartFromNumericIndex + 1).split(',').map(function (stringValue) {
|
|
6673
6820
|
return parseFloat(stringValue);
|
|
@@ -14823,7 +14970,11 @@ var FeatureLayer = function FeatureLayer(_ref) {
|
|
|
14823
14970
|
hoverSelect = _ref.hoverSelect,
|
|
14824
14971
|
clickOnFeature = _ref.clickOnFeature,
|
|
14825
14972
|
testId = _ref.testId,
|
|
14826
|
-
opacity = _ref.opacity
|
|
14973
|
+
opacity = _ref.opacity,
|
|
14974
|
+
_ref$declutter = _ref.declutter,
|
|
14975
|
+
declutter = _ref$declutter === void 0 ? false : _ref$declutter,
|
|
14976
|
+
_ref$visible = _ref.visible,
|
|
14977
|
+
visible = _ref$visible === void 0 ? true : _ref$visible;
|
|
14827
14978
|
var _useContext = useContext(MapContext),
|
|
14828
14979
|
map = _useContext.map;
|
|
14829
14980
|
var _useState = useState(),
|
|
@@ -14832,7 +14983,7 @@ var FeatureLayer = function FeatureLayer(_ref) {
|
|
|
14832
14983
|
setSource = _useState2[1];
|
|
14833
14984
|
var layerRef = useRef();
|
|
14834
14985
|
useEffect(function () {
|
|
14835
|
-
if (!map) {
|
|
14986
|
+
if (!map || visible === false) {
|
|
14836
14987
|
return function () {};
|
|
14837
14988
|
}
|
|
14838
14989
|
var source = new VectorSource({
|
|
@@ -14845,7 +14996,9 @@ var FeatureLayer = function FeatureLayer(_ref) {
|
|
|
14845
14996
|
properties: {
|
|
14846
14997
|
testId: testId
|
|
14847
14998
|
},
|
|
14848
|
-
opacity: opacity
|
|
14999
|
+
opacity: opacity,
|
|
15000
|
+
declutter: declutter,
|
|
15001
|
+
visible: visible
|
|
14849
15002
|
});
|
|
14850
15003
|
layerRef.current = layer;
|
|
14851
15004
|
layer.set('layerType', 'FeatureLayer');
|
|
@@ -14858,7 +15011,7 @@ var FeatureLayer = function FeatureLayer(_ref) {
|
|
|
14858
15011
|
};
|
|
14859
15012
|
// NOTE: style should not be part of this effect, as it changes always, causing the layer to be add/removed continuousely.
|
|
14860
15013
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
14861
|
-
}, [map, zIndex, testId]);
|
|
15014
|
+
}, [map, zIndex, testId, visible]);
|
|
14862
15015
|
useEffect(function () {
|
|
14863
15016
|
// Handle style function:
|
|
14864
15017
|
if (layerRef.current && style) {
|
|
@@ -14873,6 +15026,11 @@ var FeatureLayer = function FeatureLayer(_ref) {
|
|
|
14873
15026
|
(_layerRef$current2 = layerRef.current) === null || _layerRef$current2 === void 0 || _layerRef$current2.setOpacity(opacity);
|
|
14874
15027
|
}
|
|
14875
15028
|
}, [opacity]);
|
|
15029
|
+
// Layer visible useEffect
|
|
15030
|
+
useEffect(function () {
|
|
15031
|
+
var _layerRef$current3;
|
|
15032
|
+
(_layerRef$current3 = layerRef.current) === null || _layerRef$current3 === void 0 || _layerRef$current3.setVisible(!(visible === false));
|
|
15033
|
+
}, [visible]);
|
|
14876
15034
|
useEffect(function () {
|
|
14877
15035
|
if (!source) {
|
|
14878
15036
|
return;
|
|
@@ -14883,7 +15041,7 @@ var FeatureLayer = function FeatureLayer(_ref) {
|
|
|
14883
15041
|
}
|
|
14884
15042
|
}, [source, features]);
|
|
14885
15043
|
useEffect(function () {
|
|
14886
|
-
if (!map || !source || !hoverSelect || !hoverSelect.active) {
|
|
15044
|
+
if (!map || !source || !hoverSelect || !hoverSelect.active || visible === false) {
|
|
14887
15045
|
return function () {};
|
|
14888
15046
|
}
|
|
14889
15047
|
var previousHover = [];
|
|
@@ -14919,9 +15077,9 @@ var FeatureLayer = function FeatureLayer(_ref) {
|
|
|
14919
15077
|
unByKey(eventKey);
|
|
14920
15078
|
hoverSelect.onHover && hoverSelect.onHover(undefined);
|
|
14921
15079
|
};
|
|
14922
|
-
}, [map, source, hoverSelect]);
|
|
15080
|
+
}, [map, source, hoverSelect, visible]);
|
|
14923
15081
|
useEffect(function () {
|
|
14924
|
-
if (!map || !source || !clickOnFeature) {
|
|
15082
|
+
if (!map || !source || !clickOnFeature || visible === false) {
|
|
14925
15083
|
return function () {};
|
|
14926
15084
|
}
|
|
14927
15085
|
var clickFunction = function clickFunction(evt) {
|
|
@@ -14937,7 +15095,7 @@ var FeatureLayer = function FeatureLayer(_ref) {
|
|
|
14937
15095
|
return function () {
|
|
14938
15096
|
unByKey(eventKey);
|
|
14939
15097
|
};
|
|
14940
|
-
}, [map, source, clickOnFeature]);
|
|
15098
|
+
}, [map, source, clickOnFeature, visible]);
|
|
14941
15099
|
return null;
|
|
14942
15100
|
};
|
|
14943
15101
|
|
|
@@ -14958,7 +15116,11 @@ var OpenLayersFeatureLayer = function OpenLayersFeatureLayer(_ref) {
|
|
|
14958
15116
|
hoverSelect = _ref.hoverSelect,
|
|
14959
15117
|
clickOnFeature = _ref.clickOnFeature,
|
|
14960
15118
|
testId = _ref.testId,
|
|
14961
|
-
opacity = _ref.opacity
|
|
15119
|
+
opacity = _ref.opacity,
|
|
15120
|
+
_ref$declutter = _ref.declutter,
|
|
15121
|
+
declutter = _ref$declutter === void 0 ? false : _ref$declutter,
|
|
15122
|
+
_ref$visible = _ref.visible,
|
|
15123
|
+
visible = _ref$visible === void 0 ? true : _ref$visible;
|
|
14962
15124
|
var projection = useProjection();
|
|
14963
15125
|
var featureCollectionRef = useRef();
|
|
14964
15126
|
var features = useRef([]);
|
|
@@ -14984,7 +15146,9 @@ var OpenLayersFeatureLayer = function OpenLayersFeatureLayer(_ref) {
|
|
|
14984
15146
|
hoverSelect: hoverSelect,
|
|
14985
15147
|
clickOnFeature: clickOnFeature,
|
|
14986
15148
|
testId: testId,
|
|
14987
|
-
opacity: opacity
|
|
15149
|
+
opacity: opacity,
|
|
15150
|
+
declutter: declutter,
|
|
15151
|
+
visible: visible
|
|
14988
15152
|
});
|
|
14989
15153
|
};
|
|
14990
15154
|
|
|
@@ -15005,14 +15169,17 @@ var OpenLayersFeatureLayer = function OpenLayersFeatureLayer(_ref) {
|
|
|
15005
15169
|
* Copyright 2025 - Finnish Meteorological Institute (FMI)
|
|
15006
15170
|
* Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
|
|
15007
15171
|
* */
|
|
15008
|
-
var coverageCollectionToFeatureCollection = function coverageCollectionToFeatureCollection(cov,
|
|
15172
|
+
var coverageCollectionToFeatureCollection = function coverageCollectionToFeatureCollection(cov, parameterNames) {
|
|
15009
15173
|
var _cov$coverages;
|
|
15010
15174
|
var latLonValues = (cov === null || cov === void 0 || (_cov$coverages = cov.coverages) === null || _cov$coverages === void 0 ? void 0 : _cov$coverages.map(function (coverage) {
|
|
15011
|
-
var
|
|
15175
|
+
var paramValues = parameterNames.split(',').reduce(function (obj, parameterName) {
|
|
15176
|
+
var _coverage$ranges$para;
|
|
15177
|
+
return _objectSpread2(_objectSpread2({}, obj), {}, _defineProperty({}, parameterName, (_coverage$ranges$para = coverage.ranges[parameterName]) === null || _coverage$ranges$para === void 0 ? void 0 : _coverage$ranges$para.values[0]));
|
|
15178
|
+
}, {});
|
|
15012
15179
|
return {
|
|
15013
15180
|
type: 'Feature',
|
|
15014
15181
|
properties: {
|
|
15015
|
-
|
|
15182
|
+
values: _objectSpread2({}, paramValues)
|
|
15016
15183
|
},
|
|
15017
15184
|
geometry: {
|
|
15018
15185
|
coordinates: [coverage.domain.axes.x.values[0], coverage.domain.axes.y.values[0]],
|
|
@@ -15036,6 +15203,8 @@ var TimeAwareEDRLocationLayer = function TimeAwareEDRLocationLayer(_ref) {
|
|
|
15036
15203
|
opacity = _ref.opacity,
|
|
15037
15204
|
dimensions = _ref.dimensions,
|
|
15038
15205
|
layerId = _ref.layerId,
|
|
15206
|
+
_ref$visible = _ref.visible,
|
|
15207
|
+
visible = _ref$visible === void 0 ? true : _ref$visible,
|
|
15039
15208
|
onInitializeLayer = _ref.onInitializeLayer;
|
|
15040
15209
|
// get a wmLayer instance
|
|
15041
15210
|
var wmLayer = useGetEDRLayerInstance(edrBaseUrl, parameter, layerId, onInitializeLayer);
|
|
@@ -15058,11 +15227,14 @@ var TimeAwareEDRLocationLayer = function TimeAwareEDRLocationLayer(_ref) {
|
|
|
15058
15227
|
}
|
|
15059
15228
|
setFeaturePoints(featurePoint);
|
|
15060
15229
|
}, [parameter, result.data]);
|
|
15230
|
+
var loadingStyle = parameter !== null && parameter !== void 0 && parameter.includes(',') ? makeFeatureStyleMultiParamLoading : makeFeatureStyleLoading;
|
|
15061
15231
|
return jsx(OpenLayersFeatureLayer, {
|
|
15062
15232
|
featureCollection: featurePoints,
|
|
15063
|
-
style: result.isFetching ?
|
|
15233
|
+
style: result.isFetching ? loadingStyle : style,
|
|
15064
15234
|
opacity: opacity,
|
|
15065
|
-
zIndex: zIndex
|
|
15235
|
+
zIndex: zIndex,
|
|
15236
|
+
declutter: true,
|
|
15237
|
+
visible: visible
|
|
15066
15238
|
});
|
|
15067
15239
|
};
|
|
15068
15240
|
|
|
@@ -15112,7 +15284,8 @@ var OpenLayersLayer = function OpenLayersLayer(layerProps) {
|
|
|
15112
15284
|
});
|
|
15113
15285
|
case LayerType.edrLayer:
|
|
15114
15286
|
{
|
|
15115
|
-
var
|
|
15287
|
+
var multiParam = name === null || name === void 0 ? void 0 : name.includes(',');
|
|
15288
|
+
var styleLike = style !== undefined ? styleNameToStyleLike(style, multiParam) : undefined;
|
|
15116
15289
|
return jsx(TimeAwareEDRLocationLayer, {
|
|
15117
15290
|
layerId: id,
|
|
15118
15291
|
edrBaseUrl: service,
|
|
@@ -15121,7 +15294,8 @@ var OpenLayersLayer = function OpenLayersLayer(layerProps) {
|
|
|
15121
15294
|
zIndex: layerOptions.zIndex,
|
|
15122
15295
|
style: styleLike,
|
|
15123
15296
|
opacity: layerOptions.opacity,
|
|
15124
|
-
onInitializeLayer: onInitializeLayer
|
|
15297
|
+
onInitializeLayer: onInitializeLayer,
|
|
15298
|
+
visible: !!(enabled !== false)
|
|
15125
15299
|
});
|
|
15126
15300
|
}
|
|
15127
15301
|
}
|
|
@@ -15164,7 +15338,10 @@ var OpenLayersLayer = function OpenLayersLayer(layerProps) {
|
|
|
15164
15338
|
}
|
|
15165
15339
|
return jsx(XYZLayer, {
|
|
15166
15340
|
urlTemplate: urlTemplate,
|
|
15167
|
-
layerOptions: layerOptions,
|
|
15341
|
+
layerOptions: _objectSpread2(_objectSpread2({}, layerOptions), {}, {
|
|
15342
|
+
minZoom: tileSettingForCRS === null || tileSettingForCRS === void 0 ? void 0 : tileSettingForCRS.minLevel,
|
|
15343
|
+
maxZoom: tileSettingForCRS === null || tileSettingForCRS === void 0 ? void 0 : tileSettingForCRS.maxLevel
|
|
15344
|
+
}),
|
|
15168
15345
|
layerProps: _objectSpread2(_objectSpread2({}, layerProps), {}, {
|
|
15169
15346
|
enabled: true
|
|
15170
15347
|
}),
|
|
@@ -16162,4 +16339,4 @@ var getLayerUpdateInfo = function getLayerUpdateInfo(wmLayer, mapId) {
|
|
|
16162
16339
|
return updateObject;
|
|
16163
16340
|
};
|
|
16164
16341
|
|
|
16165
|
-
export { BaseLayerType, ClickOnMapTool, DRAWMODE, DefaultBaseLayers, DimensionSelectButton, DimensionSelectDialog, DimensionSelectSlider, EditModeButton as EditModeButtonField, FEATURE_FILL, FEATURE_STROKE, FEATURE_STROKE_EDIT, FEATURE_VERTICES_EDIT_HANDLES, FEATURE_VERTICE_HANDLE_IMAGE, FEATURE_VERTICE_IMAGE, FeatureLayer, FeatureLayers, GeoJSONTextField, ICON_LOCATIONMARKER, ICON_LOCATIONMARKER_MODIFY, IntersectionSelect, LayerInfoButton, LayerInfoDialog, LayerInfoLegend, LayerInfoList, LayerInfoText, Legend, LegendButton, LegendDialog, LegendLayout, MapContext, MapControlButton, MapControls, MapDimensionSelect, MapFeatureClass, MapTime, MapWarningProperties, NEW_FEATURE_CREATED, NEW_LINESTRING_CREATED, NEW_POINT_CREATED, OpenLayersFeatureLayer, OpenLayersGetFeatureInfo, OpenLayersLayer, OpenLayersMapDraw, OpenLayersMapView, OpenLayersZoomControl, Proj4js, SelectField, StoryLayoutGrid, TimeAwareEDRLocationLayer, TimeContext, TimeawareImageSource, TimeawareImageSourceWMSLayer, WEBMAP_REACT_NAMESPACE, WMSLayer, WMTSLayer, XYZLayer, ZoomControls, addFeatureProperties, addGeoJSONProperties, addSelectionTypeToGeoJSON, basicExampleDrawOptions, basicExampleMultipleShapeDrawOptions, basicExampleMultipleShapeWithValuesDrawOptions, clearImageCacheForAllMaps, colorMaps, createIconStyle, createInterSections, currentlySupportedDrawModes, defaultBox, defaultDelete, defaultGeoJSONStyleProperties, defaultIntersectionStyleProperties, defaultLayers, defaultModes, defaultPoint, defaultPolygon, defaultTimeFormat, dimensionConfig, drawPolyStoryStyles, drawStyles, emptyGeoJSON, endToolExampleConfig, exampleIntersectionOptions, exampleIntersectionWithShapeOptions, exampleIntersections, exampleIntersectionsMultiDrawTool, fakeEdrLayerApiHandlers, featureBox, featureMultiPoint, featurePoint, featurePolygon, fillOptions, firSelectionType, formatTime, genericOpenLayersFeatureStyle, geowebColorToOpenLayersColor, getDimensionIcon, getDimensionLabel, getDimensionValue, getDimensionsList, getDoubleControlToolIcon, getFeatureCollection, getFeatureExtent, getFirTitle, getGeoJSONPropertyValue, getGeoJson, getIcon, getIntersectionToolIcon, getIsInsideAcceptanceTime, getLastEmptyFeatureIndex, getLayerBbox, getLayerStyles, getLayerUpdateInfo, getLegendClass, getProj4, getTimeDimension, getToolIcon, initializeOpenLayersProjections, inlineFeatureStyle, intersectPointGeoJSONS, intersectPolygonGeoJSONS, intersectionFeatureBE, intersectionFeatureNL, isGeoJSONFeatureCreatedByTool, isGeoJSONGeometryEmpty, isPointFeatureCollection, lineString, lineStringCollection, makeFeatureStyleDisc, makeFeatureStyleLoading, makeLegendFromColorMap, makeView, marksByDimension, modifyStyles, moveFeature, multiLineStringLabelStyle, multiPolygonLabelStyle, opacityOptions, openLayersGetMapImageStore, precipitationMMLegendColorsWoW, projectorCache, publicLayers, publicServices, rewindGeometry, selectPreferredWMSProjection, setMapCenter, setViewFromExtent, setViewFromFeature, simpleBoxGeoJSON, simpleBoxGeoJSONWrongOrder, simpleFlightRouteLineStringGeoJSON, simpleFlightRoutePointsGeoJSON, simpleGeometryCollectionGeoJSON, simpleLineStringGeoJSON, simpleMultiPolygon, simplePointsGeojson, simplePolygonGeoJSON, simpleSmallLineStringGeoJSON, startToolExampleConfig, strokeWidthOptions, styleNameToStyleLike, temperatureLegendColorsCWK, temperatureLegendColorsWoW, textLabelStyle, textStyle, textStyleWithMargin, updateEditModeButtonsWithFir, useAnimationForLayer, useEDRLayerCollection, useEDRLayerCollectionCube, useGeoJSON, useGetEDRLayerInstance, useGetWMLayerInstance, useGetWMSLayerStyleList, useIconStyle, useMapDrawTool, useProjection, useQueryGetWMSGetCapabilities, useQueryGetWMSLayer, useQueryGetWMSLayers, useQueryGetWMSLayersTree, useQueryGetWMSServiceInfo, useQueryWMTSGetCapabilities, useSetIntervalWhenVisible, useViewFromLayer, viewUtils, webmapReactTranslations };
|
|
16342
|
+
export { BaseLayerType, ClickOnMapTool, DRAWMODE, DefaultBaseLayers, DimensionSelectButton, DimensionSelectDialog, DimensionSelectSlider, EditModeButton as EditModeButtonField, FEATURE_FILL, FEATURE_STROKE, FEATURE_STROKE_EDIT, FEATURE_VERTICES_EDIT_HANDLES, FEATURE_VERTICE_HANDLE_IMAGE, FEATURE_VERTICE_IMAGE, FeatureLayer, FeatureLayers, GeoJSONTextField, ICON_LOCATIONMARKER, ICON_LOCATIONMARKER_MODIFY, IntersectionSelect, LayerInfoButton, LayerInfoDialog, LayerInfoLegend, LayerInfoList, LayerInfoText, Legend, LegendButton, LegendDialog, LegendLayout, MapContext, MapControlButton, MapControls, MapDimensionSelect, MapFeatureClass, MapTime, MapWarningProperties, NEW_FEATURE_CREATED, NEW_LINESTRING_CREATED, NEW_POINT_CREATED, OpenLayersFeatureLayer, OpenLayersGetFeatureInfo, OpenLayersLayer, OpenLayersMapDraw, OpenLayersMapView, OpenLayersZoomControl, Proj4js, SelectField, StoryLayoutGrid, TimeAwareEDRLocationLayer, TimeContext, TimeawareImageSource, TimeawareImageSourceWMSLayer, WEBMAP_REACT_NAMESPACE, WMSLayer, WMTSLayer, XYZLayer, ZoomControls, addFeatureProperties, addGeoJSONProperties, addSelectionTypeToGeoJSON, basicExampleDrawOptions, basicExampleMultipleShapeDrawOptions, basicExampleMultipleShapeWithValuesDrawOptions, clearImageCacheForAllMaps, colorMaps, createIconStyle, createInterSections, currentlySupportedDrawModes, defaultBox, defaultDelete, defaultGeoJSONStyleProperties, defaultIntersectionStyleProperties, defaultLayers, defaultModes, defaultPoint, defaultPolygon, defaultTimeFormat, dimensionConfig, drawPolyStoryStyles, drawStyles, emptyGeoJSON, endToolExampleConfig, exampleIntersectionOptions, exampleIntersectionWithShapeOptions, exampleIntersections, exampleIntersectionsMultiDrawTool, fakeEdrLayerApiHandlers, featureBox, featureMultiPoint, featurePoint, featurePolygon, fillOptions, firSelectionType, formatTime, genericOpenLayersFeatureStyle, geowebColorToOpenLayersColor, getDimensionIcon, getDimensionLabel, getDimensionValue, getDimensionsList, getDoubleControlToolIcon, getFeatureCollection, getFeatureExtent, getFirTitle, getGeoJSONPropertyValue, getGeoJson, getIcon, getIntersectionToolIcon, getIsInsideAcceptanceTime, getLastEmptyFeatureIndex, getLayerBbox, getLayerStyles, getLayerUpdateInfo, getLegendClass, getProj4, getTimeDimension, getToolIcon, initializeOpenLayersProjections, inlineFeatureStyle, intersectPointGeoJSONS, intersectPolygonGeoJSONS, intersectionFeatureBE, intersectionFeatureNL, isGeoJSONFeatureCreatedByTool, isGeoJSONGeometryEmpty, isPointFeatureCollection, lineString, lineStringCollection, makeFeatureStyleDisc, makeFeatureStyleLoading, makeFeatureStyleMultiParam, makeFeatureStyleMultiParamLoading, makeLegendFromColorMap, makeView, marksByDimension, modifyStyles, moveFeature, multiLineStringLabelStyle, multiPolygonLabelStyle, opacityOptions, openLayersGetMapImageStore, precipitationMMLegendColorsWoW, projectorCache, publicLayers, publicServices, rewindGeometry, selectPreferredWMSProjection, setMapCenter, setViewFromExtent, setViewFromFeature, simpleBoxGeoJSON, simpleBoxGeoJSONWrongOrder, simpleFlightRouteLineStringGeoJSON, simpleFlightRoutePointsGeoJSON, simpleGeometryCollectionGeoJSON, simpleLineStringGeoJSON, simpleMultiPolygon, simplePointsGeojson, simplePolygonGeoJSON, simpleSmallLineStringGeoJSON, startToolExampleConfig, strokeWidthOptions, styleNameToStyleLike, temperatureLegendColorsCWK, temperatureLegendColorsWoW, textLabelStyle, textStyle, textStyleWithMargin, updateEditModeButtonsWithFir, useAnimationForLayer, useEDRLayerCollection, useEDRLayerCollectionCube, useGeoJSON, useGetEDRLayerInstance, useGetWMLayerInstance, useGetWMSLayerStyleList, useIconStyle, useMapDrawTool, useProjection, useQueryGetWMSGetCapabilities, useQueryGetWMSLayer, useQueryGetWMSLayers, useQueryGetWMSLayersTree, useQueryGetWMSServiceInfo, useQueryWMTSGetCapabilities, useSetIntervalWhenVisible, useViewFromLayer, viewUtils, webmapReactTranslations };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/webmap-react",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.13.0",
|
|
4
4
|
"description": "GeoWeb react wrapper for webmap",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@opengeoweb/webmap": "12.
|
|
12
|
-
"@opengeoweb/theme": "12.
|
|
13
|
-
"@opengeoweb/shared": "12.
|
|
11
|
+
"@opengeoweb/webmap": "12.13.0",
|
|
12
|
+
"@opengeoweb/theme": "12.13.0",
|
|
13
|
+
"@opengeoweb/shared": "12.13.0",
|
|
14
14
|
"lodash": "^4.17.21",
|
|
15
15
|
"ol": "^10.4.0",
|
|
16
16
|
"proj4": "^2.9.2",
|
|
@@ -6,6 +6,7 @@ export interface MapDimensionSelectProps {
|
|
|
6
6
|
handleDimensionValueChanged: (layerId: string, dimensionName: string, dimensionValue: string) => void;
|
|
7
7
|
handleSyncChanged: (layerId: string, dimensionName: string, dimensionValue: string, synced: boolean) => void;
|
|
8
8
|
layerDimension: Dimension;
|
|
9
|
+
layerName: string;
|
|
9
10
|
}
|
|
10
11
|
declare const MapDimensionSelect: React.FC<MapDimensionSelectProps>;
|
|
11
12
|
export default MapDimensionSelect;
|
|
@@ -9,6 +9,7 @@ interface TimeAwareEDRLocationLayerProps extends OpenLayersFeatureLayerProps {
|
|
|
9
9
|
dimensions?: Dimension[];
|
|
10
10
|
onInitializeLayer?: (payload: OnInitializeLayerProps) => void;
|
|
11
11
|
opacity?: number;
|
|
12
|
+
visible?: boolean;
|
|
12
13
|
}
|
|
13
14
|
export declare const TimeAwareEDRLocationLayer: React.FC<TimeAwareEDRLocationLayerProps>;
|
|
14
15
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CoverageCollection } from '@opengeoweb/shared';
|
|
2
|
-
export declare const coverageCollectionToFeatureCollection: (cov: CoverageCollection | undefined,
|
|
2
|
+
export declare const coverageCollectionToFeatureCollection: (cov: CoverageCollection | undefined, parameterNames: string) => GeoJSON.FeatureCollection;
|
|
@@ -16,6 +16,8 @@ export declare const makeLegendFromColorMap: (props: {
|
|
|
16
16
|
max: number;
|
|
17
17
|
}) => EdrOlColorLegend;
|
|
18
18
|
export declare const getLegendClass: (edrColorLegend: EdrOlColorLegend, value: number, clip?: boolean) => EdrMapLegendEntry | undefined;
|
|
19
|
+
export declare const makeFeatureStyleMultiParam: (feature: FeatureLike) => Style[];
|
|
20
|
+
export declare const makeFeatureStyleMultiParamLoading: () => Style;
|
|
19
21
|
export declare const makeFeatureStyleDisc: (feature: FeatureLike, legend: EdrOlColorLegend) => Style;
|
|
20
22
|
export declare const makeFeatureStyleLoading: (feature: FeatureLike) => Style;
|
|
21
|
-
export declare const styleNameToStyleLike: ((styleName: string) => ((feature: FeatureLike) => Style)) & import("lodash").MemoizedFunction;
|
|
23
|
+
export declare const styleNameToStyleLike: ((styleName: string, multiParam?: boolean) => ((feature: FeatureLike) => Style | Style[])) & import("lodash").MemoizedFunction;
|