@opengeoweb/core 6.1.1 → 7.0.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 +239 -1314
- package/package.json +8 -9
- package/src/lib/components/Legend/index.d.ts +0 -1
- package/src/lib/components/MapControls/index.d.ts +0 -3
- package/src/lib/components/MapDraw/DrawingTool/index.d.ts +1 -0
- package/src/lib/components/MapDraw/DrawingTool/useAreaDrawDialogAction.d.ts +10 -0
- package/src/lib/components/MapDraw/DrawingToolForm/DrawingToolForm.d.ts +2 -1
- package/src/lib/components/MapView/index.d.ts +0 -1
- package/src/lib/index.d.ts +1 -5
- package/src/lib/components/Legend/LegendDialog.d.ts +0 -14
- package/src/lib/components/MapControls/MapControlButton.d.ts +0 -10
- package/src/lib/components/MapControls/MapControlButton.spec.d.ts +0 -1
- package/src/lib/components/MapControls/MapControls.d.ts +0 -7
- package/src/lib/components/MapControls/MapControls.spec.d.ts +0 -1
- package/src/lib/components/MapControls/ZoomControls.d.ts +0 -8
- package/src/lib/components/MapControls/ZoomControls.spec.d.ts +0 -1
- package/src/lib/components/MapTime/MapTime.d.ts +0 -11
- package/src/lib/components/MapTime/MapTime.spec.d.ts +0 -1
- package/src/lib/components/MapView/MapView.Error.stories.d.ts +0 -14
- package/src/lib/components/MapView/MapView.MapPin.stories.d.ts +0 -10
- package/src/lib/components/MapView/MapView.Passive.stories.d.ts +0 -10
- package/src/lib/components/MapView/MapView.RadarAnimation.stories.d.ts +0 -10
- package/src/lib/components/MapView/MapView.RadarData.stories.d.ts +0 -10
- package/src/lib/components/MapView/MapView.SetProjectionBBox.stories.d.ts +0 -10
- package/src/lib/components/MapView/MapView.SetProjectionBBoxLocalState.stories.d.ts +0 -10
- package/src/lib/components/MapView/MapView.ShowLayerInfo.stories.d.ts +0 -10
- package/src/lib/components/MapView/MapView.d.ts +0 -4
- package/src/lib/components/MapView/MapView.spec.d.ts +0 -1
- package/src/lib/utils/publicLayers.d.ts +0 -310
- package/src/lib/utils/publicServices.d.ts +0 -95
- /package/src/lib/components/{Legend/LegendDialog.spec.d.ts → MapDraw/DrawingTool/useAreaDrawDialogAction.spec.d.ts} +0 -0
package/index.esm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default, { forwardRef, useContext, useCallback, useEffect, createElement, PureComponent, useState,
|
|
2
|
+
import React__default, { forwardRef, useContext, useCallback, useEffect, createElement, PureComponent, useState, useRef, useLayoutEffect } from 'react';
|
|
3
3
|
import { Grid, Box as Box$2, MenuItem, Typography, useTheme as useTheme$2, Button, Popper, ListItemText, ListItemIcon, FormControl, InputLabel, Paper, List, ListItemButton, CircularProgress, ListSubheader, Dialog, DialogTitle, DialogContent, DialogContentText, TextField, InputAdornment, DialogActions, LinearProgress, Backdrop, ListItem, ListItemSecondaryAction, Checkbox, Switch, styled as styled$1, Slider, Menu, Card, IconButton, Select, CardContent, RadioGroup, FormControlLabel, Radio, ToggleButtonGroup, ToggleButton, Divider, Tooltip, ButtonGroup, Snackbar } from '@mui/material';
|
|
4
4
|
import { CustomIconButton, TooltipSelect, AlertIcon, useControlledTooltip, CustomTooltip, tooltipContainerStyles, sliderHeaderStyle, CustomSlider, ToggleMenu, AlertBanner, CustomAccordion, ToolContainerDraggable, calculateDialogSizeAndPosition, CustomToggleButton, SearchHighlight, dateUtils, useMakeSureContainerStaysInsideWindow, withEggs } from '@opengeoweb/shared';
|
|
5
|
-
import { CollapseSmall, CollapseMedium, CollapseLarge, CollapseWindow, ExpandWindow, LayersAdd, Copy, None, FastForward, AutoUpdateActive, Both, Visibility, VisibilityOff, Delete, DragHandle as DragHandle$1, Cached, Add, MapAdd, Filter, Search, Clear, Info, DimensionsOther, DimensionsElevation, DimensionsRefTime, DimensionsTime, Edit, Close,
|
|
5
|
+
import { CollapseSmall, CollapseMedium, CollapseLarge, CollapseWindow, ExpandWindow, LayersAdd, Copy, None, FastForward, AutoUpdateActive, Both, Visibility, VisibilityOff, Delete, DragHandle as DragHandle$1, Cached, Add, MapAdd, Filter, Search, Clear, Info, DimensionsOther, DimensionsElevation, DimensionsRefTime, DimensionsTime, Edit, Close, Layers, Equalizer, Link, LinkOff, AutoUpdateInActive, Speed, Clock, Now, Animation, Options, Pause, Play, StepForward, StepBackward, dragHandlePath, ChevronDown, ChevronUp, List as List$1, ChevronRight, ChevronLeft, Resize, ExitDomain, Location, DrawPolygon, DrawRegion, ThemeWrapper, lightTheme } from '@opengeoweb/theme';
|
|
6
6
|
import { useDispatch, useSelector, connect, Provider } from 'react-redux';
|
|
7
|
-
import { uiTypes, uiSelectors, uiActions, layerTypes, layerUtils, layerActions, layerSelectors, serviceSelectors, serviceActions, mapSelectors, mapActions, mapEnums, mapConstants, filterLayers, getUserAddedServices, layerSelectSelectors, layerSelectActions, storeUtils, snackbarActions, layerSelectTypes, mapUtils, genericActions, syncConstants,
|
|
7
|
+
import { uiTypes, uiSelectors, uiActions, layerTypes, layerUtils, layerActions, layerSelectors, serviceSelectors, serviceActions, mapSelectors, mapActions, mapEnums, mapConstants, filterLayers, getUserAddedServices, layerSelectSelectors, layerSelectActions, storeUtils, snackbarActions, layerSelectTypes, mapUtils, genericActions, syncConstants, drawActions, mapStoreActions, drawSelectors, defaultLayers, syncGroupsSelectors, syncGroupsSelector, snackbarModuleConfig, snackbarSelectors, coreModuleConfig, routerUtils, routerModuleConfig, appModuleConfig, appActions } from '@opengeoweb/store';
|
|
8
8
|
import { ReactSortable } from 'react-sortablejs';
|
|
9
9
|
import { webmapUtils, WMGetServiceFromStore, getCapabilities, LayerType, clearImageCache, WMLayer } from '@opengeoweb/webmap';
|
|
10
10
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -12,13 +12,11 @@ import _, { isEqual as isEqual$1, debounce, groupBy, throttle as throttle$1, cla
|
|
|
12
12
|
import Box$3 from '@mui/material/Box';
|
|
13
13
|
import Typography$1 from '@mui/material/Typography';
|
|
14
14
|
import Grid$1 from '@mui/material/Grid';
|
|
15
|
-
import { LegendLayout, CanvasComponent,
|
|
15
|
+
import { LegendLayout, MapControlButton, ZoomControls, CanvasComponent, MapView, MapViewLayer, LegendDialog, defaultStyleProperties, lineString, featurePoint, featurePolygon, emptyGeoJSON, DRAWMODE, addFeatureProperties, isGeoJSONFeatureCreatedByTool, getFeatureCollection, getGeoJson, createInterSections, MapControls, publicLayers } from '@opengeoweb/webmap-react';
|
|
16
16
|
import { ReactHookFormProvider, defaultFormOptions, ReactHookFormTextField, ReactHookFormSelect, ReactHookFormHiddenInput } from '@opengeoweb/form-fields';
|
|
17
17
|
import moment from 'moment';
|
|
18
|
-
import { findDOMNode, flushSync } from 'react-dom';
|
|
19
|
-
import debounce$1 from 'lodash/debounce';
|
|
20
|
-
import throttle$2 from 'lodash/throttle';
|
|
21
18
|
import Draggable from 'react-draggable';
|
|
19
|
+
import { flushSync } from 'react-dom';
|
|
22
20
|
import axios from 'axios';
|
|
23
21
|
import { useDebounce } from '@opengeoweb/api';
|
|
24
22
|
import { createStore } from '@redux-eggs/redux-toolkit';
|
|
@@ -5386,7 +5384,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
5386
5384
|
PERFORMANCE OF THIS SOFTWARE.
|
|
5387
5385
|
***************************************************************************** */
|
|
5388
5386
|
|
|
5389
|
-
function __rest
|
|
5387
|
+
function __rest(s, e) {
|
|
5390
5388
|
var t = {};
|
|
5391
5389
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5392
5390
|
t[p] = s[p];
|
|
@@ -10535,7 +10533,7 @@ var CustomDimensionSelectConnect = function CustomDimensionSelectConnect(_a) {
|
|
|
10535
10533
|
mapId = _a.mapId,
|
|
10536
10534
|
dimensionsToShow = _a.dimensionsToShow,
|
|
10537
10535
|
SingleValueComponent = _a.SingleValueComponent,
|
|
10538
|
-
props = __rest
|
|
10536
|
+
props = __rest(_a, ["layerId", "mapId", "dimensionsToShow", "SingleValueComponent"]);
|
|
10539
10537
|
var _useLayerDimensions = useLayerDimensions(layerId, mapId),
|
|
10540
10538
|
layerDimensions = _useLayerDimensions.layerDimensions,
|
|
10541
10539
|
isLayerEnabled = _useLayerDimensions.isLayerEnabled,
|
|
@@ -15701,7 +15699,7 @@ var ServicePopup = function ServicePopup(_ref2) {
|
|
|
15701
15699
|
}, "save")))));
|
|
15702
15700
|
};
|
|
15703
15701
|
var ServicePopupWrapper = function ServicePopupWrapper(_a) {
|
|
15704
|
-
var props = __rest
|
|
15702
|
+
var props = __rest(_a, []);
|
|
15705
15703
|
return /*#__PURE__*/React.createElement(ReactHookFormProvider, {
|
|
15706
15704
|
options: Object.assign(Object.assign({}, defaultFormOptions), {
|
|
15707
15705
|
defaultValues: {
|
|
@@ -15866,162 +15864,6 @@ var LayerSelectConnect = function LayerSelectConnect(_ref) {
|
|
|
15866
15864
|
}), /*#__PURE__*/React.createElement(LayerInfoDialogConnect, null), /*#__PURE__*/React.createElement(ServicePopupConnect, null));
|
|
15867
15865
|
};
|
|
15868
15866
|
|
|
15869
|
-
/* *
|
|
15870
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
15871
|
-
* you may not use this file except in compliance with the License.
|
|
15872
|
-
* You may obtain a copy of the License at
|
|
15873
|
-
*
|
|
15874
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
15875
|
-
*
|
|
15876
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
15877
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15878
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15879
|
-
* See the License for the specific language governing permissions and
|
|
15880
|
-
* limitations under the License.
|
|
15881
|
-
*
|
|
15882
|
-
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
15883
|
-
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
15884
|
-
* */
|
|
15885
|
-
var MapControlButton = function MapControlButton(_a) {
|
|
15886
|
-
var onClick = _a.onClick,
|
|
15887
|
-
children = _a.children,
|
|
15888
|
-
title = _a.title,
|
|
15889
|
-
_a$placement = _a.placement,
|
|
15890
|
-
placement = _a$placement === void 0 ? 'right' : _a$placement,
|
|
15891
|
-
_a$isActive = _a.isActive,
|
|
15892
|
-
isActive = _a$isActive === void 0 ? false : _a$isActive,
|
|
15893
|
-
props = __rest$1(_a, ["onClick", "children", "title", "placement", "isActive"]);
|
|
15894
|
-
return /*#__PURE__*/React.createElement(CustomIconButton, Object.assign({
|
|
15895
|
-
variant: "tool",
|
|
15896
|
-
tooltipProps: {
|
|
15897
|
-
placement: placement,
|
|
15898
|
-
title: title
|
|
15899
|
-
},
|
|
15900
|
-
onClick: onClick,
|
|
15901
|
-
isSelected: isActive
|
|
15902
|
-
}, props), children);
|
|
15903
|
-
};
|
|
15904
|
-
|
|
15905
|
-
/* *
|
|
15906
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
15907
|
-
* you may not use this file except in compliance with the License.
|
|
15908
|
-
* You may obtain a copy of the License at
|
|
15909
|
-
*
|
|
15910
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
15911
|
-
*
|
|
15912
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
15913
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15914
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15915
|
-
* See the License for the specific language governing permissions and
|
|
15916
|
-
* limitations under the License.
|
|
15917
|
-
*
|
|
15918
|
-
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
15919
|
-
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
15920
|
-
* */
|
|
15921
|
-
var ZoomControls = function ZoomControls(_ref) {
|
|
15922
|
-
var onZoomIn = _ref.onZoomIn,
|
|
15923
|
-
onZoomOut = _ref.onZoomOut,
|
|
15924
|
-
onZoomReset = _ref.onZoomReset;
|
|
15925
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MapControlButton, {
|
|
15926
|
-
title: "Reset zoom",
|
|
15927
|
-
"data-testid": "zoom-reset",
|
|
15928
|
-
onClick: onZoomReset
|
|
15929
|
-
}, /*#__PURE__*/React.createElement(Home, null)), /*#__PURE__*/React.createElement(MapControlButton, {
|
|
15930
|
-
title: "Zoom in",
|
|
15931
|
-
"data-testid": "zoom-in",
|
|
15932
|
-
onClick: onZoomIn
|
|
15933
|
-
}, /*#__PURE__*/React.createElement(Add, null)), /*#__PURE__*/React.createElement(MapControlButton, {
|
|
15934
|
-
title: "Zoom out",
|
|
15935
|
-
"data-testid": "zoom-out",
|
|
15936
|
-
onClick: onZoomOut
|
|
15937
|
-
}, /*#__PURE__*/React.createElement(Minus, null)));
|
|
15938
|
-
};
|
|
15939
|
-
|
|
15940
|
-
/* *
|
|
15941
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
15942
|
-
* you may not use this file except in compliance with the License.
|
|
15943
|
-
* You may obtain a copy of the License at
|
|
15944
|
-
*
|
|
15945
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
15946
|
-
*
|
|
15947
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
15948
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15949
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15950
|
-
* See the License for the specific language governing permissions and
|
|
15951
|
-
* limitations under the License.
|
|
15952
|
-
*
|
|
15953
|
-
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
15954
|
-
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
15955
|
-
* */
|
|
15956
|
-
var ZoomControlConnect = function ZoomControlConnect(_ref) {
|
|
15957
|
-
var mapId = _ref.mapId;
|
|
15958
|
-
var isVisible = useSelector(function (store) {
|
|
15959
|
-
return mapSelectors.isZoomControlsVisible(store, mapId);
|
|
15960
|
-
});
|
|
15961
|
-
var adagucRef = React.useRef(null);
|
|
15962
|
-
React.useEffect(function () {
|
|
15963
|
-
adagucRef.current = webmapUtils.getWMJSMapById(mapId);
|
|
15964
|
-
}, [mapId]);
|
|
15965
|
-
var onZoomIn = function onZoomIn() {
|
|
15966
|
-
return adagucRef.current.zoomIn(undefined);
|
|
15967
|
-
};
|
|
15968
|
-
var onZoomOut = function onZoomOut() {
|
|
15969
|
-
return adagucRef.current.zoomOut();
|
|
15970
|
-
};
|
|
15971
|
-
var onZoomReset = function onZoomReset() {
|
|
15972
|
-
return adagucRef.current.zoomToLayer(adagucRef.current.getActiveLayer());
|
|
15973
|
-
};
|
|
15974
|
-
if (!isVisible) {
|
|
15975
|
-
return null;
|
|
15976
|
-
}
|
|
15977
|
-
return /*#__PURE__*/React.createElement(ZoomControls, {
|
|
15978
|
-
onZoomIn: onZoomIn,
|
|
15979
|
-
onZoomOut: onZoomOut,
|
|
15980
|
-
onZoomReset: onZoomReset
|
|
15981
|
-
});
|
|
15982
|
-
};
|
|
15983
|
-
|
|
15984
|
-
/* *
|
|
15985
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
15986
|
-
* you may not use this file except in compliance with the License.
|
|
15987
|
-
* You may obtain a copy of the License at
|
|
15988
|
-
*
|
|
15989
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
15990
|
-
*
|
|
15991
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
15992
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15993
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15994
|
-
* See the License for the specific language governing permissions and
|
|
15995
|
-
* limitations under the License.
|
|
15996
|
-
*
|
|
15997
|
-
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
15998
|
-
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
15999
|
-
* */
|
|
16000
|
-
var MapControls = function MapControls(_a) {
|
|
16001
|
-
var children = _a.children,
|
|
16002
|
-
props = __rest$1(_a, ["children"]);
|
|
16003
|
-
return /*#__PURE__*/React.createElement(Box$2, Object.assign({
|
|
16004
|
-
sx: {
|
|
16005
|
-
position: 'absolute',
|
|
16006
|
-
overflow: 'visible',
|
|
16007
|
-
display: 'block',
|
|
16008
|
-
left: 0,
|
|
16009
|
-
margin: 1,
|
|
16010
|
-
zIndex: 50,
|
|
16011
|
-
top: '96px',
|
|
16012
|
-
userSelect: 'none'
|
|
16013
|
-
}
|
|
16014
|
-
}, props), /*#__PURE__*/React.createElement(Grid, {
|
|
16015
|
-
sx: {
|
|
16016
|
-
'& > button': {
|
|
16017
|
-
marginBottom: 1
|
|
16018
|
-
}
|
|
16019
|
-
},
|
|
16020
|
-
container: true,
|
|
16021
|
-
direction: "column"
|
|
16022
|
-
}, children));
|
|
16023
|
-
};
|
|
16024
|
-
|
|
16025
15867
|
/* *
|
|
16026
15868
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
16027
15869
|
* you may not use this file except in compliance with the License.
|
|
@@ -16625,6 +16467,50 @@ var MultiMapMultiDimensionSelectConnect = function MultiMapMultiDimensionSelectC
|
|
|
16625
16467
|
}));
|
|
16626
16468
|
};
|
|
16627
16469
|
|
|
16470
|
+
/* *
|
|
16471
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
16472
|
+
* you may not use this file except in compliance with the License.
|
|
16473
|
+
* You may obtain a copy of the License at
|
|
16474
|
+
*
|
|
16475
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
16476
|
+
*
|
|
16477
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16478
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16479
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16480
|
+
* See the License for the specific language governing permissions and
|
|
16481
|
+
* limitations under the License.
|
|
16482
|
+
*
|
|
16483
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
16484
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
16485
|
+
* */
|
|
16486
|
+
var ZoomControlConnect = function ZoomControlConnect(_ref) {
|
|
16487
|
+
var mapId = _ref.mapId;
|
|
16488
|
+
var isVisible = useSelector(function (store) {
|
|
16489
|
+
return mapSelectors.isZoomControlsVisible(store, mapId);
|
|
16490
|
+
});
|
|
16491
|
+
var adagucRef = React.useRef(null);
|
|
16492
|
+
React.useEffect(function () {
|
|
16493
|
+
adagucRef.current = webmapUtils.getWMJSMapById(mapId);
|
|
16494
|
+
}, [mapId]);
|
|
16495
|
+
var onZoomIn = function onZoomIn() {
|
|
16496
|
+
return adagucRef.current.zoomIn(undefined);
|
|
16497
|
+
};
|
|
16498
|
+
var onZoomOut = function onZoomOut() {
|
|
16499
|
+
return adagucRef.current.zoomOut();
|
|
16500
|
+
};
|
|
16501
|
+
var onZoomReset = function onZoomReset() {
|
|
16502
|
+
return adagucRef.current.zoomToLayer(adagucRef.current.getActiveLayer());
|
|
16503
|
+
};
|
|
16504
|
+
if (!isVisible) {
|
|
16505
|
+
return null;
|
|
16506
|
+
}
|
|
16507
|
+
return /*#__PURE__*/React.createElement(ZoomControls, {
|
|
16508
|
+
onZoomIn: onZoomIn,
|
|
16509
|
+
onZoomOut: onZoomOut,
|
|
16510
|
+
onZoomReset: onZoomReset
|
|
16511
|
+
});
|
|
16512
|
+
};
|
|
16513
|
+
|
|
16628
16514
|
/* *
|
|
16629
16515
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
16630
16516
|
* you may not use this file except in compliance with the License.
|
|
@@ -20104,511 +19990,47 @@ var TimeSliderConnect = function TimeSliderConnect(_ref) {
|
|
|
20104
19990
|
});
|
|
20105
19991
|
};
|
|
20106
19992
|
|
|
20107
|
-
|
|
20108
|
-
|
|
20109
|
-
|
|
20110
|
-
|
|
20111
|
-
|
|
20112
|
-
|
|
20113
|
-
|
|
20114
|
-
|
|
20115
|
-
|
|
20116
|
-
|
|
20117
|
-
|
|
20118
|
-
|
|
20119
|
-
|
|
20120
|
-
|
|
20121
|
-
|
|
20122
|
-
|
|
20123
|
-
|
|
20124
|
-
|
|
20125
|
-
|
|
20126
|
-
|
|
20127
|
-
|
|
20128
|
-
|
|
20129
|
-
|
|
20130
|
-
|
|
20131
|
-
|
|
20132
|
-
|
|
20133
|
-
|
|
20134
|
-
|
|
20135
|
-
|
|
20136
|
-
|
|
20137
|
-
|
|
20138
|
-
|
|
20139
|
-
|
|
20140
|
-
|
|
20141
|
-
|
|
20142
|
-
|
|
20143
|
-
|
|
20144
|
-
|
|
20145
|
-
|
|
20146
|
-
|
|
20147
|
-
|
|
20148
|
-
return throttle$2(resizeCallback, refreshRate, refreshOptions);
|
|
20149
|
-
default:
|
|
20150
|
-
return resizeCallback;
|
|
20151
|
-
}
|
|
20152
|
-
};
|
|
20153
|
-
var isFunction = function (fn) { return typeof fn === 'function'; };
|
|
20154
|
-
var isSSR = function () { return typeof window === 'undefined'; };
|
|
20155
|
-
var isDOMElement = function (element) {
|
|
20156
|
-
return element instanceof Element || element instanceof HTMLDocument;
|
|
20157
|
-
};/** @class */ ((function (_super) {
|
|
20158
|
-
__extends$2(ResizeDetector, _super);
|
|
20159
|
-
function ResizeDetector(props) {
|
|
20160
|
-
var _this = _super.call(this, props) || this;
|
|
20161
|
-
_this.cancelHandler = function () {
|
|
20162
|
-
if (_this.resizeHandler && _this.resizeHandler.cancel) {
|
|
20163
|
-
// cancel debounced handler
|
|
20164
|
-
_this.resizeHandler.cancel();
|
|
20165
|
-
_this.resizeHandler = null;
|
|
20166
|
-
}
|
|
20167
|
-
};
|
|
20168
|
-
_this.attachObserver = function () {
|
|
20169
|
-
var _a = _this.props, targetRef = _a.targetRef, observerOptions = _a.observerOptions;
|
|
20170
|
-
if (isSSR()) {
|
|
20171
|
-
return;
|
|
20172
|
-
}
|
|
20173
|
-
if (targetRef && targetRef.current) {
|
|
20174
|
-
_this.targetRef.current = targetRef.current;
|
|
20175
|
-
}
|
|
20176
|
-
var element = _this.getElement();
|
|
20177
|
-
if (!element) {
|
|
20178
|
-
// can't find element to observe
|
|
20179
|
-
return;
|
|
20180
|
-
}
|
|
20181
|
-
if (_this.observableElement && _this.observableElement === element) {
|
|
20182
|
-
// element is already observed
|
|
20183
|
-
return;
|
|
20184
|
-
}
|
|
20185
|
-
_this.observableElement = element;
|
|
20186
|
-
_this.resizeObserver.observe(element, observerOptions);
|
|
20187
|
-
};
|
|
20188
|
-
_this.getElement = function () {
|
|
20189
|
-
var _a = _this.props, querySelector = _a.querySelector, targetDomEl = _a.targetDomEl;
|
|
20190
|
-
if (isSSR())
|
|
20191
|
-
return null;
|
|
20192
|
-
// in case we pass a querySelector
|
|
20193
|
-
if (querySelector)
|
|
20194
|
-
return document.querySelector(querySelector);
|
|
20195
|
-
// in case we pass a DOM element
|
|
20196
|
-
if (targetDomEl && isDOMElement(targetDomEl))
|
|
20197
|
-
return targetDomEl;
|
|
20198
|
-
// in case we pass a React ref using React.createRef()
|
|
20199
|
-
if (_this.targetRef && isDOMElement(_this.targetRef.current))
|
|
20200
|
-
return _this.targetRef.current;
|
|
20201
|
-
// the worse case when we don't receive any information from the parent and the library doesn't add any wrappers
|
|
20202
|
-
// we have to use a deprecated `findDOMNode` method in order to find a DOM element to attach to
|
|
20203
|
-
var currentElement = findDOMNode(_this);
|
|
20204
|
-
if (!currentElement)
|
|
20205
|
-
return null;
|
|
20206
|
-
var renderType = _this.getRenderType();
|
|
20207
|
-
switch (renderType) {
|
|
20208
|
-
case 'renderProp':
|
|
20209
|
-
return currentElement;
|
|
20210
|
-
case 'childFunction':
|
|
20211
|
-
return currentElement;
|
|
20212
|
-
case 'child':
|
|
20213
|
-
return currentElement;
|
|
20214
|
-
case 'childArray':
|
|
20215
|
-
return currentElement;
|
|
20216
|
-
default:
|
|
20217
|
-
return currentElement.parentElement;
|
|
20218
|
-
}
|
|
20219
|
-
};
|
|
20220
|
-
_this.createResizeHandler = function (entries) {
|
|
20221
|
-
var _a = _this.props, _b = _a.handleWidth, handleWidth = _b === void 0 ? true : _b, _c = _a.handleHeight, handleHeight = _c === void 0 ? true : _c, onResize = _a.onResize;
|
|
20222
|
-
if (!handleWidth && !handleHeight)
|
|
20223
|
-
return;
|
|
20224
|
-
var notifyResize = function (_a) {
|
|
20225
|
-
var width = _a.width, height = _a.height;
|
|
20226
|
-
if (_this.state.width === width && _this.state.height === height) {
|
|
20227
|
-
// skip if dimensions haven't changed
|
|
20228
|
-
return;
|
|
20229
|
-
}
|
|
20230
|
-
if ((_this.state.width === width && !handleHeight) || (_this.state.height === height && !handleWidth)) {
|
|
20231
|
-
// process `handleHeight/handleWidth` props
|
|
20232
|
-
return;
|
|
20233
|
-
}
|
|
20234
|
-
onResize === null || onResize === void 0 ? void 0 : onResize(width, height);
|
|
20235
|
-
_this.setState({ width: width, height: height });
|
|
20236
|
-
};
|
|
20237
|
-
entries.forEach(function (entry) {
|
|
20238
|
-
var _a = (entry && entry.contentRect) || {}, width = _a.width, height = _a.height;
|
|
20239
|
-
var shouldSetSize = !_this.skipOnMount && !isSSR();
|
|
20240
|
-
if (shouldSetSize) {
|
|
20241
|
-
notifyResize({ width: width, height: height });
|
|
20242
|
-
}
|
|
20243
|
-
_this.skipOnMount = false;
|
|
20244
|
-
});
|
|
20245
|
-
};
|
|
20246
|
-
_this.getRenderType = function () {
|
|
20247
|
-
var _a = _this.props, render = _a.render, children = _a.children;
|
|
20248
|
-
if (isFunction(render)) {
|
|
20249
|
-
// DEPRECATED. Use `Child Function Pattern` instead
|
|
20250
|
-
return 'renderProp';
|
|
20251
|
-
}
|
|
20252
|
-
if (isFunction(children)) {
|
|
20253
|
-
return 'childFunction';
|
|
20254
|
-
}
|
|
20255
|
-
if (isValidElement(children)) {
|
|
20256
|
-
return 'child';
|
|
20257
|
-
}
|
|
20258
|
-
if (Array.isArray(children)) {
|
|
20259
|
-
// DEPRECATED. Wrap children with a single parent
|
|
20260
|
-
return 'childArray';
|
|
20261
|
-
}
|
|
20262
|
-
// DEPRECATED. Use `Child Function Pattern` instead
|
|
20263
|
-
return 'parent';
|
|
20264
|
-
};
|
|
20265
|
-
var skipOnMount = props.skipOnMount, refreshMode = props.refreshMode, _a = props.refreshRate, refreshRate = _a === void 0 ? 1000 : _a, refreshOptions = props.refreshOptions;
|
|
20266
|
-
_this.state = {
|
|
20267
|
-
width: undefined,
|
|
20268
|
-
height: undefined
|
|
20269
|
-
};
|
|
20270
|
-
_this.sizeRef = {
|
|
20271
|
-
current: _this.state
|
|
20272
|
-
};
|
|
20273
|
-
_this.skipOnMount = skipOnMount;
|
|
20274
|
-
_this.targetRef = createRef();
|
|
20275
|
-
_this.observableElement = null;
|
|
20276
|
-
if (isSSR()) {
|
|
20277
|
-
return _this;
|
|
20278
|
-
}
|
|
20279
|
-
_this.resizeHandler = patchResizeCallback(_this.createResizeHandler, refreshMode, refreshRate, refreshOptions);
|
|
20280
|
-
_this.resizeObserver = new window.ResizeObserver(_this.resizeHandler);
|
|
20281
|
-
return _this;
|
|
20282
|
-
}
|
|
20283
|
-
ResizeDetector.prototype.componentDidMount = function () {
|
|
20284
|
-
this.attachObserver();
|
|
20285
|
-
};
|
|
20286
|
-
ResizeDetector.prototype.componentDidUpdate = function () {
|
|
20287
|
-
this.attachObserver();
|
|
20288
|
-
this.sizeRef.current = this.state;
|
|
20289
|
-
};
|
|
20290
|
-
ResizeDetector.prototype.componentWillUnmount = function () {
|
|
20291
|
-
if (isSSR()) {
|
|
20292
|
-
return;
|
|
20293
|
-
}
|
|
20294
|
-
this.observableElement = null;
|
|
20295
|
-
this.resizeObserver.disconnect();
|
|
20296
|
-
this.cancelHandler();
|
|
20297
|
-
};
|
|
20298
|
-
ResizeDetector.prototype.render = function () {
|
|
20299
|
-
var _a = this.props, render = _a.render, children = _a.children, _b = _a.nodeType, WrapperTag = _b === void 0 ? 'div' : _b;
|
|
20300
|
-
var _c = this.state, width = _c.width, height = _c.height;
|
|
20301
|
-
var childProps = { width: width, height: height, targetRef: this.targetRef };
|
|
20302
|
-
var renderType = this.getRenderType();
|
|
20303
|
-
switch (renderType) {
|
|
20304
|
-
case 'renderProp':
|
|
20305
|
-
return render === null || render === void 0 ? void 0 : render(childProps);
|
|
20306
|
-
case 'childFunction': {
|
|
20307
|
-
var childFunction = children;
|
|
20308
|
-
return childFunction === null || childFunction === void 0 ? void 0 : childFunction(childProps);
|
|
20309
|
-
}
|
|
20310
|
-
case 'child': {
|
|
20311
|
-
// @TODO bug prone logic
|
|
20312
|
-
var child = children;
|
|
20313
|
-
if (child.type && typeof child.type === 'string') {
|
|
20314
|
-
// child is a native DOM elements such as div, span etc
|
|
20315
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
20316
|
-
childProps.targetRef; var nativeProps = __rest(childProps, ["targetRef"]);
|
|
20317
|
-
return cloneElement(child, nativeProps);
|
|
20318
|
-
}
|
|
20319
|
-
// class or functional component otherwise
|
|
20320
|
-
return cloneElement(child, childProps);
|
|
20321
|
-
}
|
|
20322
|
-
case 'childArray': {
|
|
20323
|
-
var childArray = children;
|
|
20324
|
-
return childArray.map(function (el) { return !!el && cloneElement(el, childProps); });
|
|
20325
|
-
}
|
|
20326
|
-
default:
|
|
20327
|
-
return React__default.createElement(WrapperTag, null);
|
|
20328
|
-
}
|
|
20329
|
-
};
|
|
20330
|
-
return ResizeDetector;
|
|
20331
|
-
})(PureComponent));function useResizeDetector(_a) {
|
|
20332
|
-
var _b = _a === void 0 ? {} : _a, _c = _b.skipOnMount, skipOnMount = _c === void 0 ? false : _c, refreshMode = _b.refreshMode, _d = _b.refreshRate, refreshRate = _d === void 0 ? 1000 : _d, refreshOptions = _b.refreshOptions, _e = _b.handleWidth, handleWidth = _e === void 0 ? true : _e, _f = _b.handleHeight, handleHeight = _f === void 0 ? true : _f, targetRef = _b.targetRef, observerOptions = _b.observerOptions, onResize = _b.onResize;
|
|
20333
|
-
var skipResize = useRef(skipOnMount);
|
|
20334
|
-
var _g = useState({
|
|
20335
|
-
width: undefined,
|
|
20336
|
-
height: undefined
|
|
20337
|
-
}), size = _g[0], setSize = _g[1];
|
|
20338
|
-
// we are going to use this ref to store the last element that was passed to the hook
|
|
20339
|
-
var _h = useState((targetRef === null || targetRef === void 0 ? void 0 : targetRef.current) || null), refElement = _h[0], setRefElement = _h[1];
|
|
20340
|
-
// if targetRef is passed, we need to update the refElement
|
|
20341
|
-
// we have to use setTimeout because ref get assigned after the hook is called
|
|
20342
|
-
// in the future releases we are going to remove targetRef and force users to use ref returned by the hook
|
|
20343
|
-
if (targetRef) {
|
|
20344
|
-
setTimeout(function () {
|
|
20345
|
-
if (targetRef.current !== refElement) {
|
|
20346
|
-
setRefElement(targetRef.current);
|
|
20347
|
-
}
|
|
20348
|
-
}, 0);
|
|
20349
|
-
}
|
|
20350
|
-
// this is a callback that will be called every time the ref is changed
|
|
20351
|
-
// we call setState inside to trigger rerender
|
|
20352
|
-
var onRefChange = useCallback(function (node) {
|
|
20353
|
-
if (node !== refElement) {
|
|
20354
|
-
setRefElement(node);
|
|
20355
|
-
}
|
|
20356
|
-
}, [refElement]);
|
|
20357
|
-
// adding `current` to make it compatible with useRef shape
|
|
20358
|
-
onRefChange.current = refElement;
|
|
20359
|
-
useEffect(function () {
|
|
20360
|
-
return function () {
|
|
20361
|
-
// component is unmounted
|
|
20362
|
-
// clear ref to avoid memory leaks
|
|
20363
|
-
setRefElement(null);
|
|
20364
|
-
onRefChange.current = null;
|
|
20365
|
-
};
|
|
20366
|
-
}, []);
|
|
20367
|
-
var shouldSetSize = useCallback(function (prevSize, nextSize) {
|
|
20368
|
-
if (prevSize.width === nextSize.width && prevSize.height === nextSize.height) {
|
|
20369
|
-
// skip if dimensions haven't changed
|
|
20370
|
-
return false;
|
|
20371
|
-
}
|
|
20372
|
-
if ((prevSize.width === nextSize.width && !handleHeight) ||
|
|
20373
|
-
(prevSize.height === nextSize.height && !handleWidth)) {
|
|
20374
|
-
// process `handleHeight/handleWidth` props
|
|
20375
|
-
return false;
|
|
20376
|
-
}
|
|
20377
|
-
return true;
|
|
20378
|
-
}, [handleWidth, handleHeight]);
|
|
20379
|
-
var resizeCallback = useCallback(function (entries) {
|
|
20380
|
-
if (!handleWidth && !handleHeight)
|
|
20381
|
-
return;
|
|
20382
|
-
if (skipResize.current) {
|
|
20383
|
-
skipResize.current = false;
|
|
20384
|
-
return;
|
|
20385
|
-
}
|
|
20386
|
-
entries.forEach(function (entry) {
|
|
20387
|
-
var _a = (entry === null || entry === void 0 ? void 0 : entry.contentRect) || {}, width = _a.width, height = _a.height;
|
|
20388
|
-
setSize(function (prevSize) {
|
|
20389
|
-
if (!shouldSetSize(prevSize, { width: width, height: height }))
|
|
20390
|
-
return prevSize;
|
|
20391
|
-
return { width: width, height: height };
|
|
20392
|
-
});
|
|
20393
|
-
});
|
|
20394
|
-
}, [handleWidth, handleHeight, skipResize, shouldSetSize]);
|
|
20395
|
-
var resizeHandler = useCallback(patchResizeCallback(resizeCallback, refreshMode, refreshRate, refreshOptions), [
|
|
20396
|
-
resizeCallback,
|
|
20397
|
-
refreshMode,
|
|
20398
|
-
refreshRate,
|
|
20399
|
-
refreshOptions
|
|
20400
|
-
]);
|
|
20401
|
-
// on refElement change
|
|
20402
|
-
useEffect(function () {
|
|
20403
|
-
var resizeObserver;
|
|
20404
|
-
if (refElement) {
|
|
20405
|
-
resizeObserver = new window.ResizeObserver(resizeHandler);
|
|
20406
|
-
resizeObserver.observe(refElement, observerOptions);
|
|
20407
|
-
}
|
|
20408
|
-
else {
|
|
20409
|
-
if (size.width || size.height) {
|
|
20410
|
-
setSize({ width: undefined, height: undefined });
|
|
20411
|
-
}
|
|
20412
|
-
}
|
|
20413
|
-
return function () {
|
|
20414
|
-
var _a, _b, _c;
|
|
20415
|
-
(_a = resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect) === null || _a === void 0 ? void 0 : _a.call(resizeObserver);
|
|
20416
|
-
(_c = (_b = resizeHandler).cancel) === null || _c === void 0 ? void 0 : _c.call(_b);
|
|
20417
|
-
};
|
|
20418
|
-
}, [resizeHandler, refElement]);
|
|
20419
|
-
useEffect(function () {
|
|
20420
|
-
onResize === null || onResize === void 0 ? void 0 : onResize(size.width, size.height);
|
|
20421
|
-
}, [size]);
|
|
20422
|
-
return __assign$2({ ref: onRefChange }, size);
|
|
20423
|
-
}
|
|
20424
|
-
|
|
20425
|
-
/* *
|
|
20426
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
20427
|
-
* you may not use this file except in compliance with the License.
|
|
20428
|
-
* You may obtain a copy of the License at
|
|
20429
|
-
*
|
|
20430
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
20431
|
-
*
|
|
20432
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
20433
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
20434
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
20435
|
-
* See the License for the specific language governing permissions and
|
|
20436
|
-
* limitations under the License.
|
|
20437
|
-
*
|
|
20438
|
-
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
20439
|
-
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
20440
|
-
* */
|
|
20441
|
-
var getTimeDimension = function getTimeDimension(dimensions) {
|
|
20442
|
-
return dimensions.find(function (dimension) {
|
|
20443
|
-
return dimension.name === 'time' && dimension.currentValue !== undefined;
|
|
20444
|
-
});
|
|
20445
|
-
};
|
|
20446
|
-
var formatTime = function formatTime(time, timeFormat) {
|
|
20447
|
-
return dateUtils.dateToString(dateUtils.utc(time), timeFormat);
|
|
20448
|
-
};
|
|
20449
|
-
var defaultTimeFormat = "EEE dd MMM yyyy HH:mm 'UTC'";
|
|
20450
|
-
var MapTime = function MapTime(_ref) {
|
|
20451
|
-
var dimensions = _ref.dimensions,
|
|
20452
|
-
_ref$timeFormat = _ref.timeFormat,
|
|
20453
|
-
timeFormat = _ref$timeFormat === void 0 ? defaultTimeFormat : _ref$timeFormat;
|
|
20454
|
-
var timeDimension = getTimeDimension(dimensions);
|
|
20455
|
-
if (!timeDimension) {
|
|
20456
|
-
return null;
|
|
20457
|
-
}
|
|
20458
|
-
var mapTime = formatTime(timeDimension.currentValue, timeFormat);
|
|
20459
|
-
return /*#__PURE__*/React.createElement(Box$2, {
|
|
20460
|
-
"data-testid": "map-time",
|
|
20461
|
-
sx: {
|
|
20462
|
-
zIndex: 10,
|
|
20463
|
-
justifySelf: 'center',
|
|
20464
|
-
bottom: '12px',
|
|
20465
|
-
position: 'absolute'
|
|
20466
|
-
}
|
|
20467
|
-
}, /*#__PURE__*/React.createElement(Box$2, null, /*#__PURE__*/React.createElement(Typography, {
|
|
20468
|
-
variant: "caption",
|
|
20469
|
-
sx: {
|
|
20470
|
-
fontWeight: 500
|
|
20471
|
-
}
|
|
20472
|
-
}, mapTime)));
|
|
20473
|
-
};
|
|
20474
|
-
|
|
20475
|
-
/* *
|
|
20476
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
20477
|
-
* you may not use this file except in compliance with the License.
|
|
20478
|
-
* You may obtain a copy of the License at
|
|
20479
|
-
*
|
|
20480
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
20481
|
-
*
|
|
20482
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
20483
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
20484
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
20485
|
-
* See the License for the specific language governing permissions and
|
|
20486
|
-
* limitations under the License.
|
|
20487
|
-
*
|
|
20488
|
-
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
20489
|
-
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
20490
|
-
* */
|
|
20491
|
-
var MapView = function MapView(_a) {
|
|
20492
|
-
var children = _a.children,
|
|
20493
|
-
_a$controls = _a.controls,
|
|
20494
|
-
controls = _a$controls === void 0 ? {
|
|
20495
|
-
zoomControls: true
|
|
20496
|
-
} : _a$controls,
|
|
20497
|
-
_a$displayTimeInMap = _a.displayTimeInMap,
|
|
20498
|
-
displayTimeInMap = _a$displayTimeInMap === void 0 ? true : _a$displayTimeInMap,
|
|
20499
|
-
_onWMJSMount = _a.onWMJSMount,
|
|
20500
|
-
props = __rest$1(_a, ["children", "controls", "displayTimeInMap", "onWMJSMount"]);
|
|
20501
|
-
var dimensions = props.dimensions,
|
|
20502
|
-
mapIdProp = props.mapId;
|
|
20503
|
-
var wmjsMapRef = React.useRef(null);
|
|
20504
|
-
var mapId = React.useRef(mapIdProp).current;
|
|
20505
|
-
if (mapIdProp !== mapId) {
|
|
20506
|
-
console.warn("Warning, MapId ".concat(mapId, " has been updated to ").concat(mapIdProp, " on an already mounted component. Keeping ").concat(mapId));
|
|
20507
|
-
}
|
|
20508
|
-
var _useResizeDetector = useResizeDetector(),
|
|
20509
|
-
ref = _useResizeDetector.ref,
|
|
20510
|
-
height = _useResizeDetector.height,
|
|
20511
|
-
width = _useResizeDetector.width;
|
|
20512
|
-
React.useEffect(function () {
|
|
20513
|
-
if (wmjsMapRef.current && !!width && !!height) {
|
|
20514
|
-
var _wmjsMapRef$current$g = wmjsMapRef.current.getSize(),
|
|
20515
|
-
mapHeight = _wmjsMapRef$current$g.height,
|
|
20516
|
-
mapWidth = _wmjsMapRef$current$g.width;
|
|
20517
|
-
if (width !== mapWidth || height !== mapHeight) {
|
|
20518
|
-
wmjsMapRef.current.setSize(Math.ceil(width), Math.ceil(height));
|
|
20519
|
-
}
|
|
20520
|
-
}
|
|
20521
|
-
}, [width, height]);
|
|
20522
|
-
var reactMapViewProps = Object.assign(Object.assign({}, props), {
|
|
20523
|
-
mapId: mapId
|
|
20524
|
-
});
|
|
20525
|
-
return /*#__PURE__*/React.createElement(Box$2, {
|
|
20526
|
-
ref: ref,
|
|
20527
|
-
sx: {
|
|
20528
|
-
display: 'grid',
|
|
20529
|
-
width: '100%',
|
|
20530
|
-
height: '100%',
|
|
20531
|
-
position: 'relative',
|
|
20532
|
-
overflow: 'hidden'
|
|
20533
|
-
}
|
|
20534
|
-
}, controls && controls.zoomControls && /*#__PURE__*/React.createElement(MapControls, {
|
|
20535
|
-
style: {
|
|
20536
|
-
top: 0,
|
|
20537
|
-
position: 'absolute'
|
|
20538
|
-
}
|
|
20539
|
-
}, /*#__PURE__*/React.createElement(ZoomControls, {
|
|
20540
|
-
onZoomIn: function onZoomIn() {
|
|
20541
|
-
var wmjsMap = webmapUtils.getWMJSMapById(mapId);
|
|
20542
|
-
wmjsMap.zoomIn(undefined);
|
|
20543
|
-
},
|
|
20544
|
-
onZoomOut: function onZoomOut() {
|
|
20545
|
-
var wmjsMap = webmapUtils.getWMJSMapById(mapId);
|
|
20546
|
-
wmjsMap.zoomOut();
|
|
20547
|
-
},
|
|
20548
|
-
onZoomReset: function onZoomReset() {
|
|
20549
|
-
var wmjsMap = webmapUtils.getWMJSMapById(mapId);
|
|
20550
|
-
wmjsMap.zoomToLayer(wmjsMap.getActiveLayer());
|
|
20551
|
-
}
|
|
20552
|
-
})), /*#__PURE__*/React.createElement(Box$2, {
|
|
20553
|
-
sx: {
|
|
20554
|
-
gridColumnStart: 1,
|
|
20555
|
-
gridRowStart: 1
|
|
20556
|
-
}
|
|
20557
|
-
}, /*#__PURE__*/React.createElement(ReactMapView, Object.assign({}, reactMapViewProps, {
|
|
20558
|
-
showLegend: false,
|
|
20559
|
-
displayTimeInMap: false,
|
|
20560
|
-
onWMJSMount: function onWMJSMount(id) {
|
|
20561
|
-
wmjsMapRef.current = webmapUtils.getWMJSMapById(id);
|
|
20562
|
-
if (_onWMJSMount) {
|
|
20563
|
-
_onWMJSMount(id);
|
|
20564
|
-
}
|
|
20565
|
-
}
|
|
20566
|
-
}), children)), displayTimeInMap && dimensions && /*#__PURE__*/React.createElement(MapTime, {
|
|
20567
|
-
dimensions: dimensions
|
|
20568
|
-
}));
|
|
20569
|
-
};
|
|
20570
|
-
|
|
20571
|
-
var useTouchZoomPan = function useTouchZoomPan(mapIsActive, mapId) {
|
|
20572
|
-
var _React$useState = React.useState(0),
|
|
20573
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
20574
|
-
firstTouchX = _React$useState2[0],
|
|
20575
|
-
setFirstTouchX = _React$useState2[1];
|
|
20576
|
-
var _React$useState3 = React.useState(0),
|
|
20577
|
-
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
20578
|
-
firstTouchY = _React$useState4[0],
|
|
20579
|
-
setFirstTouchY = _React$useState4[1];
|
|
20580
|
-
var _React$useState5 = React.useState(0),
|
|
20581
|
-
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
20582
|
-
secondTouchX = _React$useState6[0],
|
|
20583
|
-
setSecondTouchX = _React$useState6[1];
|
|
20584
|
-
var _React$useState7 = React.useState(0),
|
|
20585
|
-
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
20586
|
-
secondTouchY = _React$useState8[0],
|
|
20587
|
-
setSecondTouchY = _React$useState8[1];
|
|
20588
|
-
var _React$useState9 = React.useState(0),
|
|
20589
|
-
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
20590
|
-
prevDist = _React$useState10[0],
|
|
20591
|
-
setPrevDist = _React$useState10[1];
|
|
20592
|
-
var isPanning = function isPanning(touches) {
|
|
20593
|
-
return (touches === null || touches === void 0 ? void 0 : touches.length) === 1;
|
|
20594
|
-
};
|
|
20595
|
-
var isZooming = function isZooming(touches) {
|
|
20596
|
-
return (touches === null || touches === void 0 ? void 0 : touches.length) === 2;
|
|
20597
|
-
};
|
|
20598
|
-
var isCanvasElement = React.useCallback(function (event) {
|
|
20599
|
-
var target = event.target;
|
|
20600
|
-
return target.tagName === 'CANVAS';
|
|
20601
|
-
}, []);
|
|
20602
|
-
var distance = function distance(x1, y1, x2, y2) {
|
|
20603
|
-
var dx = x1 - x2;
|
|
20604
|
-
var dy = y1 - y2;
|
|
20605
|
-
return Math.sqrt(dx * dx + dy * dy);
|
|
20606
|
-
};
|
|
20607
|
-
var isMatchingWebMapNumbers = function isMatchingWebMapNumbers(firstStr, secondStr) {
|
|
20608
|
-
// Returns true if the same web map (id) number were encountered in both given strings, false otherwise.
|
|
20609
|
-
var webMapNumberBaseFormat = 'WebMapJSMapNo_';
|
|
20610
|
-
if (!firstStr.includes(webMapNumberBaseFormat) || !secondStr.includes(webMapNumberBaseFormat)) {
|
|
20611
|
-
return false;
|
|
19993
|
+
var useTouchZoomPan = function useTouchZoomPan(mapIsActive, mapId) {
|
|
19994
|
+
var _React$useState = React.useState(0),
|
|
19995
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
19996
|
+
firstTouchX = _React$useState2[0],
|
|
19997
|
+
setFirstTouchX = _React$useState2[1];
|
|
19998
|
+
var _React$useState3 = React.useState(0),
|
|
19999
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
20000
|
+
firstTouchY = _React$useState4[0],
|
|
20001
|
+
setFirstTouchY = _React$useState4[1];
|
|
20002
|
+
var _React$useState5 = React.useState(0),
|
|
20003
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
20004
|
+
secondTouchX = _React$useState6[0],
|
|
20005
|
+
setSecondTouchX = _React$useState6[1];
|
|
20006
|
+
var _React$useState7 = React.useState(0),
|
|
20007
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
20008
|
+
secondTouchY = _React$useState8[0],
|
|
20009
|
+
setSecondTouchY = _React$useState8[1];
|
|
20010
|
+
var _React$useState9 = React.useState(0),
|
|
20011
|
+
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
20012
|
+
prevDist = _React$useState10[0],
|
|
20013
|
+
setPrevDist = _React$useState10[1];
|
|
20014
|
+
var isPanning = function isPanning(touches) {
|
|
20015
|
+
return (touches === null || touches === void 0 ? void 0 : touches.length) === 1;
|
|
20016
|
+
};
|
|
20017
|
+
var isZooming = function isZooming(touches) {
|
|
20018
|
+
return (touches === null || touches === void 0 ? void 0 : touches.length) === 2;
|
|
20019
|
+
};
|
|
20020
|
+
var isCanvasElement = React.useCallback(function (event) {
|
|
20021
|
+
var target = event.target;
|
|
20022
|
+
return target.tagName === 'CANVAS';
|
|
20023
|
+
}, []);
|
|
20024
|
+
var distance = function distance(x1, y1, x2, y2) {
|
|
20025
|
+
var dx = x1 - x2;
|
|
20026
|
+
var dy = y1 - y2;
|
|
20027
|
+
return Math.sqrt(dx * dx + dy * dy);
|
|
20028
|
+
};
|
|
20029
|
+
var isMatchingWebMapNumbers = function isMatchingWebMapNumbers(firstStr, secondStr) {
|
|
20030
|
+
// Returns true if the same web map (id) number were encountered in both given strings, false otherwise.
|
|
20031
|
+
var webMapNumberBaseFormat = 'WebMapJSMapNo_';
|
|
20032
|
+
if (!firstStr.includes(webMapNumberBaseFormat) || !secondStr.includes(webMapNumberBaseFormat)) {
|
|
20033
|
+
return false;
|
|
20612
20034
|
}
|
|
20613
20035
|
var numberMatcher = /\d+/;
|
|
20614
20036
|
var firstNumber = firstStr.match(numberMatcher)[0];
|
|
@@ -20809,7 +20231,7 @@ var ORIGIN_REACTMAPVIEWCONNECT_ONMAPCHANGEDIMENSION = 'ORIGIN_REACTMAPVIEWCONNEC
|
|
|
20809
20231
|
var MapViewConnect = function MapViewConnect(_a) {
|
|
20810
20232
|
var mapId = _a.mapId,
|
|
20811
20233
|
children = _a.children,
|
|
20812
|
-
props = __rest
|
|
20234
|
+
props = __rest(_a, ["mapId", "children"]);
|
|
20813
20235
|
var mapDimensions = useSelector(function (store) {
|
|
20814
20236
|
return mapSelectors.getMapDimensions(store, mapId);
|
|
20815
20237
|
});
|
|
@@ -21022,78 +20444,6 @@ var MapViewConnect = function MapViewConnect(_a) {
|
|
|
21022
20444
|
}), children));
|
|
21023
20445
|
};
|
|
21024
20446
|
|
|
21025
|
-
/* *
|
|
21026
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
21027
|
-
* you may not use this file except in compliance with the License.
|
|
21028
|
-
* You may obtain a copy of the License at
|
|
21029
|
-
*
|
|
21030
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
21031
|
-
*
|
|
21032
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
21033
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
21034
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
21035
|
-
* See the License for the specific language governing permissions and
|
|
21036
|
-
* limitations under the License.
|
|
21037
|
-
*
|
|
21038
|
-
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
21039
|
-
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
21040
|
-
* */
|
|
21041
|
-
var LegendDialog = function LegendDialog(_ref) {
|
|
21042
|
-
var layers = _ref.layers,
|
|
21043
|
-
isOpen = _ref.isOpen,
|
|
21044
|
-
onClose = _ref.onClose,
|
|
21045
|
-
_ref$onMouseDown = _ref.onMouseDown,
|
|
21046
|
-
onMouseDown = _ref$onMouseDown === void 0 ? function () {} : _ref$onMouseDown,
|
|
21047
|
-
mapId = _ref.mapId,
|
|
21048
|
-
_ref$showMapId = _ref.showMapId,
|
|
21049
|
-
showMapId = _ref$showMapId === void 0 ? false : _ref$showMapId,
|
|
21050
|
-
_ref$order = _ref.order,
|
|
21051
|
-
order = _ref$order === void 0 ? 0 : _ref$order,
|
|
21052
|
-
_ref$source = _ref.source,
|
|
21053
|
-
source = _ref$source === void 0 ? 'app' : _ref$source;
|
|
21054
|
-
return /*#__PURE__*/React.createElement(ToolContainerDraggable, {
|
|
21055
|
-
startPosition: {
|
|
21056
|
-
right: 20,
|
|
21057
|
-
top: 50
|
|
21058
|
-
},
|
|
21059
|
-
minWidth: 100,
|
|
21060
|
-
onClose: onClose,
|
|
21061
|
-
title: showMapId ? "Legend ".concat(mapId) : 'Legend',
|
|
21062
|
-
initialMaxHeight: 440,
|
|
21063
|
-
isOpen: isOpen,
|
|
21064
|
-
"data-testid": "moveable-legend",
|
|
21065
|
-
bounds: "parent",
|
|
21066
|
-
onMouseDown: onMouseDown,
|
|
21067
|
-
order: order,
|
|
21068
|
-
source: source
|
|
21069
|
-
}, /*#__PURE__*/React.createElement(Box$2, {
|
|
21070
|
-
sx: {
|
|
21071
|
-
padding: 0.5
|
|
21072
|
-
}
|
|
21073
|
-
}, layers && layers.length > 0 ? /*#__PURE__*/React.createElement(Box$2, {
|
|
21074
|
-
"data-testid": "LegendList",
|
|
21075
|
-
sx: {
|
|
21076
|
-
display: 'flex',
|
|
21077
|
-
flexDirection: 'column',
|
|
21078
|
-
'&>div:last-child': {
|
|
21079
|
-
marginBottom: 0
|
|
21080
|
-
}
|
|
21081
|
-
}
|
|
21082
|
-
}, layers.map(function (layer) {
|
|
21083
|
-
return /*#__PURE__*/React.createElement(Legend, {
|
|
21084
|
-
key: layer.id,
|
|
21085
|
-
layer: layer
|
|
21086
|
-
});
|
|
21087
|
-
})) : /*#__PURE__*/React.createElement(Typography, {
|
|
21088
|
-
"data-testid": "NoLayers",
|
|
21089
|
-
variant: "body1",
|
|
21090
|
-
style: {
|
|
21091
|
-
fontWeight: 500,
|
|
21092
|
-
fontSize: 14
|
|
21093
|
-
}
|
|
21094
|
-
}, "No layers")));
|
|
21095
|
-
};
|
|
21096
|
-
|
|
21097
20447
|
var LegendConnectComponent = function LegendConnectComponent(_ref) {
|
|
21098
20448
|
var _ref$showMapId = _ref.showMapId,
|
|
21099
20449
|
showMapId = _ref$showMapId === void 0 ? false : _ref$showMapId,
|
|
@@ -21191,7 +20541,7 @@ var LegendConnectComponent = function LegendConnectComponent(_ref) {
|
|
|
21191
20541
|
var LegendConnect = function LegendConnect(_a) {
|
|
21192
20542
|
var _a$showMapId = _a.showMapId,
|
|
21193
20543
|
showMapId = _a$showMapId === void 0 ? false : _a$showMapId,
|
|
21194
|
-
props = __rest
|
|
20544
|
+
props = __rest(_a, ["showMapId"]);
|
|
21195
20545
|
return /*#__PURE__*/React.createElement(LegendConnectComponent, Object.assign({
|
|
21196
20546
|
showMapId: showMapId
|
|
21197
20547
|
}, props));
|
|
@@ -24818,41 +24168,138 @@ function useMapDrawContext() {
|
|
|
24818
24168
|
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
24819
24169
|
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
24820
24170
|
* */
|
|
24171
|
+
var areaDialogType$1 = uiTypes.DialogTypes.AreaManager;
|
|
24172
|
+
var useAreaDrawDialogAction = function useAreaDrawDialogAction(_ref) {
|
|
24173
|
+
var mapId = _ref.mapId,
|
|
24174
|
+
source = _ref.source;
|
|
24175
|
+
var dispatch = useDispatch();
|
|
24176
|
+
var drawingDialogType = "".concat(uiTypes.DialogTypes.DockedDrawingTool, "-").concat(mapId);
|
|
24177
|
+
var geoJSONLayerId = "".concat(mapId, "-geosjon");
|
|
24178
|
+
var currentLayer = useSelector(function (store) {
|
|
24179
|
+
return layerSelectors.getLayerById(store, geoJSONLayerId);
|
|
24180
|
+
});
|
|
24181
|
+
var openAreaDialog = React__default.useCallback(function () {
|
|
24182
|
+
dispatch(uiActions.setActiveMapIdForDialog({
|
|
24183
|
+
type: areaDialogType$1,
|
|
24184
|
+
mapId: mapId,
|
|
24185
|
+
setOpen: true,
|
|
24186
|
+
source: source
|
|
24187
|
+
}));
|
|
24188
|
+
}, [dispatch, mapId, source]);
|
|
24189
|
+
var openDrawDialog = React__default.useCallback(function () {
|
|
24190
|
+
dispatch(uiActions.setActiveMapIdForDialog({
|
|
24191
|
+
type: drawingDialogType,
|
|
24192
|
+
mapId: mapId,
|
|
24193
|
+
setOpen: true,
|
|
24194
|
+
source: source
|
|
24195
|
+
}));
|
|
24196
|
+
}, [dispatch, mapId, source, drawingDialogType]);
|
|
24197
|
+
var closeDrawDialog = React__default.useCallback(function () {
|
|
24198
|
+
dispatch(drawActions.setDrawValues({
|
|
24199
|
+
mapId: mapId,
|
|
24200
|
+
area: undefined,
|
|
24201
|
+
areaName: '',
|
|
24202
|
+
id: ''
|
|
24203
|
+
}));
|
|
24204
|
+
dispatch(uiActions.setActiveMapIdForDialog({
|
|
24205
|
+
type: drawingDialogType,
|
|
24206
|
+
mapId: mapId,
|
|
24207
|
+
setOpen: false,
|
|
24208
|
+
source: source
|
|
24209
|
+
}));
|
|
24210
|
+
}, [dispatch, mapId, drawingDialogType, source]);
|
|
24211
|
+
var closeAreaDialog = React__default.useCallback(function () {
|
|
24212
|
+
if (currentLayer) {
|
|
24213
|
+
dispatch(mapStoreActions.layerDelete({
|
|
24214
|
+
layerId: geoJSONLayerId,
|
|
24215
|
+
mapId: mapId,
|
|
24216
|
+
layerIndex: 0
|
|
24217
|
+
}));
|
|
24218
|
+
}
|
|
24219
|
+
dispatch(uiActions.setActiveMapIdForDialog({
|
|
24220
|
+
type: areaDialogType$1,
|
|
24221
|
+
mapId: mapId,
|
|
24222
|
+
setOpen: false,
|
|
24223
|
+
source: source
|
|
24224
|
+
}));
|
|
24225
|
+
dispatch(drawActions.setDrawValues({
|
|
24226
|
+
mapId: mapId,
|
|
24227
|
+
area: undefined,
|
|
24228
|
+
areaName: '',
|
|
24229
|
+
id: ''
|
|
24230
|
+
}));
|
|
24231
|
+
}, [dispatch, mapId, source, currentLayer, geoJSONLayerId]);
|
|
24232
|
+
return {
|
|
24233
|
+
closeDrawDialog: closeDrawDialog,
|
|
24234
|
+
closeAreaDialog: closeAreaDialog,
|
|
24235
|
+
openAreaDialog: openAreaDialog,
|
|
24236
|
+
openDrawDialog: openDrawDialog
|
|
24237
|
+
};
|
|
24238
|
+
};
|
|
24239
|
+
|
|
24240
|
+
/* *
|
|
24241
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
24242
|
+
* you may not use this file except in compliance with the License.
|
|
24243
|
+
* You may obtain a copy of the License at
|
|
24244
|
+
*
|
|
24245
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
24246
|
+
*
|
|
24247
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
24248
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
24249
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
24250
|
+
* See the License for the specific language governing permissions and
|
|
24251
|
+
* limitations under the License.
|
|
24252
|
+
*
|
|
24253
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
24254
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
24255
|
+
* */
|
|
24256
|
+
var areaDialogType = uiTypes.DialogTypes.AreaManager;
|
|
24821
24257
|
var DrawingToolMapButtonConnect = function DrawingToolMapButtonConnect(_ref) {
|
|
24822
24258
|
var mapId = _ref.mapId,
|
|
24823
24259
|
_ref$source = _ref.source,
|
|
24824
24260
|
source = _ref$source === void 0 ? 'app' : _ref$source;
|
|
24825
|
-
var dispatch = useDispatch();
|
|
24826
24261
|
var _useMapDrawContext = useMapDrawContext(),
|
|
24827
24262
|
deactivateTool = _useMapDrawContext.deactivateTool;
|
|
24828
24263
|
// TODO: Re-enable when we put back in the floating version when drawing tools become available: https://gitlab.com/opengeoweb/opengeoweb/-/issues/3872
|
|
24829
|
-
var
|
|
24830
|
-
// const
|
|
24264
|
+
var drawingDialogType = "".concat(uiTypes.DialogTypes.DockedDrawingTool, "-").concat(mapId);
|
|
24265
|
+
// const drawingDialogType = isMultiMap
|
|
24831
24266
|
// ? `${uiTypes.DialogTypes.DrawingTool}-${mapId}`
|
|
24832
24267
|
// : uiTypes.DialogTypes.DrawingTool;
|
|
24268
|
+
var _useAreaDrawDialogAct = useAreaDrawDialogAction({
|
|
24269
|
+
mapId: mapId,
|
|
24270
|
+
source: source
|
|
24271
|
+
}),
|
|
24272
|
+
closeAreaDialog = _useAreaDrawDialogAct.closeAreaDialog,
|
|
24273
|
+
openDrawDialog = _useAreaDrawDialogAct.openDrawDialog,
|
|
24274
|
+
closeDrawDialog = _useAreaDrawDialogAct.closeDrawDialog;
|
|
24833
24275
|
var currentActiveMapId = useSelector(function (store) {
|
|
24834
|
-
return uiSelectors.getDialogMapId(store,
|
|
24276
|
+
return uiSelectors.getDialogMapId(store, drawingDialogType);
|
|
24835
24277
|
});
|
|
24836
|
-
var
|
|
24837
|
-
return uiSelectors.getisDialogOpen(store,
|
|
24278
|
+
var isDrawDialogOpen = useSelector(function (store) {
|
|
24279
|
+
return uiSelectors.getisDialogOpen(store, drawingDialogType);
|
|
24838
24280
|
});
|
|
24839
|
-
var
|
|
24840
|
-
|
|
24841
|
-
|
|
24842
|
-
|
|
24281
|
+
var isAreaDialogOpen = useSelector(function (store) {
|
|
24282
|
+
return uiSelectors.getisDialogOpen(store, areaDialogType);
|
|
24283
|
+
});
|
|
24284
|
+
var openDrawingDialog = React.useCallback(function () {
|
|
24285
|
+
if (isAreaDialogOpen) {
|
|
24286
|
+
closeAreaDialog();
|
|
24843
24287
|
}
|
|
24844
|
-
|
|
24845
|
-
|
|
24846
|
-
|
|
24847
|
-
|
|
24848
|
-
|
|
24849
|
-
|
|
24850
|
-
|
|
24851
|
-
|
|
24288
|
+
openDrawDialog();
|
|
24289
|
+
}, [isAreaDialogOpen, closeAreaDialog, openDrawDialog]);
|
|
24290
|
+
var closeDrawingDialog = React.useCallback(function () {
|
|
24291
|
+
deactivateTool();
|
|
24292
|
+
closeDrawDialog();
|
|
24293
|
+
}, [deactivateTool, closeDrawDialog]);
|
|
24294
|
+
var onClick = React.useCallback(function () {
|
|
24295
|
+
var shouldOpen = currentActiveMapId !== mapId ? true : !isDrawDialogOpen;
|
|
24296
|
+
shouldOpen ? openDrawingDialog() : closeDrawingDialog();
|
|
24297
|
+
}, [currentActiveMapId, isDrawDialogOpen, mapId, closeDrawingDialog, openDrawingDialog]);
|
|
24298
|
+
var isOpen = currentActiveMapId === mapId && isDrawDialogOpen;
|
|
24852
24299
|
return /*#__PURE__*/React.createElement(MapControlButton, {
|
|
24853
24300
|
title: "Drawing Toolbox",
|
|
24854
24301
|
"data-testid": "drawingToolButton",
|
|
24855
|
-
onClick:
|
|
24302
|
+
onClick: onClick,
|
|
24856
24303
|
isActive: isOpen
|
|
24857
24304
|
}, /*#__PURE__*/React.createElement(DrawPolygon, null));
|
|
24858
24305
|
};
|
|
@@ -24992,7 +24439,8 @@ var opacityOptions = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0];
|
|
|
24992
24439
|
var getAreaName = function getAreaName(areaName) {
|
|
24993
24440
|
return areaName || "".concat(dateUtils.dateToString(new Date(), 'dd/MM/yyyy HH:mm', true), " UTC");
|
|
24994
24441
|
};
|
|
24995
|
-
var SAVE_AREA_BUTTON = 'Save area';
|
|
24442
|
+
var SAVE_AREA_BUTTON = 'Save new area';
|
|
24443
|
+
var UPDATE_AREA_BUTTON = 'Update area';
|
|
24996
24444
|
var INPUT_AREA = 'Area name';
|
|
24997
24445
|
var INPUT_OPACITY = 'Opacity';
|
|
24998
24446
|
var DRAW_EXIT_MODE_MESSAGE = 'press ESC to exit draw mode';
|
|
@@ -25020,7 +24468,7 @@ var DrawingToolForm = function DrawingToolForm(_ref) {
|
|
|
25020
24468
|
handleSubmit(function (formValues) {
|
|
25021
24469
|
// remove unneeded properties
|
|
25022
24470
|
formValues.opacity;
|
|
25023
|
-
var allFormValues = __rest
|
|
24471
|
+
var allFormValues = __rest(formValues, ["opacity"]);
|
|
25024
24472
|
onSubmitForm(Object.assign(Object.assign({}, allFormValues), {
|
|
25025
24473
|
area: geoJSON,
|
|
25026
24474
|
id: id
|
|
@@ -25168,11 +24616,14 @@ var DrawingToolForm = function DrawingToolForm(_ref) {
|
|
|
25168
24616
|
variant: "primary",
|
|
25169
24617
|
onClick: onSubmit,
|
|
25170
24618
|
sx: {
|
|
25171
|
-
width: '100%'
|
|
24619
|
+
width: '100%',
|
|
24620
|
+
textTransform: 'none'
|
|
25172
24621
|
},
|
|
25173
24622
|
"data-testid": "saveDrawingFormButton",
|
|
25174
|
-
|
|
25175
|
-
|
|
24623
|
+
// TODO: re-enable for: https://gitlab.com/opengeoweb/opengeoweb/-/issues/4080
|
|
24624
|
+
// disabled={isLoading || hasErrors}
|
|
24625
|
+
disabled: isLoading || id !== '' || hasErrors
|
|
24626
|
+
}, id !== '' ? UPDATE_AREA_BUTTON : SAVE_AREA_BUTTON))));
|
|
25176
24627
|
};
|
|
25177
24628
|
var Wrapper = function Wrapper(props) {
|
|
25178
24629
|
var _props$id = props.id,
|
|
@@ -25217,24 +24668,13 @@ var DrawingToolFormConnect = function DrawingToolFormConnect(_ref) {
|
|
|
25217
24668
|
return uiSelectors.getDialogIsLoading(store, "".concat(uiTypes.DialogTypes.DockedDrawingTool, "-").concat(mapId));
|
|
25218
24669
|
});
|
|
25219
24670
|
var onSubmitForm = function onSubmitForm(formValues) {
|
|
25220
|
-
dispatch(drawActions.submitDrawValues(
|
|
25221
|
-
mapId: mapId
|
|
25222
|
-
}, formValues)));
|
|
25223
|
-
};
|
|
25224
|
-
var onUnMount = function onUnMount() {
|
|
25225
|
-
dispatch(drawActions.setDrawValues({
|
|
24671
|
+
dispatch(drawActions.submitDrawValues({
|
|
25226
24672
|
mapId: mapId,
|
|
25227
|
-
area:
|
|
25228
|
-
|
|
25229
|
-
|
|
24673
|
+
area: formValues.area,
|
|
24674
|
+
name: formValues.areaName,
|
|
24675
|
+
scope: 'user'
|
|
25230
24676
|
}));
|
|
25231
24677
|
};
|
|
25232
|
-
React.useEffect(function () {
|
|
25233
|
-
return function () {
|
|
25234
|
-
onUnMount();
|
|
25235
|
-
};
|
|
25236
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
25237
|
-
}, []);
|
|
25238
24678
|
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
25239
24679
|
id: drawing === null || drawing === void 0 ? void 0 : drawing.id,
|
|
25240
24680
|
onSubmitForm: onSubmitForm,
|
|
@@ -25283,7 +24723,6 @@ var DrawingToolConnect = function DrawingToolConnect(_ref) {
|
|
|
25283
24723
|
isDocked = _ref$isDocked === void 0 ? false : _ref$isDocked,
|
|
25284
24724
|
_ref$source = _ref.source,
|
|
25285
24725
|
source = _ref$source === void 0 ? 'app' : _ref$source;
|
|
25286
|
-
// const dispatch = useDispatch();
|
|
25287
24726
|
var dialogType = getDialogType(initialMapId, isMultiMap, isDocked);
|
|
25288
24727
|
var _useMapDrawContext = useMapDrawContext(),
|
|
25289
24728
|
deactivateTool = _useMapDrawContext.deactivateTool;
|
|
@@ -25293,10 +24732,14 @@ var DrawingToolConnect = function DrawingToolConnect(_ref) {
|
|
|
25293
24732
|
// In case of a docked drawing toolbox or multimap, use the map id that is passed
|
|
25294
24733
|
// For floating drawingtoolbox, use the currently active, selected mapid
|
|
25295
24734
|
var mapId = initialMapId || activeMapId;
|
|
24735
|
+
var _useAreaDrawDialogAct = useAreaDrawDialogAction({
|
|
24736
|
+
mapId: mapId,
|
|
24737
|
+
source: source
|
|
24738
|
+
}),
|
|
24739
|
+
closeDrawDialog = _useAreaDrawDialogAct.closeDrawDialog;
|
|
25296
24740
|
var _useSetupDialog = useSetupDialog(dialogType, source),
|
|
25297
24741
|
dialogOrder = _useSetupDialog.dialogOrder,
|
|
25298
24742
|
setDialogOrder = _useSetupDialog.setDialogOrder,
|
|
25299
|
-
onCloseDialog = _useSetupDialog.onCloseDialog,
|
|
25300
24743
|
isDialogOpen = _useSetupDialog.isDialogOpen,
|
|
25301
24744
|
uiSource = _useSetupDialog.uiSource,
|
|
25302
24745
|
uiIsLoading = _useSetupDialog.uiIsLoading,
|
|
@@ -25327,8 +24770,8 @@ var DrawingToolConnect = function DrawingToolConnect(_ref) {
|
|
|
25327
24770
|
// };
|
|
25328
24771
|
var shownTitle = showMapIdInTitle ? "".concat(title, " ").concat(mapId) : title;
|
|
25329
24772
|
var onClose = function onClose() {
|
|
25330
|
-
onCloseDialog();
|
|
25331
24773
|
deactivateTool();
|
|
24774
|
+
closeDrawDialog();
|
|
25332
24775
|
};
|
|
25333
24776
|
if (!isDialogOpen) {
|
|
25334
24777
|
return null;
|
|
@@ -25417,7 +24860,7 @@ var BaseConfigurableMapConnect = function BaseConfigurableMapConnect(_a) {
|
|
|
25417
24860
|
shouldDisplayDrawControls = _a$shouldDisplayDrawC === void 0 ? false : _a$shouldDisplayDrawC,
|
|
25418
24861
|
mapControls = _a.mapControls,
|
|
25419
24862
|
children = _a.children,
|
|
25420
|
-
props = __rest
|
|
24863
|
+
props = __rest(_a, ["id", "dockedLayerManagerSize", "title", "layers", "dimensions", "shouldAutoUpdate", "shouldAnimate", "bbox", "srs", "shouldShowZoomControls", "displayMapPin", "showTimeSlider", "disableTimeSlider", "displayTimeInMap", "displayLayerManagerAndLegendButtonInMap", "displayDimensionSelectButtonInMap", "multiLegend", "shouldShowLayerManager", "shouldShowDockedLayerManager", "showClock", "displayGetFeatureInfoButtonInMap", "shouldDisplayDrawControls", "mapControls", "children"]);
|
|
25421
24864
|
var dispatch = useDispatch();
|
|
25422
24865
|
var mapId = React__default.useRef(id || webmapUtils.generateMapId()).current;
|
|
25423
24866
|
React__default.useEffect(function () {
|
|
@@ -25672,524 +25115,6 @@ var MultiMapViewConnect = function MultiMapViewConnect(_ref) {
|
|
|
25672
25115
|
}));
|
|
25673
25116
|
};
|
|
25674
25117
|
|
|
25675
|
-
/* *
|
|
25676
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
25677
|
-
* you may not use this file except in compliance with the License.
|
|
25678
|
-
* You may obtain a copy of the License at
|
|
25679
|
-
*
|
|
25680
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
25681
|
-
*
|
|
25682
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
25683
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
25684
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
25685
|
-
* See the License for the specific language governing permissions and
|
|
25686
|
-
* limitations under the License.
|
|
25687
|
-
*
|
|
25688
|
-
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
25689
|
-
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
25690
|
-
* */
|
|
25691
|
-
var DWD = {
|
|
25692
|
-
name: 'DWD',
|
|
25693
|
-
url: 'https://maps.dwd.de/geoserver/ows?',
|
|
25694
|
-
id: 'dwd'
|
|
25695
|
-
};
|
|
25696
|
-
var nationaalgeoregister = {
|
|
25697
|
-
name: 'nationaalgeoregister.nl',
|
|
25698
|
-
url: 'https://geodata.nationaalgeoregister.nl/cbsgebiedsindelingen/wms?request=GetCapabilities&service=wms',
|
|
25699
|
-
id: 'nationaalgeoregister'
|
|
25700
|
-
};
|
|
25701
|
-
var KNMImsgcpp = {
|
|
25702
|
-
name: 'KNMImsgcpp',
|
|
25703
|
-
url: 'https://adaguc-server-msg-cpp-portal.pmc.knmi.cloud/wms?DATASET=msgrt&',
|
|
25704
|
-
id: 'msgcpp-ogc-realtime'
|
|
25705
|
-
};
|
|
25706
|
-
var HeiGit = {
|
|
25707
|
-
name: 'HeiGit',
|
|
25708
|
-
url: 'https://maps.heigit.org/osm-wms/service',
|
|
25709
|
-
id: 'HeiGit-osm-wms'
|
|
25710
|
-
};
|
|
25711
|
-
var ArcGisCanvas = {
|
|
25712
|
-
name: 'ArcGisCanvas',
|
|
25713
|
-
url: 'https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/',
|
|
25714
|
-
id: 'ArcGisCanvas'
|
|
25715
|
-
};
|
|
25716
|
-
var KNMIgeoservicesRadar = {
|
|
25717
|
-
name: 'KNMIgeoservicesRadar',
|
|
25718
|
-
url: 'https://geoservices.knmi.nl/wms?dataset=RADAR&',
|
|
25719
|
-
id: 'KNMIgeoservicesRadar'
|
|
25720
|
-
};
|
|
25721
|
-
var KNMIgeoservicesObs = {
|
|
25722
|
-
name: 'KNMIgeoservicesObs',
|
|
25723
|
-
url: 'https://geoservices.knmi.nl/adagucserver?dataset=OBS',
|
|
25724
|
-
id: 'KNMIgeoservicesObs'
|
|
25725
|
-
};
|
|
25726
|
-
var KNMIgeoservicesKlimaatAtlas = {
|
|
25727
|
-
name: 'KNMIgeoservicesKlimaatAtlas',
|
|
25728
|
-
url: 'https://geoservices.knmi.nl/wms?DATASET=gsie-dataset&SERVICE=WMS&',
|
|
25729
|
-
id: 'KNMIgeoservicesKlimaatAtlas'
|
|
25730
|
-
};
|
|
25731
|
-
var KNMIgeoservicesHarmonie = {
|
|
25732
|
-
name: 'KNMIgeoservicesHarmonie',
|
|
25733
|
-
url: 'https://geoservices.knmi.nl/wms?DATASET=HARM_N25&',
|
|
25734
|
-
id: 'KNMIgeoservicesKliKNMIgeoservicesHarmoniemaatAtlas'
|
|
25735
|
-
};
|
|
25736
|
-
var KNMIgeoservicesHarmonieMLService = {
|
|
25737
|
-
name: 'KNMI Harmonie ML',
|
|
25738
|
-
url: 'https://geoservices.knmi.nl/wms?DATASET=HARM_N25_ML&SERVICE=WMS&',
|
|
25739
|
-
id: 'harmonieML'
|
|
25740
|
-
};
|
|
25741
|
-
var MetNorwayService = {
|
|
25742
|
-
name: 'MetNorwayService',
|
|
25743
|
-
url: 'https://wms-e1.geoweb.met.no/wms?',
|
|
25744
|
-
id: 'MetNorwayService'
|
|
25745
|
-
};
|
|
25746
|
-
var FMIopenwms = {
|
|
25747
|
-
name: 'FMIopenwms',
|
|
25748
|
-
url: 'https://openwms.fmi.fi/geoserver/wms?',
|
|
25749
|
-
id: 'FMIopenwms'
|
|
25750
|
-
};
|
|
25751
|
-
var DWDObservations = {
|
|
25752
|
-
name: 'DWDObservations',
|
|
25753
|
-
url: 'https://maps.dwd.de/geoserver/dwd/Wetter_Beobachtungen/ows?',
|
|
25754
|
-
id: 'DWDObservations'
|
|
25755
|
-
};
|
|
25756
|
-
var DWDWarnings = {
|
|
25757
|
-
name: 'DWDWarnings',
|
|
25758
|
-
url: 'https://maps.dwd.de/geoserver/dwd/Warnungen_Gemeinden_vereinigt/ows?',
|
|
25759
|
-
id: 'DWDWarnings'
|
|
25760
|
-
};
|
|
25761
|
-
var DWDWXProdukt = {
|
|
25762
|
-
name: 'DWDWXProdukt',
|
|
25763
|
-
url: 'https://maps.dwd.de/geoserver/dwd/WX-Produkt/ows?',
|
|
25764
|
-
id: 'DWDWXProdukt'
|
|
25765
|
-
};
|
|
25766
|
-
var EUMETSAT = {
|
|
25767
|
-
name: 'EUMETSAT',
|
|
25768
|
-
url: 'https://view.eumetsat.int/geoserver/wms?',
|
|
25769
|
-
id: 'EUMETSAT'
|
|
25770
|
-
};
|
|
25771
|
-
var eumetviewEUMETSAT = {
|
|
25772
|
-
name: 'eumetviewEUMETSAT',
|
|
25773
|
-
url: 'https://eumetview.eumetsat.int/geoserv/wms?',
|
|
25774
|
-
id: 'eumetviewEUMETSAT'
|
|
25775
|
-
};
|
|
25776
|
-
var ECMWFPublicService = {
|
|
25777
|
-
name: 'ECMWF',
|
|
25778
|
-
url: 'https://eccharts.ecmwf.int/wms/?token=public',
|
|
25779
|
-
id: 'ecmwf'
|
|
25780
|
-
};
|
|
25781
|
-
var MeteoCanada = {
|
|
25782
|
-
name: 'Meteo Canada',
|
|
25783
|
-
url: 'https://geo.weather.gc.ca/geomet/?lang=en&',
|
|
25784
|
-
id: 'MeteoCanada'
|
|
25785
|
-
};
|
|
25786
|
-
|
|
25787
|
-
var publicServices = /*#__PURE__*/Object.freeze({
|
|
25788
|
-
__proto__: null,
|
|
25789
|
-
DWD: DWD,
|
|
25790
|
-
nationaalgeoregister: nationaalgeoregister,
|
|
25791
|
-
KNMImsgcpp: KNMImsgcpp,
|
|
25792
|
-
HeiGit: HeiGit,
|
|
25793
|
-
ArcGisCanvas: ArcGisCanvas,
|
|
25794
|
-
KNMIgeoservicesRadar: KNMIgeoservicesRadar,
|
|
25795
|
-
KNMIgeoservicesObs: KNMIgeoservicesObs,
|
|
25796
|
-
KNMIgeoservicesKlimaatAtlas: KNMIgeoservicesKlimaatAtlas,
|
|
25797
|
-
KNMIgeoservicesHarmonie: KNMIgeoservicesHarmonie,
|
|
25798
|
-
KNMIgeoservicesHarmonieMLService: KNMIgeoservicesHarmonieMLService,
|
|
25799
|
-
MetNorwayService: MetNorwayService,
|
|
25800
|
-
FMIopenwms: FMIopenwms,
|
|
25801
|
-
DWDObservations: DWDObservations,
|
|
25802
|
-
DWDWarnings: DWDWarnings,
|
|
25803
|
-
DWDWXProdukt: DWDWXProdukt,
|
|
25804
|
-
EUMETSAT: EUMETSAT,
|
|
25805
|
-
eumetviewEUMETSAT: eumetviewEUMETSAT,
|
|
25806
|
-
ECMWFPublicService: ECMWFPublicService,
|
|
25807
|
-
MeteoCanada: MeteoCanada
|
|
25808
|
-
});
|
|
25809
|
-
|
|
25810
|
-
/* *
|
|
25811
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
25812
|
-
* you may not use this file except in compliance with the License.
|
|
25813
|
-
* You may obtain a copy of the License at
|
|
25814
|
-
*
|
|
25815
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
25816
|
-
*
|
|
25817
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
25818
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
25819
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
25820
|
-
* See the License for the specific language governing permissions and
|
|
25821
|
-
* limitations under the License.
|
|
25822
|
-
*
|
|
25823
|
-
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
25824
|
-
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
25825
|
-
* */
|
|
25826
|
-
var baseLayer$1 = {
|
|
25827
|
-
name: 'arcGisSat',
|
|
25828
|
-
title: 'arcGisSat',
|
|
25829
|
-
type: 'twms',
|
|
25830
|
-
layerType: LayerType.baseLayer,
|
|
25831
|
-
enabled: true,
|
|
25832
|
-
id: webmapUtils.generateLayerId()
|
|
25833
|
-
};
|
|
25834
|
-
// Base Layers List
|
|
25835
|
-
var baseLayerOpenStreetMapNL$1 = {
|
|
25836
|
-
id: 'base-layer-2',
|
|
25837
|
-
name: 'OpenStreetMap_NL',
|
|
25838
|
-
type: 'twms',
|
|
25839
|
-
layerType: LayerType.baseLayer,
|
|
25840
|
-
enabled: true
|
|
25841
|
-
};
|
|
25842
|
-
var baseLayerArcGisCanvas$1 = {
|
|
25843
|
-
service: ArcGisCanvas.url,
|
|
25844
|
-
id: webmapUtils.generateLayerId(),
|
|
25845
|
-
name: 'arcGisCanvas',
|
|
25846
|
-
type: 'twms',
|
|
25847
|
-
enabled: true,
|
|
25848
|
-
layerType: LayerType.baseLayer
|
|
25849
|
-
};
|
|
25850
|
-
var baseLayerWorldMap$1 = {
|
|
25851
|
-
id: webmapUtils.generateLayerId(),
|
|
25852
|
-
name: 'WorldMap',
|
|
25853
|
-
type: 'twms',
|
|
25854
|
-
layerType: LayerType.baseLayer,
|
|
25855
|
-
enabled: true
|
|
25856
|
-
};
|
|
25857
|
-
var baseLayerHeiGit = {
|
|
25858
|
-
service: HeiGit.url,
|
|
25859
|
-
id: webmapUtils.generateLayerId(),
|
|
25860
|
-
name: 'osm_auto:all',
|
|
25861
|
-
layerType: LayerType.baseLayer
|
|
25862
|
-
};
|
|
25863
|
-
// KNMI msgcpp List
|
|
25864
|
-
var msgCppLayer = {
|
|
25865
|
-
// doesn't work with https
|
|
25866
|
-
service: KNMImsgcpp.url,
|
|
25867
|
-
name: 'lwe_precipitation_rate',
|
|
25868
|
-
format: 'image/png',
|
|
25869
|
-
enabled: true,
|
|
25870
|
-
style: 'precip-transparent/nearest',
|
|
25871
|
-
id: webmapUtils.generateLayerId(),
|
|
25872
|
-
layerType: LayerType.mapLayer
|
|
25873
|
-
};
|
|
25874
|
-
// Nederlandse Nationaal Georegister Layers list
|
|
25875
|
-
var veiligheidsRegiosGebiedsIndelingenLabels = {
|
|
25876
|
-
service: nationaalgeoregister.url,
|
|
25877
|
-
name: 'cbsgebiedsindelingen:cbs_veiligheidsregio_2020_labelpoint',
|
|
25878
|
-
style: 'CBS_Label',
|
|
25879
|
-
enabled: false,
|
|
25880
|
-
layerType: LayerType.mapLayer
|
|
25881
|
-
};
|
|
25882
|
-
var veiligheidsRegiosGebiedsIndelingen = {
|
|
25883
|
-
service: nationaalgeoregister.url,
|
|
25884
|
-
name: 'cbsgebiedsindelingen:cbs_veiligheidsregio_2020_gegeneraliseerd',
|
|
25885
|
-
style: 'CBS_Gebiedsindeling',
|
|
25886
|
-
enabled: false,
|
|
25887
|
-
layerType: LayerType.mapLayer
|
|
25888
|
-
};
|
|
25889
|
-
// KNMI Geoservices Layers List
|
|
25890
|
-
var radarLayer$1 = {
|
|
25891
|
-
service: KNMIgeoservicesRadar.url,
|
|
25892
|
-
name: 'RAD_NL25_PCP_CM',
|
|
25893
|
-
format: 'image/png',
|
|
25894
|
-
enabled: true,
|
|
25895
|
-
style: 'radar/nearest',
|
|
25896
|
-
id: webmapUtils.generateLayerId(),
|
|
25897
|
-
layerType: LayerType.mapLayer
|
|
25898
|
-
};
|
|
25899
|
-
var radarLayerWithError = {
|
|
25900
|
-
service: KNMIgeoservicesRadar.url,
|
|
25901
|
-
name: 'radarLayer',
|
|
25902
|
-
format: 'image/png',
|
|
25903
|
-
enabled: true,
|
|
25904
|
-
style: 'knmiradar/nearest',
|
|
25905
|
-
id: webmapUtils.generateLayerId(),
|
|
25906
|
-
layerType: LayerType.mapLayer
|
|
25907
|
-
};
|
|
25908
|
-
var obsAirTemperature = {
|
|
25909
|
-
service: KNMIgeoservicesObs.url,
|
|
25910
|
-
name: '10M/ta',
|
|
25911
|
-
id: webmapUtils.generateLayerId(),
|
|
25912
|
-
layerType: LayerType.mapLayer
|
|
25913
|
-
};
|
|
25914
|
-
var obsWind = {
|
|
25915
|
-
service: KNMIgeoservicesObs.url,
|
|
25916
|
-
name: '10M/wind',
|
|
25917
|
-
id: webmapUtils.generateLayerId(),
|
|
25918
|
-
layerType: LayerType.mapLayer
|
|
25919
|
-
};
|
|
25920
|
-
var obsAirPressureAtSeaLevel = {
|
|
25921
|
-
service: KNMIgeoservicesObs.url,
|
|
25922
|
-
name: '10M/pp',
|
|
25923
|
-
id: webmapUtils.generateLayerId(),
|
|
25924
|
-
layerType: LayerType.mapLayer
|
|
25925
|
-
};
|
|
25926
|
-
var obsRelativeHumidity = {
|
|
25927
|
-
service: KNMIgeoservicesObs.url,
|
|
25928
|
-
name: '10M/rh',
|
|
25929
|
-
id: webmapUtils.generateLayerId(),
|
|
25930
|
-
layerType: LayerType.mapLayer
|
|
25931
|
-
};
|
|
25932
|
-
var obsGlobalSolarRadiation = {
|
|
25933
|
-
service: KNMIgeoservicesObs.url,
|
|
25934
|
-
name: '10M/qg',
|
|
25935
|
-
id: webmapUtils.generateLayerId(),
|
|
25936
|
-
layerType: LayerType.mapLayer
|
|
25937
|
-
};
|
|
25938
|
-
var obsPrecipitationIntensityPWS = {
|
|
25939
|
-
service: KNMIgeoservicesObs.url,
|
|
25940
|
-
name: '10M/pg',
|
|
25941
|
-
id: webmapUtils.generateLayerId(),
|
|
25942
|
-
layerType: LayerType.mapLayer
|
|
25943
|
-
};
|
|
25944
|
-
var harmonieRelativeHumidityPl = {
|
|
25945
|
-
service: KNMIgeoservicesHarmonie.url,
|
|
25946
|
-
name: 'relative_humidity__at_pl',
|
|
25947
|
-
id: webmapUtils.generateLayerId(),
|
|
25948
|
-
layerType: LayerType.mapLayer,
|
|
25949
|
-
enabled: true
|
|
25950
|
-
};
|
|
25951
|
-
var harmonieWindPl = {
|
|
25952
|
-
service: KNMIgeoservicesHarmonie.url,
|
|
25953
|
-
name: 'wind__at_pl',
|
|
25954
|
-
id: webmapUtils.generateLayerId(),
|
|
25955
|
-
layerType: LayerType.mapLayer,
|
|
25956
|
-
enabled: true
|
|
25957
|
-
};
|
|
25958
|
-
var harmonieAirTemperature = {
|
|
25959
|
-
service: KNMIgeoservicesHarmonie.url,
|
|
25960
|
-
name: 'air_temperature__at_2m',
|
|
25961
|
-
id: webmapUtils.generateLayerId(),
|
|
25962
|
-
layerType: LayerType.mapLayer,
|
|
25963
|
-
enabled: true
|
|
25964
|
-
};
|
|
25965
|
-
var harmoniePrecipitation = {
|
|
25966
|
-
service: KNMIgeoservicesHarmonie.url,
|
|
25967
|
-
name: 'precipitation_flux',
|
|
25968
|
-
id: webmapUtils.generateLayerId(),
|
|
25969
|
-
layerType: LayerType.mapLayer,
|
|
25970
|
-
enabled: true
|
|
25971
|
-
};
|
|
25972
|
-
var harmoniePressure = {
|
|
25973
|
-
service: KNMIgeoservicesHarmonie.url,
|
|
25974
|
-
name: 'air_pressure_at_sea_level',
|
|
25975
|
-
id: webmapUtils.generateLayerId(),
|
|
25976
|
-
layerType: LayerType.mapLayer,
|
|
25977
|
-
enabled: true
|
|
25978
|
-
};
|
|
25979
|
-
var harmonieWindFlags = {
|
|
25980
|
-
service: KNMIgeoservicesHarmonie.url,
|
|
25981
|
-
name: 'wind__at_10m',
|
|
25982
|
-
enabled: true,
|
|
25983
|
-
id: webmapUtils.generateLayerId(),
|
|
25984
|
-
layerType: LayerType.mapLayer
|
|
25985
|
-
};
|
|
25986
|
-
var klimaatAtlasTG3 = {
|
|
25987
|
-
service: KNMIgeoservicesKlimaatAtlas.url,
|
|
25988
|
-
name: 'TG3',
|
|
25989
|
-
enabled: true,
|
|
25990
|
-
id: webmapUtils.generateLayerId(),
|
|
25991
|
-
layerType: LayerType.mapLayer
|
|
25992
|
-
};
|
|
25993
|
-
// DWD Layers List
|
|
25994
|
-
var dwdWarningLayer = {
|
|
25995
|
-
service: DWDWarnings.url,
|
|
25996
|
-
name: 'Warnungen_Gemeinden_vereinigt',
|
|
25997
|
-
format: 'image/png',
|
|
25998
|
-
// style: 'warnungen_gemeinden_vereinigt_event_seamless_param',
|
|
25999
|
-
enabled: true,
|
|
26000
|
-
id: webmapUtils.generateLayerId(),
|
|
26001
|
-
layerType: LayerType.mapLayer
|
|
26002
|
-
};
|
|
26003
|
-
var dwdRadarLayer = {
|
|
26004
|
-
service: DWDWXProdukt.url,
|
|
26005
|
-
name: 'WX-Produkt',
|
|
26006
|
-
format: 'image/png',
|
|
26007
|
-
enabled: true,
|
|
26008
|
-
id: webmapUtils.generateLayerId(),
|
|
26009
|
-
layerType: LayerType.mapLayer
|
|
26010
|
-
};
|
|
26011
|
-
// this needs authentication to work
|
|
26012
|
-
var dwdObservationsWetterLayer = {
|
|
26013
|
-
service: DWDObservations.url,
|
|
26014
|
-
name: 'Wetter_Beobachtungen',
|
|
26015
|
-
style: 'Wetter_Symbole',
|
|
26016
|
-
format: 'image/png',
|
|
26017
|
-
enabled: true,
|
|
26018
|
-
id: webmapUtils.generateLayerId(),
|
|
26019
|
-
layerType: LayerType.mapLayer
|
|
26020
|
-
// headers: [{ name: 'Authorization', value: 'Basic ...' }]
|
|
26021
|
-
};
|
|
26022
|
-
|
|
26023
|
-
var dwdObservationsWetterLayerWithHeader = {
|
|
26024
|
-
service: DWDObservations.url,
|
|
26025
|
-
name: 'Wetter_Beobachtungen',
|
|
26026
|
-
style: 'Wetter_Symbole',
|
|
26027
|
-
format: 'image/png',
|
|
26028
|
-
enabled: true,
|
|
26029
|
-
id: webmapUtils.generateLayerId(),
|
|
26030
|
-
layerType: LayerType.mapLayer,
|
|
26031
|
-
headers: [{
|
|
26032
|
-
name: 'authorization',
|
|
26033
|
-
value: 'Basic aW50cmFuZXQtdXNlcjpDQnMjMTEh'
|
|
26034
|
-
}]
|
|
26035
|
-
};
|
|
26036
|
-
// this needs authentication to work
|
|
26037
|
-
var dwdObservationsWindLayer = {
|
|
26038
|
-
service: DWDObservations.url,
|
|
26039
|
-
name: 'Wetter_Beobachtungen',
|
|
26040
|
-
style: 'Wetter_Wind',
|
|
26041
|
-
format: 'image/png',
|
|
26042
|
-
enabled: true,
|
|
26043
|
-
id: webmapUtils.generateLayerId(),
|
|
26044
|
-
layerType: LayerType.mapLayer
|
|
26045
|
-
};
|
|
26046
|
-
// FMI open wms Layers List
|
|
26047
|
-
var FMITemp = {
|
|
26048
|
-
service: FMIopenwms.url,
|
|
26049
|
-
name: 'temperature-forecast',
|
|
26050
|
-
format: 'image/png',
|
|
26051
|
-
enabled: true,
|
|
26052
|
-
id: webmapUtils.generateLayerId(),
|
|
26053
|
-
layerType: LayerType.mapLayer
|
|
26054
|
-
};
|
|
26055
|
-
// Met Norway Layers List
|
|
26056
|
-
var MetNoTemp = {
|
|
26057
|
-
service: MetNorwayService.url,
|
|
26058
|
-
name: 'thredds_meps_latest_wind',
|
|
26059
|
-
format: 'image/png',
|
|
26060
|
-
enabled: true,
|
|
26061
|
-
id: webmapUtils.generateLayerId(),
|
|
26062
|
-
layerType: LayerType.mapLayer
|
|
26063
|
-
};
|
|
26064
|
-
var metNorwayWind1 = {
|
|
26065
|
-
service: MetNorwayService.url,
|
|
26066
|
-
name: 'thredds_meps_latest_wind',
|
|
26067
|
-
format: 'image/png',
|
|
26068
|
-
enabled: true,
|
|
26069
|
-
id: webmapUtils.generateLayerId(),
|
|
26070
|
-
layerType: LayerType.mapLayer
|
|
26071
|
-
};
|
|
26072
|
-
var metNorwayWind2 = {
|
|
26073
|
-
service: MetNorwayService.url,
|
|
26074
|
-
name: 'thredds_aromearctic_extracted_t',
|
|
26075
|
-
format: 'image/png',
|
|
26076
|
-
enabled: true,
|
|
26077
|
-
id: webmapUtils.generateLayerId(),
|
|
26078
|
-
layerType: LayerType.mapLayer
|
|
26079
|
-
};
|
|
26080
|
-
var metNorwayWind3 = {
|
|
26081
|
-
service: MetNorwayService.url,
|
|
26082
|
-
name: 'thredds_nk800_temperature',
|
|
26083
|
-
format: 'image/png',
|
|
26084
|
-
enabled: true,
|
|
26085
|
-
id: webmapUtils.generateLayerId(),
|
|
26086
|
-
layerType: LayerType.mapLayer
|
|
26087
|
-
};
|
|
26088
|
-
var metNorwayLatestT = {
|
|
26089
|
-
service: MetNorwayService.url,
|
|
26090
|
-
name: 'thredds_meps_latest_t',
|
|
26091
|
-
format: 'image/png',
|
|
26092
|
-
enabled: true,
|
|
26093
|
-
id: webmapUtils.generateLayerId(),
|
|
26094
|
-
layerType: LayerType.mapLayer
|
|
26095
|
-
};
|
|
26096
|
-
var metNorwaySalinaty = {
|
|
26097
|
-
service: MetNorwayService.url,
|
|
26098
|
-
name: 'thredds_barents_2_5km_1h_salinity',
|
|
26099
|
-
format: 'image/png',
|
|
26100
|
-
enabled: true,
|
|
26101
|
-
id: webmapUtils.generateLayerId(),
|
|
26102
|
-
layerType: LayerType.mapLayer
|
|
26103
|
-
};
|
|
26104
|
-
var msgFesEUMETSAT = {
|
|
26105
|
-
service: EUMETSAT.url,
|
|
26106
|
-
name: 'msg_fes:rgb_eview',
|
|
26107
|
-
enabled: true,
|
|
26108
|
-
id: webmapUtils.generateLayerId(),
|
|
26109
|
-
layerType: LayerType.mapLayer
|
|
26110
|
-
};
|
|
26111
|
-
var msgNaturalenhncdEUMETSAT = {
|
|
26112
|
-
service: eumetviewEUMETSAT.url,
|
|
26113
|
-
name: 'meteosat:msg_naturalenhncd',
|
|
26114
|
-
enabled: true,
|
|
26115
|
-
id: webmapUtils.generateLayerId(),
|
|
26116
|
-
layerType: LayerType.mapLayer
|
|
26117
|
-
};
|
|
26118
|
-
var msgAshEUMETSAT = {
|
|
26119
|
-
service: eumetviewEUMETSAT.url,
|
|
26120
|
-
name: 'meteosat:msg_ash',
|
|
26121
|
-
enabled: true,
|
|
26122
|
-
id: webmapUtils.generateLayerId(),
|
|
26123
|
-
layerType: LayerType.mapLayer
|
|
26124
|
-
};
|
|
26125
|
-
var msgCthEUMETSAT = {
|
|
26126
|
-
service: eumetviewEUMETSAT.url,
|
|
26127
|
-
name: 'meteosat:msg_cth',
|
|
26128
|
-
enabled: true,
|
|
26129
|
-
id: webmapUtils.generateLayerId(),
|
|
26130
|
-
layerType: LayerType.mapLayer
|
|
26131
|
-
};
|
|
26132
|
-
var msgFogEUMETSAT = {
|
|
26133
|
-
service: eumetviewEUMETSAT.url,
|
|
26134
|
-
name: 'meteosat:msg_fog',
|
|
26135
|
-
enabled: true,
|
|
26136
|
-
id: webmapUtils.generateLayerId(),
|
|
26137
|
-
layerType: LayerType.mapLayer
|
|
26138
|
-
};
|
|
26139
|
-
var msgNaturalEUMETSAT = {
|
|
26140
|
-
service: eumetviewEUMETSAT.url,
|
|
26141
|
-
name: 'meteosat:msg_natural',
|
|
26142
|
-
enabled: true,
|
|
26143
|
-
id: webmapUtils.generateLayerId(),
|
|
26144
|
-
layerType: LayerType.mapLayer
|
|
26145
|
-
};
|
|
26146
|
-
|
|
26147
|
-
var publicLayers = /*#__PURE__*/Object.freeze({
|
|
26148
|
-
__proto__: null,
|
|
26149
|
-
defaultLayers: defaultLayers,
|
|
26150
|
-
baseLayer: baseLayer$1,
|
|
26151
|
-
baseLayerOpenStreetMapNL: baseLayerOpenStreetMapNL$1,
|
|
26152
|
-
baseLayerArcGisCanvas: baseLayerArcGisCanvas$1,
|
|
26153
|
-
baseLayerWorldMap: baseLayerWorldMap$1,
|
|
26154
|
-
baseLayerHeiGit: baseLayerHeiGit,
|
|
26155
|
-
msgCppLayer: msgCppLayer,
|
|
26156
|
-
veiligheidsRegiosGebiedsIndelingenLabels: veiligheidsRegiosGebiedsIndelingenLabels,
|
|
26157
|
-
veiligheidsRegiosGebiedsIndelingen: veiligheidsRegiosGebiedsIndelingen,
|
|
26158
|
-
radarLayer: radarLayer$1,
|
|
26159
|
-
radarLayerWithError: radarLayerWithError,
|
|
26160
|
-
obsAirTemperature: obsAirTemperature,
|
|
26161
|
-
obsWind: obsWind,
|
|
26162
|
-
obsAirPressureAtSeaLevel: obsAirPressureAtSeaLevel,
|
|
26163
|
-
obsRelativeHumidity: obsRelativeHumidity,
|
|
26164
|
-
obsGlobalSolarRadiation: obsGlobalSolarRadiation,
|
|
26165
|
-
obsPrecipitationIntensityPWS: obsPrecipitationIntensityPWS,
|
|
26166
|
-
harmonieRelativeHumidityPl: harmonieRelativeHumidityPl,
|
|
26167
|
-
harmonieWindPl: harmonieWindPl,
|
|
26168
|
-
harmonieAirTemperature: harmonieAirTemperature,
|
|
26169
|
-
harmoniePrecipitation: harmoniePrecipitation,
|
|
26170
|
-
harmoniePressure: harmoniePressure,
|
|
26171
|
-
harmonieWindFlags: harmonieWindFlags,
|
|
26172
|
-
klimaatAtlasTG3: klimaatAtlasTG3,
|
|
26173
|
-
dwdWarningLayer: dwdWarningLayer,
|
|
26174
|
-
dwdRadarLayer: dwdRadarLayer,
|
|
26175
|
-
dwdObservationsWetterLayer: dwdObservationsWetterLayer,
|
|
26176
|
-
dwdObservationsWetterLayerWithHeader: dwdObservationsWetterLayerWithHeader,
|
|
26177
|
-
dwdObservationsWindLayer: dwdObservationsWindLayer,
|
|
26178
|
-
FMITemp: FMITemp,
|
|
26179
|
-
MetNoTemp: MetNoTemp,
|
|
26180
|
-
metNorwayWind1: metNorwayWind1,
|
|
26181
|
-
metNorwayWind2: metNorwayWind2,
|
|
26182
|
-
metNorwayWind3: metNorwayWind3,
|
|
26183
|
-
metNorwayLatestT: metNorwayLatestT,
|
|
26184
|
-
metNorwaySalinaty: metNorwaySalinaty,
|
|
26185
|
-
msgFesEUMETSAT: msgFesEUMETSAT,
|
|
26186
|
-
msgNaturalenhncdEUMETSAT: msgNaturalenhncdEUMETSAT,
|
|
26187
|
-
msgAshEUMETSAT: msgAshEUMETSAT,
|
|
26188
|
-
msgCthEUMETSAT: msgCthEUMETSAT,
|
|
26189
|
-
msgFogEUMETSAT: msgFogEUMETSAT,
|
|
26190
|
-
msgNaturalEUMETSAT: msgNaturalEUMETSAT
|
|
26191
|
-
});
|
|
26192
|
-
|
|
26193
25118
|
var useGetLatestReferenceTime = function useGetLatestReferenceTime(inputLayer) {
|
|
26194
25119
|
var _React$useState = React.useState(''),
|
|
26195
25120
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -26261,7 +25186,7 @@ var makeMapPreset = function makeMapPreset(timeIncrement, uniqueId, referenceTim
|
|
|
26261
25186
|
};
|
|
26262
25187
|
var ModelRunInterval = function ModelRunInterval(_ref) {
|
|
26263
25188
|
var _ref$layers = _ref.layers,
|
|
26264
|
-
layers = _ref$layers === void 0 ? [harmoniePressure, harmonieWindFlags, harmoniePrecipitation] : _ref$layers,
|
|
25189
|
+
layers = _ref$layers === void 0 ? [publicLayers.harmoniePressure, publicLayers.harmonieWindFlags, publicLayers.harmoniePrecipitation] : _ref$layers,
|
|
26265
25190
|
syncGroupsIds = _ref.syncGroupsIds,
|
|
26266
25191
|
_ref$interval = _ref.interval,
|
|
26267
25192
|
interval = _ref$interval === void 0 ? 3 : _ref$interval,
|
|
@@ -26836,7 +25761,7 @@ var SubmenuWrapper = function SubmenuWrapper(_a) {
|
|
|
26836
25761
|
sx = _a.sx,
|
|
26837
25762
|
setSubmenu = _a.setSubmenu,
|
|
26838
25763
|
title = _a.title,
|
|
26839
|
-
props = __rest
|
|
25764
|
+
props = __rest(_a, ["children", "closeButtonIcon", "sx", "setSubmenu", "title"]);
|
|
26840
25765
|
return /*#__PURE__*/React__default.createElement(Card, Object.assign({}, props, {
|
|
26841
25766
|
sx: Object.assign({
|
|
26842
25767
|
position: 'relative'
|
|
@@ -27123,7 +26048,7 @@ var TimeStepSelector = function TimeStepSelector(_a) {
|
|
|
27123
26048
|
value = _a.value,
|
|
27124
26049
|
setValue = _a.setValue,
|
|
27125
26050
|
defaultTimeStep = _a.defaultTimeStep,
|
|
27126
|
-
props = __rest
|
|
26051
|
+
props = __rest(_a, ["dropdownButtonIcon", "value", "setValue", "defaultTimeStep"]);
|
|
27127
26052
|
var availableOptions = allOptions.filter(function (option) {
|
|
27128
26053
|
return Number(option) >= defaultTimeStep;
|
|
27129
26054
|
});
|
|
@@ -27295,7 +26220,7 @@ var CustomSelect = function CustomSelect(_a) {
|
|
|
27295
26220
|
itemPostFix = _a.itemPostFix,
|
|
27296
26221
|
value = _a.value,
|
|
27297
26222
|
setValue = _a.setValue,
|
|
27298
|
-
props = __rest
|
|
26223
|
+
props = __rest(_a, ["amountOfOptions", "dropdownButtonIcon", "itemPostFix", "value", "setValue"]);
|
|
27299
26224
|
var availableOptions = Array.from(Array(amountOfOptions).keys());
|
|
27300
26225
|
return /*#__PURE__*/React__default.createElement(Select, Object.assign({}, props, {
|
|
27301
26226
|
"data-testid": "TimeSliderLite-customSelect-".concat(itemPostFix),
|
|
@@ -27886,7 +26811,7 @@ var ControlButtonGroup = function ControlButtonGroup(_a) {
|
|
|
27886
26811
|
var children = _a.children,
|
|
27887
26812
|
right = _a.right,
|
|
27888
26813
|
left = _a.left,
|
|
27889
|
-
props = __rest
|
|
26814
|
+
props = __rest(_a, ["children", "right", "left"]);
|
|
27890
26815
|
return /*#__PURE__*/React__default.createElement(ButtonGroup, Object.assign({
|
|
27891
26816
|
orientation: "horizontal",
|
|
27892
26817
|
fullWidth: true
|
|
@@ -28760,7 +27685,7 @@ var TimeSliderLiteConnect = function TimeSliderLiteConnect(_a) {
|
|
|
28760
27685
|
isAlwaysVisible = _a$isAlwaysVisible === void 0 ? false : _a$isAlwaysVisible,
|
|
28761
27686
|
menuSx = _a.menuSx,
|
|
28762
27687
|
subMenuSx = _a.subMenuSx,
|
|
28763
|
-
timeSliderProps = __rest
|
|
27688
|
+
timeSliderProps = __rest(_a, ["overrideUseTimeRange", "overrideUseTimeStep", "sourceId", "mapId", "isAlwaysVisible", "menuSx", "subMenuSx"]);
|
|
28764
27689
|
var _React$useState = React.useState(false),
|
|
28765
27690
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
28766
27691
|
menuOpen = _React$useState2[0],
|
|
@@ -29045,7 +27970,7 @@ var SnackbarWrapper = function SnackbarWrapper(_a) {
|
|
|
29045
27970
|
isOpen = _a.isOpen,
|
|
29046
27971
|
onCloseSnackbar = _a.onCloseSnackbar,
|
|
29047
27972
|
id = _a.id,
|
|
29048
|
-
props = __rest
|
|
27973
|
+
props = __rest(_a, ["children", "isOpen", "onCloseSnackbar", "id"]);
|
|
29049
27974
|
return /*#__PURE__*/React.createElement(React.Fragment, null, children, /*#__PURE__*/React.createElement(Snackbar, Object.assign({
|
|
29050
27975
|
"data-testid": "snackbarComponent",
|
|
29051
27976
|
open: isOpen,
|
|
@@ -29781,4 +28706,4 @@ var MapWarningProperties = function MapWarningProperties(_ref) {
|
|
|
29781
28706
|
}, "Identifier: ", selectedFeatureProperties.identifier)));
|
|
29782
28707
|
};
|
|
29783
28708
|
|
|
29784
|
-
export { AppWrapperConnect, ConfigurableMapConnect, CoreThemeProvider, CoreThemeStoreProvider, DrawingToolConnect, DrawingToolMapButtonConnect, HarmonieTempAndPrecipPreset, LayerManager, BaseLayerRow as LayerManagerBaseLayerRow, LayerManagerConnect, DescriptionRow as LayerManagerDescriptionRow, HeaderOptions as LayerManagerHeaderOptions, LayerContainerRow as LayerManagerLayerContainerRow, LayerManagerMapButtonConnect, LayerSelectConnect, LegendConnect, LegendMapButtonConnect,
|
|
28709
|
+
export { AppWrapperConnect, ConfigurableMapConnect, CoreThemeProvider, CoreThemeStoreProvider, DrawingToolConnect, DrawingToolMapButtonConnect, HarmonieTempAndPrecipPreset, LayerManager, BaseLayerRow as LayerManagerBaseLayerRow, LayerManagerConnect, DescriptionRow as LayerManagerDescriptionRow, HeaderOptions as LayerManagerHeaderOptions, LayerContainerRow as LayerManagerLayerContainerRow, LayerManagerMapButtonConnect, LayerSelectConnect, LegendConnect, LegendMapButtonConnect, MapDrawToolProvider, MapViewConnect, MapWarningProperties, MultiDimensionSelectMapButtonsConnect, MultiMapMultiDimensionSelectConnect as MultiMapDimensionSelectConnect, MultiMapViewConnect, RouterWrapperConnect, SnackbarWrapperConnect, SyncGroupViewerConnect, TimeSlider, BackwardForwardStepButtonConnect as TimeSliderBackwardForwardStepButtonConnect, TimeSliderButtonsConnectMemo as TimeSliderButtonsConnect, TimeSliderConnect, TimeSliderLite, TimeSliderLiteConnect, TimeSliderLiteOptionsMenu, OptionsMenuButtonConnect as TimeSliderOptionsMenuButtonConnect, PlayButtonConnect as TimeSliderPlayButtonConnect, ZoomControlConnect, componentsLookUp, defaultBbox, defaultBox, defaultConfigurations, defaultDelete, defaultIntersectionStyleProperties, defaultPoint, defaultPolygon, drawOptions, filterMapPresets, filterServices, store, testLayers, timeSliderUtils, useAreaDrawDialogAction, useFetchServices, useMapDrawContext, useMapDrawTool, useSetupDialog };
|