@opengeoweb/webmap-react 19.5.1 → 19.6.1-nightly-20260912
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/dist/index.esm.js +606 -123
- package/dist/src/lib/components/Legend/LegendDialog.d.ts +5 -1
- package/dist/src/lib/components/OpenLayers/OlStyles.d.ts +4 -1
- package/dist/src/lib/components/OpenLayers/draw/OpenLayersMapDraw.d.ts +5 -1
- package/dist/src/lib/components/OpenLayers/draw/index.d.ts +1 -0
- package/dist/src/lib/components/OpenLayers/draw/selectionUtils.d.ts +5 -0
- package/dist/src/lib/components/OpenLayers/draw/utils.d.ts +15 -0
- package/dist/src/lib/components/OpenLayers/index.d.ts +1 -0
- package/dist/src/lib/components/OpenLayers/layers/FeatureLayer.d.ts +3 -1
- package/dist/src/lib/components/OpenLayers/layers/OpenLayersFeatureLayer.d.ts +2 -1
- package/dist/src/lib/components/OpenLayers/utils/dragBoxSelect.d.ts +25 -0
- package/dist/src/lib/components/OpenLayers/utils/moveFeatures.d.ts +24 -0
- package/dist/src/lib/components/OpenLayers/utils/types.d.ts +13 -0
- package/dist/src/lib/hooks/useViewFromLayer.d.ts +4 -1
- package/package.json +50 -50
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WMInvalidDateValues, getCorrectWMSDimName, WMImageStore, WMImageStoreLoadType, WMJSDimension, webmapUtils, WMLayer, LayerType, legendImageStore, WMImageEventType, getLegendGraphicURLForLayer, WEBMAP_NAMESPACE, WMProj4Defs, privateWebMapUtils, wmDetermineDimensionMode, WMDefaultStyleName, tilesettings } from '@opengeoweb/webmap';
|
|
1
|
+
import { WMInvalidDateValues, getCorrectWMSDimName, WMImageStore, WMImageStoreLoadType, WMJSDimension, webmapUtils, WMLayer, LayerType, legendImageStore, WMImageEventType, getLegendGraphicURLForLayer, WEBMAP_NAMESPACE, WMProj4Defs, privateWebMapUtils, wmDetermineDimensionMode, WMJSMAP_LONLAT_EPSGCODE, WMDefaultStyleName, tilesettings } from '@opengeoweb/webmap';
|
|
2
2
|
export { WEBMAP_NAMESPACE, webmapTranslations } from '@opengeoweb/webmap';
|
|
3
3
|
import React, { createContext, useMemo, useRef, useState, useEffect, useCallback, useContext, useLayoutEffect } from 'react';
|
|
4
4
|
import { memoize, range, without, isEqual, throttle, debounce, cloneDeep } from 'lodash';
|
|
@@ -10,7 +10,7 @@ import ImageSource, { getRequestExtent } from 'ol/source/Image';
|
|
|
10
10
|
import ImageWrapper, { load } from 'ol/Image';
|
|
11
11
|
import { getImageSrc, getRequestParams, createLoader } from 'ol/source/wms';
|
|
12
12
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
13
|
-
import { CustomTooltip, CanvasComponent, useWheelStopPropagation, ToolContainerDraggable, CustomIconButton, dateUtils, isDialogFocused, useMakeSureContainerStaysInsideWindow, Draggable, Resizable } from '@opengeoweb/shared';
|
|
13
|
+
import { CustomTooltip, CanvasComponent, useWheelStopPropagation, calculateStartSize, ToolContainerDraggable, CustomIconButton, dateUtils, isDialogFocused, useMakeSureContainerStaysInsideWindow, Draggable, Resizable } from '@opengeoweb/shared';
|
|
14
14
|
import { useTheme, Card, Box, Typography, Grid, styled, Slider, FormGroup, FormControlLabel, Checkbox, TextField, FormControl, InputLabel, Select, MenuItem, Icon as Icon$2, FormLabel, Switch, Paper, ThemeProvider } from '@mui/material';
|
|
15
15
|
import { Visibility, VisibilityOff, arrowUpPath, Home, Add, Minus, List, Equalizer, DimensionsElevation, Link, LinkOff, Info, DimensionsOther, DimensionsRefTime, DimensionsTime, locationPath, rotatePath, DrawToolSplitFeature, Location, DrawToolSmoothLine, DrawToolFreehand, DrawToolOval, DrawToolCircle, DrawToolSquare, Delete, DrawToolLineString, DrawToolRectangle, DrawToolPolygon, DrawToolPoint, DrawFIRLand, ArrowUp, darkTheme, ChevronRight, Options, Clock as Clock$1 } from '@opengeoweb/theme';
|
|
16
16
|
import 'i18next';
|
|
@@ -20,13 +20,15 @@ import { Point, MultiPoint, Polygon, LineString } from 'ol/geom';
|
|
|
20
20
|
import { Style, Icon as Icon$1, Circle, Stroke, Fill, Text } from 'ol/style';
|
|
21
21
|
import Box$1 from '@mui/material/Box';
|
|
22
22
|
import Typography$1 from '@mui/material/Typography';
|
|
23
|
-
import { View, Map as Map$1,
|
|
24
|
-
import { defaults, MouseWheelZoom, Draw, Modify, Translate, Snap, DragPan } from 'ol/interaction';
|
|
23
|
+
import { View, Map as Map$1, Collection, Feature, Overlay } from 'ol';
|
|
24
|
+
import { defaults, MouseWheelZoom, Draw, Modify, Translate as Translate$1, Snap, DragPan } from 'ol/interaction';
|
|
25
25
|
import 'ol/ol.css';
|
|
26
26
|
import { listen, unlistenByKey } from 'ol/events';
|
|
27
27
|
import { unByKey } from 'ol/Observable';
|
|
28
28
|
import EventType from 'ol/pointer/EventType';
|
|
29
29
|
import { toLonLat, fromLonLat, transformExtent, transform } from 'ol/proj';
|
|
30
|
+
import { noModifierKeys, platformModifierKeyOnly, always, never } from 'ol/events/condition';
|
|
31
|
+
import Translate from 'ol/interaction/Translate';
|
|
30
32
|
import { register } from 'ol/proj/proj4';
|
|
31
33
|
import proj4 from 'proj4';
|
|
32
34
|
import { lineSplit, cleanCoords, featureCollection, difference, bbox, feature, simplify, booleanPointInPolygon, intersect, polygonToLine, booleanClockwise, rewind, toWgs84, toMercator, coordEach } from '@turf/turf';
|
|
@@ -36,11 +38,10 @@ import WMTSCapabilities from 'ol/format/WMTSCapabilities';
|
|
|
36
38
|
import TileLayer from 'ol/layer/Tile';
|
|
37
39
|
import { WMTS, XYZ, TileWMS, GeoTIFF } from 'ol/source';
|
|
38
40
|
import { optionsFromCapabilities } from 'ol/source/WMTS';
|
|
39
|
-
import
|
|
40
|
-
import { platformModifierKeyOnly, always, never } from 'ol/events/condition';
|
|
41
|
-
import DragBox from 'ol/interaction/DragBox';
|
|
41
|
+
import GeoJSON from 'ol/format/GeoJSON';
|
|
42
42
|
import { Vector } from 'ol/layer';
|
|
43
43
|
import VectorSource from 'ol/source/Vector';
|
|
44
|
+
import DragBox from 'ol/interaction/DragBox';
|
|
44
45
|
import TileLayer$1 from 'ol/layer/WebGLTile';
|
|
45
46
|
import { fromCircle } from 'ol/geom/Polygon';
|
|
46
47
|
import { createBox, createRegularPolygon } from 'ol/interaction/Draw';
|
|
@@ -2594,6 +2595,14 @@ var Legend = function Legend(_ref) {
|
|
|
2594
2595
|
});
|
|
2595
2596
|
};
|
|
2596
2597
|
|
|
2598
|
+
var minSize = {
|
|
2599
|
+
width: 100,
|
|
2600
|
+
height: 120
|
|
2601
|
+
};
|
|
2602
|
+
var defaultSize = {
|
|
2603
|
+
width: 'auto',
|
|
2604
|
+
height: 'auto'
|
|
2605
|
+
};
|
|
2597
2606
|
var LegendDialog = function LegendDialog(_ref) {
|
|
2598
2607
|
var _nodeRef$current, _nodeRef$current2;
|
|
2599
2608
|
var layers = _ref.layers,
|
|
@@ -2608,14 +2617,41 @@ var LegendDialog = function LegendDialog(_ref) {
|
|
|
2608
2617
|
order = _ref$order === void 0 ? 0 : _ref$order,
|
|
2609
2618
|
_ref$source = _ref.source,
|
|
2610
2619
|
source = _ref$source === void 0 ? 'app' : _ref$source,
|
|
2611
|
-
onToggleLayerLegendVisibility = _ref.onToggleLayerLegendVisibility
|
|
2620
|
+
onToggleLayerLegendVisibility = _ref.onToggleLayerLegendVisibility,
|
|
2621
|
+
_ref$startDraggablePo = _ref.startDraggablePosition,
|
|
2622
|
+
startDraggablePosition = _ref$startDraggablePo === void 0 ? {
|
|
2623
|
+
x: 0,
|
|
2624
|
+
y: 0
|
|
2625
|
+
} : _ref$startDraggablePo,
|
|
2626
|
+
_ref$startPosition = _ref.startPosition,
|
|
2627
|
+
startPosition = _ref$startPosition === void 0 ? {
|
|
2628
|
+
right: 20,
|
|
2629
|
+
top: 50
|
|
2630
|
+
} : _ref$startPosition,
|
|
2631
|
+
startSize = _ref.startSize,
|
|
2632
|
+
_ref$onDragEnd = _ref.onDragEnd,
|
|
2633
|
+
onDragEnd = _ref$onDragEnd === void 0 ? function () {} : _ref$onDragEnd;
|
|
2612
2634
|
var _useWebmapReactTransl = useWebmapReactTranslation(),
|
|
2613
2635
|
t = _useWebmapReactTransl.t;
|
|
2614
2636
|
var stopWheelEventPropagationRef = useWheelStopPropagation();
|
|
2615
|
-
var _React$useState = React.useState(
|
|
2637
|
+
var _React$useState = React.useState(function () {
|
|
2638
|
+
return startSize ? calculateStartSize(minSize, startSize, startPosition) : defaultSize;
|
|
2639
|
+
}),
|
|
2616
2640
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
2617
|
-
|
|
2618
|
-
|
|
2641
|
+
sizeInState = _React$useState2[0],
|
|
2642
|
+
setSizeInState = _React$useState2[1];
|
|
2643
|
+
var wasOpenRef = React.useRef(isOpen);
|
|
2644
|
+
React.useLayoutEffect(function () {
|
|
2645
|
+
var isOpening = isOpen && !wasOpenRef.current;
|
|
2646
|
+
if (isOpening) {
|
|
2647
|
+
setSizeInState(startSize ? calculateStartSize(minSize, startSize, startPosition) : defaultSize);
|
|
2648
|
+
}
|
|
2649
|
+
wasOpenRef.current = isOpen;
|
|
2650
|
+
}, [isOpen, startPosition, startSize]);
|
|
2651
|
+
var _React$useState3 = React.useState('initial'),
|
|
2652
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
2653
|
+
legendMaxHeight = _React$useState4[0],
|
|
2654
|
+
setLegendMaxHeight = _React$useState4[1];
|
|
2619
2655
|
// get refs for the legend and mapview
|
|
2620
2656
|
var nodeRef = useRef(null);
|
|
2621
2657
|
var legendRef = (_nodeRef$current = nodeRef.current) === null || _nodeRef$current === void 0 || (_nodeRef$current = _nodeRef$current.closest('[data-testid="moveable-legend"]')) === null || _nodeRef$current === void 0 ? void 0 : _nodeRef$current.parentElement;
|
|
@@ -2645,6 +2681,10 @@ var LegendDialog = function LegendDialog(_ref) {
|
|
|
2645
2681
|
updateInitialMaxHeight();
|
|
2646
2682
|
}
|
|
2647
2683
|
}, [nodeRef, updateInitialMaxHeight]);
|
|
2684
|
+
var handleDragEnd = React.useCallback(function (position, dragSize) {
|
|
2685
|
+
setSizeInState(dragSize);
|
|
2686
|
+
onDragEnd(position, dragSize);
|
|
2687
|
+
}, [onDragEnd]);
|
|
2648
2688
|
return jsx(ToolContainerDraggable, {
|
|
2649
2689
|
bounds: "parent",
|
|
2650
2690
|
"data-testid": "moveable-legend",
|
|
@@ -2653,13 +2693,14 @@ var LegendDialog = function LegendDialog(_ref) {
|
|
|
2653
2693
|
isOpen: isOpen,
|
|
2654
2694
|
minWidth: 100,
|
|
2655
2695
|
onClose: onClose,
|
|
2696
|
+
onDragEnd: handleDragEnd,
|
|
2656
2697
|
onMouseDown: onMouseDown,
|
|
2657
2698
|
order: order,
|
|
2699
|
+
resetPositionOnOpen: true,
|
|
2658
2700
|
source: source,
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
},
|
|
2701
|
+
startDraggablePosition: startDraggablePosition,
|
|
2702
|
+
startPosition: startPosition,
|
|
2703
|
+
startSize: sizeInState,
|
|
2663
2704
|
title: showMapId ? "".concat(t('webmap-react-legend'), " ").concat(mapId) : t('webmap-react-legend'),
|
|
2664
2705
|
children: jsx(Box, {
|
|
2665
2706
|
ref: nodeRef,
|
|
@@ -2699,7 +2740,7 @@ var LegendDialog = function LegendDialog(_ref) {
|
|
|
2699
2740
|
});
|
|
2700
2741
|
};
|
|
2701
2742
|
|
|
2702
|
-
var _excluded$
|
|
2743
|
+
var _excluded$3 = ["onClick", "children", "title", "placement", "isActive"];
|
|
2703
2744
|
var MapControlButton = function MapControlButton(_ref) {
|
|
2704
2745
|
var onClick = _ref.onClick,
|
|
2705
2746
|
children = _ref.children,
|
|
@@ -2708,7 +2749,7 @@ var MapControlButton = function MapControlButton(_ref) {
|
|
|
2708
2749
|
placement = _ref$placement === void 0 ? 'right' : _ref$placement,
|
|
2709
2750
|
_ref$isActive = _ref.isActive,
|
|
2710
2751
|
isActive = _ref$isActive === void 0 ? false : _ref$isActive,
|
|
2711
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2752
|
+
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
2712
2753
|
return jsx(CustomIconButton, _objectSpread2(_objectSpread2({
|
|
2713
2754
|
isSelected: isActive,
|
|
2714
2755
|
onClick: onClick,
|
|
@@ -2748,10 +2789,10 @@ var ZoomControls = function ZoomControls(_ref) {
|
|
|
2748
2789
|
});
|
|
2749
2790
|
};
|
|
2750
2791
|
|
|
2751
|
-
var _excluded$
|
|
2792
|
+
var _excluded$2 = ["children"];
|
|
2752
2793
|
var MapControls = function MapControls(_ref) {
|
|
2753
2794
|
var children = _ref.children,
|
|
2754
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2795
|
+
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
2755
2796
|
return jsx(Box, _objectSpread2(_objectSpread2({
|
|
2756
2797
|
sx: {
|
|
2757
2798
|
position: 'absolute',
|
|
@@ -3207,11 +3248,11 @@ var MapDimensionSelect = function MapDimensionSelect(_ref2) {
|
|
|
3207
3248
|
}, layerId);
|
|
3208
3249
|
};
|
|
3209
3250
|
|
|
3210
|
-
var _excluded = ["isActive", "onClick"];
|
|
3251
|
+
var _excluded$1 = ["isActive", "onClick"];
|
|
3211
3252
|
var LayerInfoButton = function LayerInfoButton(_ref) {
|
|
3212
3253
|
var isActive = _ref.isActive,
|
|
3213
3254
|
onClick = _ref.onClick,
|
|
3214
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
3255
|
+
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
3215
3256
|
return jsx(CustomIconButton, _objectSpread2(_objectSpread2({
|
|
3216
3257
|
"aria-label": "layer info",
|
|
3217
3258
|
className: "layerInfoButton",
|
|
@@ -3542,7 +3583,12 @@ var HoldShiftToZoomMessage = function HoldShiftToZoomMessage() {
|
|
|
3542
3583
|
var timerRef = useRef(undefined);
|
|
3543
3584
|
var _useWebmapReactTransl = useWebmapReactTranslation(WEBMAP_NAMESPACE),
|
|
3544
3585
|
t = _useWebmapReactTransl.t;
|
|
3586
|
+
var _useContext = useContext(MapContext),
|
|
3587
|
+
map = _useContext.map;
|
|
3545
3588
|
useEffect(function () {
|
|
3589
|
+
if (!map) {
|
|
3590
|
+
return function () {};
|
|
3591
|
+
}
|
|
3546
3592
|
var updateScroll = function updateScroll(e) {
|
|
3547
3593
|
if (e.deltaY) {
|
|
3548
3594
|
clearTimeout(timerRef.current);
|
|
@@ -3552,11 +3598,12 @@ var HoldShiftToZoomMessage = function HoldShiftToZoomMessage() {
|
|
|
3552
3598
|
!e.shiftKey && setShowMessage(true);
|
|
3553
3599
|
}
|
|
3554
3600
|
};
|
|
3555
|
-
|
|
3601
|
+
var viewPort = map.getViewport();
|
|
3602
|
+
viewPort.addEventListener('wheel', updateScroll);
|
|
3556
3603
|
return function () {
|
|
3557
|
-
|
|
3604
|
+
viewPort.removeEventListener('wheel', updateScroll);
|
|
3558
3605
|
};
|
|
3559
|
-
}, [
|
|
3606
|
+
}, [map]);
|
|
3560
3607
|
return jsx("div", {
|
|
3561
3608
|
style: {
|
|
3562
3609
|
position: 'absolute',
|
|
@@ -3800,6 +3847,101 @@ var OpenLayersMapView = function OpenLayersMapView(_ref) {
|
|
|
3800
3847
|
});
|
|
3801
3848
|
};
|
|
3802
3849
|
|
|
3850
|
+
var getOlFeatureKey = function getOlFeatureKey(feature) {
|
|
3851
|
+
var id = feature === null || feature === void 0 ? void 0 : feature.getId();
|
|
3852
|
+
if (id !== undefined && id !== null) {
|
|
3853
|
+
return String(id);
|
|
3854
|
+
}
|
|
3855
|
+
var originalId = feature === null || feature === void 0 ? void 0 : feature.get('originalId');
|
|
3856
|
+
return typeof originalId === 'string' ? originalId : undefined;
|
|
3857
|
+
};
|
|
3858
|
+
var isDefaultMovable = function isDefaultMovable(feature) {
|
|
3859
|
+
return feature.get('isSelected') === true && feature.get('isReadonly') !== true;
|
|
3860
|
+
};
|
|
3861
|
+
var createMoveFeatures = function createMoveFeatures(_ref) {
|
|
3862
|
+
var features = _ref.features,
|
|
3863
|
+
isMovable = _ref.isMovable,
|
|
3864
|
+
onMoveEnd = _ref.onMoveEnd,
|
|
3865
|
+
onMoveStart = _ref.onMoveStart;
|
|
3866
|
+
var movableFeatures = features.filter(isMovable);
|
|
3867
|
+
if (movableFeatures.length === 0) {
|
|
3868
|
+
return undefined;
|
|
3869
|
+
}
|
|
3870
|
+
var collection = new Collection(movableFeatures);
|
|
3871
|
+
var translate = new Translate({
|
|
3872
|
+
features: collection,
|
|
3873
|
+
// Cmd/Ctrl must fall through to the box select and shift to the selection toggle.
|
|
3874
|
+
condition: noModifierKeys,
|
|
3875
|
+
hitTolerance: 5
|
|
3876
|
+
});
|
|
3877
|
+
translate.on('translatestart', function () {
|
|
3878
|
+
onMoveStart === null || onMoveStart === void 0 || onMoveStart();
|
|
3879
|
+
});
|
|
3880
|
+
translate.on('translateend', function (event) {
|
|
3881
|
+
var _event$startCoordinat = _slicedToArray(event.startCoordinate, 2),
|
|
3882
|
+
startX = _event$startCoordinat[0],
|
|
3883
|
+
startY = _event$startCoordinat[1];
|
|
3884
|
+
var _event$coordinate = _slicedToArray(event.coordinate, 2),
|
|
3885
|
+
endX = _event$coordinate[0],
|
|
3886
|
+
endY = _event$coordinate[1];
|
|
3887
|
+
if (startX === endX && startY === endY) {
|
|
3888
|
+
onMoveEnd([]);
|
|
3889
|
+
return;
|
|
3890
|
+
}
|
|
3891
|
+
onMoveEnd(event.features.getArray());
|
|
3892
|
+
});
|
|
3893
|
+
return {
|
|
3894
|
+
translate: translate,
|
|
3895
|
+
dispose: function dispose() {
|
|
3896
|
+
return collection.clear();
|
|
3897
|
+
}
|
|
3898
|
+
};
|
|
3899
|
+
};
|
|
3900
|
+
var useMoveFeatures = function useMoveFeatures(_ref2) {
|
|
3901
|
+
var map = _ref2.map,
|
|
3902
|
+
features = _ref2.features,
|
|
3903
|
+
active = _ref2.active,
|
|
3904
|
+
isMovable = _ref2.isMovable,
|
|
3905
|
+
onMoveEnd = _ref2.onMoveEnd,
|
|
3906
|
+
onMoveStart = _ref2.onMoveStart;
|
|
3907
|
+
var isMovableRef = useRef(isMovable);
|
|
3908
|
+
var onMoveEndRef = useRef(onMoveEnd);
|
|
3909
|
+
var onMoveStartRef = useRef(onMoveStart);
|
|
3910
|
+
useEffect(function () {
|
|
3911
|
+
isMovableRef.current = isMovable;
|
|
3912
|
+
onMoveEndRef.current = onMoveEnd;
|
|
3913
|
+
onMoveStartRef.current = onMoveStart;
|
|
3914
|
+
});
|
|
3915
|
+
useEffect(function () {
|
|
3916
|
+
if (!map || !active || !features.length) {
|
|
3917
|
+
return function () {};
|
|
3918
|
+
}
|
|
3919
|
+
var moveFeatures = createMoveFeatures({
|
|
3920
|
+
features: features,
|
|
3921
|
+
isMovable: function isMovable(feature) {
|
|
3922
|
+
var _isMovableRef$current;
|
|
3923
|
+
return ((_isMovableRef$current = isMovableRef.current) !== null && _isMovableRef$current !== void 0 ? _isMovableRef$current : isDefaultMovable)(feature);
|
|
3924
|
+
},
|
|
3925
|
+
onMoveEnd: function onMoveEnd(movedFeatures) {
|
|
3926
|
+
var _onMoveEndRef$current;
|
|
3927
|
+
return (_onMoveEndRef$current = onMoveEndRef.current) === null || _onMoveEndRef$current === void 0 ? void 0 : _onMoveEndRef$current.call(onMoveEndRef, movedFeatures);
|
|
3928
|
+
},
|
|
3929
|
+
onMoveStart: function onMoveStart() {
|
|
3930
|
+
var _onMoveStartRef$curre;
|
|
3931
|
+
return (_onMoveStartRef$curre = onMoveStartRef.current) === null || _onMoveStartRef$curre === void 0 ? void 0 : _onMoveStartRef$curre.call(onMoveStartRef);
|
|
3932
|
+
}
|
|
3933
|
+
});
|
|
3934
|
+
if (!moveFeatures) {
|
|
3935
|
+
return function () {};
|
|
3936
|
+
}
|
|
3937
|
+
map.addInteraction(moveFeatures.translate);
|
|
3938
|
+
return function () {
|
|
3939
|
+
moveFeatures.dispose();
|
|
3940
|
+
map.removeInteraction(moveFeatures.translate);
|
|
3941
|
+
};
|
|
3942
|
+
}, [map, features, active]);
|
|
3943
|
+
};
|
|
3944
|
+
|
|
3803
3945
|
var initializeOpenLayersProjections = function initializeOpenLayersProjections() {
|
|
3804
3946
|
WMProj4Defs.forEach(function (_ref) {
|
|
3805
3947
|
var _ref2 = _slicedToArray(_ref, 2),
|
|
@@ -4243,6 +4385,7 @@ var splitLine = function splitLine(drawFeature, splitFeature) {
|
|
|
4243
4385
|
return featureCollection(newLines);
|
|
4244
4386
|
};
|
|
4245
4387
|
|
|
4388
|
+
var _excluded = ["id"];
|
|
4246
4389
|
/**
|
|
4247
4390
|
* Adds properties to the first geojson feature based on the given property object.
|
|
4248
4391
|
* It only extends or changes the properties which are defined in styleConfig,
|
|
@@ -4343,7 +4486,8 @@ var moveFeature = function moveFeature(currentGeoJSON, newGeoJSON, featureLayerI
|
|
|
4343
4486
|
selectionType: selectionType
|
|
4344
4487
|
})
|
|
4345
4488
|
});
|
|
4346
|
-
|
|
4489
|
+
// remove id, objectName from copyFeature (the new, split off shape)
|
|
4490
|
+
newGeoJSON.features.push(asNewFeature(copyFeature));
|
|
4347
4491
|
return newGeoJSON.features.length - 1;
|
|
4348
4492
|
}
|
|
4349
4493
|
if (geometry.type === 'LineString' && geometry.coordinates.length > 2 && reason === NEW_LINESTRING_CREATED) {
|
|
@@ -4358,7 +4502,8 @@ var moveFeature = function moveFeature(currentGeoJSON, newGeoJSON, featureLayerI
|
|
|
4358
4502
|
selectionType: selectionType
|
|
4359
4503
|
})
|
|
4360
4504
|
});
|
|
4361
|
-
|
|
4505
|
+
// remove id, objectName from copyFeature (the new, split off shape)
|
|
4506
|
+
newGeoJSON.features.push(asNewFeature(_copyFeature));
|
|
4362
4507
|
return newGeoJSON.features.length - 1;
|
|
4363
4508
|
}
|
|
4364
4509
|
if (geometry.type === 'Point' && (currentFeature === null || currentFeature === void 0 ? void 0 : currentFeature.geometry.type) === 'Point' && currentFeature.geometry.coordinates.length > 0 && reason === NEW_POINT_CREATED) {
|
|
@@ -4551,6 +4696,41 @@ var createInterSections = function createInterSections(geojson, otherGeoJSON) {
|
|
|
4551
4696
|
});
|
|
4552
4697
|
return intersections;
|
|
4553
4698
|
};
|
|
4699
|
+
var IDENTITY_PROPERTIES = ['objectName', 'isSelected', 'highlightSelectedFeature'];
|
|
4700
|
+
/**
|
|
4701
|
+
* Turns a feature which originates from another feature into a new feature: the
|
|
4702
|
+
* id and the properties identifying the original feature are removed
|
|
4703
|
+
* @param feature feature which originates from another feature
|
|
4704
|
+
* @returns feature without the identity of the original feature
|
|
4705
|
+
*/
|
|
4706
|
+
var asNewFeature = function asNewFeature(feature) {
|
|
4707
|
+
feature.id;
|
|
4708
|
+
var featureWithoutId = _objectWithoutProperties(feature, _excluded);
|
|
4709
|
+
var properties = _objectSpread2({}, featureWithoutId.properties);
|
|
4710
|
+
IDENTITY_PROPERTIES.forEach(function (property) {
|
|
4711
|
+
delete properties[property];
|
|
4712
|
+
});
|
|
4713
|
+
return _objectSpread2(_objectSpread2({}, featureWithoutId), {}, {
|
|
4714
|
+
properties: properties
|
|
4715
|
+
});
|
|
4716
|
+
};
|
|
4717
|
+
/**
|
|
4718
|
+
* Keeps the identity of the original feature on the first of the features it was
|
|
4719
|
+
* split into, the other features become new features
|
|
4720
|
+
* @param splitFeatures features resulting from splitting a feature
|
|
4721
|
+
* @param originalFeature feature which was split
|
|
4722
|
+
* @returns split features where only the first one keeps the original identity
|
|
4723
|
+
*/
|
|
4724
|
+
var keepIdentityOnFirstSplitFeature = function keepIdentityOnFirstSplitFeature(splitFeatures, originalFeature) {
|
|
4725
|
+
return splitFeatures.map(function (splitFeature, index) {
|
|
4726
|
+
if (index > 0) {
|
|
4727
|
+
return asNewFeature(splitFeature);
|
|
4728
|
+
}
|
|
4729
|
+
return _objectSpread2(_objectSpread2({}, splitFeature), (originalFeature === null || originalFeature === void 0 ? void 0 : originalFeature.id) !== undefined && {
|
|
4730
|
+
id: originalFeature.id
|
|
4731
|
+
});
|
|
4732
|
+
});
|
|
4733
|
+
};
|
|
4554
4734
|
var getGeoJson = function getGeoJson(geojson, shouldAllowMultipleShapes) {
|
|
4555
4735
|
if (shouldAllowMultipleShapes || !geojson.features.length) {
|
|
4556
4736
|
return geojson;
|
|
@@ -4619,14 +4799,21 @@ var isGeoJSONFeatureCreatedByTool = function isGeoJSONFeatureCreatedByTool(exist
|
|
|
4619
4799
|
};
|
|
4620
4800
|
var rewindGeometry = function rewindGeometry(geoJSON) {
|
|
4621
4801
|
return produce(geoJSON, function (geoJSONDraft) {
|
|
4622
|
-
|
|
4623
|
-
|
|
4802
|
+
var _geoJSONDraft$feature;
|
|
4803
|
+
if (!(geoJSONDraft !== null && geoJSONDraft !== void 0 && (_geoJSONDraft$feature = geoJSONDraft.features) !== null && _geoJSONDraft$feature !== void 0 && _geoJSONDraft$feature.length)) {
|
|
4804
|
+
return;
|
|
4805
|
+
}
|
|
4806
|
+
geoJSONDraft.features.forEach(function (draftFeature, index) {
|
|
4807
|
+
var _draftFeature$geometr, _draftFeature$geometr2;
|
|
4808
|
+
if (((_draftFeature$geometr = draftFeature.geometry) === null || _draftFeature$geometr === void 0 ? void 0 : _draftFeature$geometr.type) !== 'Polygon' || ((_draftFeature$geometr2 = draftFeature.geometry.coordinates[0]) === null || _draftFeature$geometr2 === void 0 ? void 0 : _draftFeature$geometr2.length) <= 1) {
|
|
4809
|
+
return;
|
|
4810
|
+
}
|
|
4811
|
+
var geometry = geoJSON.features[index].geometry;
|
|
4624
4812
|
var lineString = polygonToLine(geometry);
|
|
4625
4813
|
if (booleanClockwise(lineString.geometry.coordinates)) {
|
|
4626
|
-
|
|
4627
|
-
geoJSONDraft.features[0].geometry = rewind(geoJSONDraft.features[0].geometry);
|
|
4814
|
+
draftFeature.geometry = rewind(draftFeature.geometry);
|
|
4628
4815
|
}
|
|
4629
|
-
}
|
|
4816
|
+
});
|
|
4630
4817
|
});
|
|
4631
4818
|
};
|
|
4632
4819
|
var addGeoJSONPropertiesToFeature = function addGeoJSONPropertiesToFeature(geoJSONFeature, newProperties) {
|
|
@@ -4862,6 +5049,7 @@ var useGetWMSLayerStyleList = function useGetWMSLayerStyleList(serviceUrl, name)
|
|
|
4862
5049
|
* @returns object with wmLayer and if set an errorMessage
|
|
4863
5050
|
*/
|
|
4864
5051
|
var useGetWMLayerInstance = function useGetWMLayerInstance(layerFoundation) {
|
|
5052
|
+
var hasLayerFoundation = layerFoundation !== undefined;
|
|
4865
5053
|
var id = layerFoundation === null || layerFoundation === void 0 ? void 0 : layerFoundation.id;
|
|
4866
5054
|
var serviceUrl = (layerFoundation === null || layerFoundation === void 0 ? void 0 : layerFoundation.service) || '';
|
|
4867
5055
|
var name = (layerFoundation === null || layerFoundation === void 0 ? void 0 : layerFoundation.name) || '';
|
|
@@ -4882,7 +5070,7 @@ var useGetWMLayerInstance = function useGetWMLayerInstance(layerFoundation) {
|
|
|
4882
5070
|
var tmpWMLayer = webmapUtils.getWMLayerById(layerId);
|
|
4883
5071
|
var layerIdChanged = id && id !== (tmpWMLayer === null || tmpWMLayer === void 0 ? void 0 : tmpWMLayer.id);
|
|
4884
5072
|
var layerServiceChanged = (tmpWMLayer === null || tmpWMLayer === void 0 ? void 0 : tmpWMLayer.service) !== serviceUrl;
|
|
4885
|
-
if (layerServiceChanged || layerIdChanged) {
|
|
5073
|
+
if (serviceUrl && (layerServiceChanged || layerIdChanged)) {
|
|
4886
5074
|
// Make a new layer if the serviceUrl changes. (But not when the name changes)
|
|
4887
5075
|
var refTimeDimensionMode = wmDetermineDimensionMode({
|
|
4888
5076
|
name: name,
|
|
@@ -4900,6 +5088,9 @@ var useGetWMLayerInstance = function useGetWMLayerInstance(layerFoundation) {
|
|
|
4900
5088
|
webmapUtils.registerWMLayer(wmLayer, layerId);
|
|
4901
5089
|
}
|
|
4902
5090
|
React.useEffect(function () {
|
|
5091
|
+
if (!hasLayerFoundation || !serviceUrl) {
|
|
5092
|
+
return;
|
|
5093
|
+
}
|
|
4903
5094
|
// Set the name and parse the layer
|
|
4904
5095
|
var wmLayer = webmapUtils.getWMLayerById(layerId);
|
|
4905
5096
|
if (wmLayer.layerType !== layerType) {
|
|
@@ -4910,7 +5101,7 @@ var useGetWMLayerInstance = function useGetWMLayerInstance(layerFoundation) {
|
|
|
4910
5101
|
})["finally"](function () {
|
|
4911
5102
|
setLayer(wmLayer);
|
|
4912
5103
|
});
|
|
4913
|
-
}, [layerId, layerType, name, serviceUrl]);
|
|
5104
|
+
}, [hasLayerFoundation, layerId, layerType, name, serviceUrl]);
|
|
4914
5105
|
return {
|
|
4915
5106
|
wmLayer: layer,
|
|
4916
5107
|
errorMessage: errorMessage
|
|
@@ -4938,7 +5129,8 @@ var useQueryWMTSGetCapabilities = function useQueryWMTSGetCapabilities(serviceUr
|
|
|
4938
5129
|
return _queryFn2.apply(this, arguments);
|
|
4939
5130
|
}
|
|
4940
5131
|
return queryFn;
|
|
4941
|
-
}()
|
|
5132
|
+
}(),
|
|
5133
|
+
enabled: serviceUrl.length > 0
|
|
4942
5134
|
});
|
|
4943
5135
|
};
|
|
4944
5136
|
|
|
@@ -5655,6 +5847,17 @@ var useSetIntervalWhenVisible = function useSetIntervalWhenVisible(autoUpdate, r
|
|
|
5655
5847
|
* Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
|
|
5656
5848
|
* */
|
|
5657
5849
|
initializeOpenLayersProjections();
|
|
5850
|
+
var getLayerExtentForProjection = function getLayerExtentForProjection(wmLayer, projectionCode) {
|
|
5851
|
+
var crs = wmLayer.getCRSByName(projectionCode);
|
|
5852
|
+
if (crs !== null && crs !== void 0 && crs.bbox) {
|
|
5853
|
+
return crs.bbox.getExtent();
|
|
5854
|
+
}
|
|
5855
|
+
var geo = wmLayer.geographicBoundingBox;
|
|
5856
|
+
if (geo) {
|
|
5857
|
+
return transformExtent([parseFloat(geo.west), parseFloat(geo.south), parseFloat(geo.east), parseFloat(geo.north)], WMJSMAP_LONLAT_EPSGCODE, projectionCode);
|
|
5858
|
+
}
|
|
5859
|
+
return undefined;
|
|
5860
|
+
};
|
|
5658
5861
|
var useViewFromLayer = function useViewFromLayer(layerProps) {
|
|
5659
5862
|
var baseView = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
5660
5863
|
projection: 'EPSG:3857',
|
|
@@ -5680,11 +5883,11 @@ var useViewFromLayer = function useViewFromLayer(layerProps) {
|
|
|
5680
5883
|
if (!wmLayer) {
|
|
5681
5884
|
return;
|
|
5682
5885
|
}
|
|
5683
|
-
var
|
|
5684
|
-
if (!
|
|
5886
|
+
var extent = getLayerExtentForProjection(wmLayer, viewRef.current.getProjection().getCode());
|
|
5887
|
+
if (!extent) {
|
|
5685
5888
|
return;
|
|
5686
5889
|
}
|
|
5687
|
-
viewRef.current.fit(
|
|
5890
|
+
viewRef.current.fit(extent);
|
|
5688
5891
|
}, [wmLayer]);
|
|
5689
5892
|
return viewRef.current;
|
|
5690
5893
|
};
|
|
@@ -5900,13 +6103,141 @@ var DefaultBaseLayers = function DefaultBaseLayers(_ref) {
|
|
|
5900
6103
|
});
|
|
5901
6104
|
};
|
|
5902
6105
|
|
|
6106
|
+
/* *
|
|
6107
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6108
|
+
* you may not use this file except in compliance with the License.
|
|
6109
|
+
* You may obtain a copy of the License at
|
|
6110
|
+
*
|
|
6111
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
6112
|
+
*
|
|
6113
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
6114
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
6115
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
6116
|
+
* See the License for the specific language governing permissions and
|
|
6117
|
+
* limitations under the License.
|
|
6118
|
+
*
|
|
6119
|
+
* Copyright 2026 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
6120
|
+
* Copyright 2026 - Finnish Meteorological Institute (FMI)
|
|
6121
|
+
* Copyright 2026 - The Norwegian Meteorological Institute (MET Norway)
|
|
6122
|
+
* */
|
|
6123
|
+
var isBoxSelectModifier = function isBoxSelectModifier(event) {
|
|
6124
|
+
return platformModifierKeyOnly({
|
|
6125
|
+
originalEvent: event
|
|
6126
|
+
});
|
|
6127
|
+
};
|
|
6128
|
+
var createDragBoxSelect = function createDragBoxSelect(_ref) {
|
|
6129
|
+
var sources = _ref.sources,
|
|
6130
|
+
onBoxSelect = _ref.onBoxSelect;
|
|
6131
|
+
var dragBox = new DragBox({
|
|
6132
|
+
condition: platformModifierKeyOnly
|
|
6133
|
+
});
|
|
6134
|
+
var previewedFeatures = [];
|
|
6135
|
+
// Preview flags are set silently, so the source needs telling or it keeps its cached frame.
|
|
6136
|
+
var repaint = function repaint() {
|
|
6137
|
+
sources.forEach(function (source) {
|
|
6138
|
+
return source.changed();
|
|
6139
|
+
});
|
|
6140
|
+
};
|
|
6141
|
+
var setPreview = function setPreview(feature, isPreviewed) {
|
|
6142
|
+
feature.set('boxSelectPreview', isPreviewed, true);
|
|
6143
|
+
};
|
|
6144
|
+
var clearPreview = function clearPreview() {
|
|
6145
|
+
if (!previewedFeatures.length) {
|
|
6146
|
+
return;
|
|
6147
|
+
}
|
|
6148
|
+
previewedFeatures.forEach(function (feature) {
|
|
6149
|
+
setPreview(feature, false);
|
|
6150
|
+
});
|
|
6151
|
+
previewedFeatures = [];
|
|
6152
|
+
repaint();
|
|
6153
|
+
};
|
|
6154
|
+
var getIntersectingFeatures = function getIntersectingFeatures() {
|
|
6155
|
+
var extent = dragBox.getGeometry().getExtent();
|
|
6156
|
+
return sources.flatMap(function (source) {
|
|
6157
|
+
return source.getFeaturesInExtent(extent).filter(function (feature) {
|
|
6158
|
+
var _feature$getGeometry;
|
|
6159
|
+
return (_feature$getGeometry = feature.getGeometry()) === null || _feature$getGeometry === void 0 ? void 0 : _feature$getGeometry.intersectsExtent(extent);
|
|
6160
|
+
});
|
|
6161
|
+
});
|
|
6162
|
+
};
|
|
6163
|
+
dragBox.on('boxstart', function () {
|
|
6164
|
+
clearPreview();
|
|
6165
|
+
});
|
|
6166
|
+
dragBox.on('boxdrag', function () {
|
|
6167
|
+
var intersectingFeatures = getIntersectingFeatures();
|
|
6168
|
+
var intersectingSet = new Set(intersectingFeatures);
|
|
6169
|
+
var previousSet = new Set(previewedFeatures);
|
|
6170
|
+
var hasChanges = false;
|
|
6171
|
+
previewedFeatures.forEach(function (feature) {
|
|
6172
|
+
if (!intersectingSet.has(feature)) {
|
|
6173
|
+
setPreview(feature, false);
|
|
6174
|
+
hasChanges = true;
|
|
6175
|
+
}
|
|
6176
|
+
});
|
|
6177
|
+
intersectingFeatures.forEach(function (feature) {
|
|
6178
|
+
if (!previousSet.has(feature)) {
|
|
6179
|
+
setPreview(feature, true);
|
|
6180
|
+
hasChanges = true;
|
|
6181
|
+
}
|
|
6182
|
+
});
|
|
6183
|
+
previewedFeatures = intersectingFeatures;
|
|
6184
|
+
if (hasChanges) {
|
|
6185
|
+
repaint();
|
|
6186
|
+
}
|
|
6187
|
+
});
|
|
6188
|
+
dragBox.on('boxend', function (event) {
|
|
6189
|
+
clearPreview();
|
|
6190
|
+
var selectedFeatures = getIntersectingFeatures();
|
|
6191
|
+
if (selectedFeatures.length > 0) {
|
|
6192
|
+
var originalEvent = event.mapBrowserEvent.originalEvent;
|
|
6193
|
+
var addToSelection = Boolean(originalEvent === null || originalEvent === void 0 ? void 0 : originalEvent.shiftKey);
|
|
6194
|
+
onBoxSelect(selectedFeatures, addToSelection);
|
|
6195
|
+
}
|
|
6196
|
+
});
|
|
6197
|
+
return {
|
|
6198
|
+
dragBox: dragBox,
|
|
6199
|
+
dispose: clearPreview
|
|
6200
|
+
};
|
|
6201
|
+
};
|
|
6202
|
+
var useDragBoxSelect = function useDragBoxSelect(_ref2) {
|
|
6203
|
+
var map = _ref2.map,
|
|
6204
|
+
source = _ref2.source,
|
|
6205
|
+
active = _ref2.active,
|
|
6206
|
+
onBoxSelect = _ref2.onBoxSelect;
|
|
6207
|
+
var onBoxSelectRef = useRef(onBoxSelect);
|
|
6208
|
+
useEffect(function () {
|
|
6209
|
+
onBoxSelectRef.current = onBoxSelect;
|
|
6210
|
+
});
|
|
6211
|
+
useEffect(function () {
|
|
6212
|
+
if (!map || !source || !active) {
|
|
6213
|
+
return function () {};
|
|
6214
|
+
}
|
|
6215
|
+
var _createDragBoxSelect = createDragBoxSelect({
|
|
6216
|
+
sources: [source],
|
|
6217
|
+
onBoxSelect: function onBoxSelect(features, addToSelection) {
|
|
6218
|
+
var _onBoxSelectRef$curre;
|
|
6219
|
+
return (_onBoxSelectRef$curre = onBoxSelectRef.current) === null || _onBoxSelectRef$curre === void 0 ? void 0 : _onBoxSelectRef$curre.call(onBoxSelectRef, features, addToSelection);
|
|
6220
|
+
}
|
|
6221
|
+
}),
|
|
6222
|
+
dragBox = _createDragBoxSelect.dragBox,
|
|
6223
|
+
dispose = _createDragBoxSelect.dispose;
|
|
6224
|
+
map.addInteraction(dragBox);
|
|
6225
|
+
return function () {
|
|
6226
|
+
dispose();
|
|
6227
|
+
map.removeInteraction(dragBox);
|
|
6228
|
+
};
|
|
6229
|
+
}, [map, source, active]);
|
|
6230
|
+
};
|
|
6231
|
+
|
|
5903
6232
|
var FeatureLayer = function FeatureLayer(_ref) {
|
|
6233
|
+
var _moveFeatures$isMovab;
|
|
5904
6234
|
var features = _ref.features,
|
|
5905
6235
|
style = _ref.style,
|
|
5906
6236
|
zIndex = _ref.zIndex,
|
|
5907
6237
|
hoverSelect = _ref.hoverSelect,
|
|
5908
6238
|
clickOnFeature = _ref.clickOnFeature,
|
|
5909
6239
|
boxSelect = _ref.boxSelect,
|
|
6240
|
+
moveFeatures = _ref.moveFeatures,
|
|
5910
6241
|
layerId = _ref.layerId,
|
|
5911
6242
|
testId = _ref.testId,
|
|
5912
6243
|
opacity = _ref.opacity,
|
|
@@ -5920,6 +6251,8 @@ var FeatureLayer = function FeatureLayer(_ref) {
|
|
|
5920
6251
|
_useState2 = _slicedToArray(_useState, 2),
|
|
5921
6252
|
source = _useState2[0],
|
|
5922
6253
|
setSource = _useState2[1];
|
|
6254
|
+
var isMovingRef = useRef(false);
|
|
6255
|
+
var pendingFeaturesRef = useRef(undefined);
|
|
5923
6256
|
var layerRef = useRef(undefined);
|
|
5924
6257
|
useEffect(function () {
|
|
5925
6258
|
if (!map || !visible) {
|
|
@@ -5971,21 +6304,36 @@ var FeatureLayer = function FeatureLayer(_ref) {
|
|
|
5971
6304
|
var _layerRef$current3;
|
|
5972
6305
|
(_layerRef$current3 = layerRef.current) === null || _layerRef$current3 === void 0 || _layerRef$current3.setVisible(visible);
|
|
5973
6306
|
}, [visible]);
|
|
5974
|
-
|
|
6307
|
+
var syncSource = React.useCallback(function (nextFeatures) {
|
|
5975
6308
|
if (!source) {
|
|
5976
6309
|
return;
|
|
5977
6310
|
}
|
|
5978
6311
|
source.clear();
|
|
5979
|
-
if (
|
|
5980
|
-
source.addFeatures(
|
|
6312
|
+
if (nextFeatures.length > 0) {
|
|
6313
|
+
source.addFeatures(nextFeatures);
|
|
6314
|
+
}
|
|
6315
|
+
}, [source]);
|
|
6316
|
+
useEffect(function () {
|
|
6317
|
+
if (!source) {
|
|
6318
|
+
return;
|
|
6319
|
+
}
|
|
6320
|
+
// Rebuilding the source mid-drag would swap the features out from under the
|
|
6321
|
+
// move interaction, so it is deferred until the move has finished.
|
|
6322
|
+
if (isMovingRef.current) {
|
|
6323
|
+
pendingFeaturesRef.current = features;
|
|
6324
|
+
return;
|
|
5981
6325
|
}
|
|
5982
|
-
|
|
6326
|
+
syncSource(features !== null && features !== void 0 ? features : []);
|
|
6327
|
+
}, [source, features, syncSource]);
|
|
5983
6328
|
useEffect(function () {
|
|
5984
6329
|
if (!map || !source || !hoverSelect || !hoverSelect.active || !visible) {
|
|
5985
6330
|
return function () {};
|
|
5986
6331
|
}
|
|
5987
6332
|
var previousHover = [];
|
|
5988
6333
|
var pointerMoveFunction = debounce(function (evt) {
|
|
6334
|
+
if (isMovingRef.current) {
|
|
6335
|
+
return;
|
|
6336
|
+
}
|
|
5989
6337
|
var hoveredFeature = map.forEachFeatureAtPixel(evt.pixel, function (feature, layer) {
|
|
5990
6338
|
if (!layer || (layer === null || layer === void 0 ? void 0 : layer.getSource()) !== source) {
|
|
5991
6339
|
return false;
|
|
@@ -6045,64 +6393,34 @@ var FeatureLayer = function FeatureLayer(_ref) {
|
|
|
6045
6393
|
unByKey(eventKey);
|
|
6046
6394
|
};
|
|
6047
6395
|
}, [map, source, clickOnFeature, visible]);
|
|
6048
|
-
|
|
6049
|
-
|
|
6050
|
-
|
|
6396
|
+
useDragBoxSelect({
|
|
6397
|
+
map: map,
|
|
6398
|
+
source: source,
|
|
6399
|
+
active: Boolean((boxSelect === null || boxSelect === void 0 ? void 0 : boxSelect.active) && visible),
|
|
6400
|
+
onBoxSelect: boxSelect === null || boxSelect === void 0 ? void 0 : boxSelect.onBoxSelect
|
|
6401
|
+
});
|
|
6402
|
+
var handleMoveStart = React.useCallback(function () {
|
|
6403
|
+
isMovingRef.current = true;
|
|
6404
|
+
}, []);
|
|
6405
|
+
var handleMoveEnd = React.useCallback(function (movedFeatures) {
|
|
6406
|
+
isMovingRef.current = false;
|
|
6407
|
+
var pendingFeatures = pendingFeaturesRef.current;
|
|
6408
|
+
pendingFeaturesRef.current = undefined;
|
|
6409
|
+
if (pendingFeatures) {
|
|
6410
|
+
syncSource(pendingFeatures);
|
|
6411
|
+
}
|
|
6412
|
+
if (movedFeatures.length > 0) {
|
|
6413
|
+
moveFeatures === null || moveFeatures === void 0 || moveFeatures.onMoveEnd(movedFeatures);
|
|
6414
|
+
}
|
|
6415
|
+
}, [moveFeatures, syncSource]);
|
|
6416
|
+
useMoveFeatures({
|
|
6417
|
+
map: map,
|
|
6418
|
+
features: features,
|
|
6419
|
+
active: Boolean((moveFeatures === null || moveFeatures === void 0 ? void 0 : moveFeatures.active) && visible),
|
|
6420
|
+
isMovable: (_moveFeatures$isMovab = moveFeatures === null || moveFeatures === void 0 ? void 0 : moveFeatures.isMovable) !== null && _moveFeatures$isMovab !== void 0 ? _moveFeatures$isMovab : isDefaultMovable,
|
|
6421
|
+
onMoveEnd: handleMoveEnd,
|
|
6422
|
+
onMoveStart: handleMoveStart
|
|
6051
6423
|
});
|
|
6052
|
-
useEffect(function () {
|
|
6053
|
-
if (!map || !source || !(boxSelect !== null && boxSelect !== void 0 && boxSelect.active) || !visible) {
|
|
6054
|
-
return function () {};
|
|
6055
|
-
}
|
|
6056
|
-
var dragBox = new DragBox({
|
|
6057
|
-
condition: platformModifierKeyOnly
|
|
6058
|
-
});
|
|
6059
|
-
var previewedFeatures = [];
|
|
6060
|
-
var clearPreview = function clearPreview() {
|
|
6061
|
-
previewedFeatures.forEach(function (feature) {
|
|
6062
|
-
feature.set('boxSelectPreview', false, true);
|
|
6063
|
-
});
|
|
6064
|
-
previewedFeatures = [];
|
|
6065
|
-
};
|
|
6066
|
-
dragBox.on('boxstart', function () {
|
|
6067
|
-
clearPreview();
|
|
6068
|
-
});
|
|
6069
|
-
dragBox.on('boxdrag', function () {
|
|
6070
|
-
var extent = dragBox.getGeometry().getExtent();
|
|
6071
|
-
var intersectingFeatures = source.getFeaturesInExtent(extent).filter(function (feature) {
|
|
6072
|
-
var _feature$getGeometry;
|
|
6073
|
-
return (_feature$getGeometry = feature.getGeometry()) === null || _feature$getGeometry === void 0 ? void 0 : _feature$getGeometry.intersectsExtent(extent);
|
|
6074
|
-
});
|
|
6075
|
-
var intersectingSet = new Set(intersectingFeatures);
|
|
6076
|
-
previewedFeatures.forEach(function (feature) {
|
|
6077
|
-
if (!intersectingSet.has(feature)) {
|
|
6078
|
-
feature.set('boxSelectPreview', false, true);
|
|
6079
|
-
}
|
|
6080
|
-
});
|
|
6081
|
-
intersectingFeatures.forEach(function (feature) {
|
|
6082
|
-
feature.set('boxSelectPreview', true, true);
|
|
6083
|
-
});
|
|
6084
|
-
previewedFeatures = intersectingFeatures;
|
|
6085
|
-
});
|
|
6086
|
-
dragBox.on('boxend', function (event) {
|
|
6087
|
-
clearPreview();
|
|
6088
|
-
var extent = dragBox.getGeometry().getExtent();
|
|
6089
|
-
var selectedFeatures = source.getFeaturesInExtent(extent).filter(function (feature) {
|
|
6090
|
-
var _feature$getGeometry2;
|
|
6091
|
-
return (_feature$getGeometry2 = feature.getGeometry()) === null || _feature$getGeometry2 === void 0 ? void 0 : _feature$getGeometry2.intersectsExtent(extent);
|
|
6092
|
-
});
|
|
6093
|
-
if (selectedFeatures.length > 0) {
|
|
6094
|
-
var _onBoxSelectRef$curre;
|
|
6095
|
-
var originalEvent = event.mapBrowserEvent.originalEvent;
|
|
6096
|
-
var addToSelection = Boolean(originalEvent === null || originalEvent === void 0 ? void 0 : originalEvent.shiftKey);
|
|
6097
|
-
(_onBoxSelectRef$curre = onBoxSelectRef.current) === null || _onBoxSelectRef$curre === void 0 || _onBoxSelectRef$curre.call(onBoxSelectRef, selectedFeatures, addToSelection);
|
|
6098
|
-
}
|
|
6099
|
-
});
|
|
6100
|
-
map.addInteraction(dragBox);
|
|
6101
|
-
return function () {
|
|
6102
|
-
clearPreview();
|
|
6103
|
-
map.removeInteraction(dragBox);
|
|
6104
|
-
};
|
|
6105
|
-
}, [map, source, boxSelect === null || boxSelect === void 0 ? void 0 : boxSelect.active, visible]);
|
|
6106
6424
|
return null;
|
|
6107
6425
|
};
|
|
6108
6426
|
|
|
@@ -6123,6 +6441,7 @@ var OpenLayersFeatureLayer = function OpenLayersFeatureLayer(_ref) {
|
|
|
6123
6441
|
hoverSelect = _ref.hoverSelect,
|
|
6124
6442
|
clickOnFeature = _ref.clickOnFeature,
|
|
6125
6443
|
boxSelect = _ref.boxSelect,
|
|
6444
|
+
moveFeatures = _ref.moveFeatures,
|
|
6126
6445
|
layerId = _ref.layerId,
|
|
6127
6446
|
testId = _ref.testId,
|
|
6128
6447
|
opacity = _ref.opacity,
|
|
@@ -6131,6 +6450,40 @@ var OpenLayersFeatureLayer = function OpenLayersFeatureLayer(_ref) {
|
|
|
6131
6450
|
_ref$visible = _ref.visible,
|
|
6132
6451
|
visible = _ref$visible === void 0 ? true : _ref$visible;
|
|
6133
6452
|
var projection = useProjection();
|
|
6453
|
+
var onMoveEnd = moveFeatures === null || moveFeatures === void 0 ? void 0 : moveFeatures.onMoveEnd;
|
|
6454
|
+
var handleMoveEnd = useCallback(function (olFeatures) {
|
|
6455
|
+
if (!onMoveEnd || !projection) {
|
|
6456
|
+
return;
|
|
6457
|
+
}
|
|
6458
|
+
var formatter = new GeoJSON({
|
|
6459
|
+
featureProjection: projection
|
|
6460
|
+
});
|
|
6461
|
+
var movedFeatures = olFeatures.reduce(function (acc, olFeature) {
|
|
6462
|
+
var featureId = getOlFeatureKey(olFeature);
|
|
6463
|
+
var geometry = olFeature.getGeometry();
|
|
6464
|
+
if (!featureId || !geometry) {
|
|
6465
|
+
return acc;
|
|
6466
|
+
}
|
|
6467
|
+
var geoJSONGeometry = formatter.writeGeometryObject(geometry);
|
|
6468
|
+
if ('coordinates' in geoJSONGeometry) {
|
|
6469
|
+
geoJSONGeometry.coordinates = roundCoordinates(geoJSONGeometry.coordinates);
|
|
6470
|
+
}
|
|
6471
|
+
acc.push({
|
|
6472
|
+
featureId: featureId,
|
|
6473
|
+
geometry: geoJSONGeometry
|
|
6474
|
+
});
|
|
6475
|
+
return acc;
|
|
6476
|
+
}, []);
|
|
6477
|
+
if (movedFeatures.length > 0) {
|
|
6478
|
+
onMoveEnd(movedFeatures);
|
|
6479
|
+
}
|
|
6480
|
+
}, [onMoveEnd, projection]);
|
|
6481
|
+
var moveFeaturesConfig = useMemo(function () {
|
|
6482
|
+
return moveFeatures ? {
|
|
6483
|
+
active: moveFeatures.active,
|
|
6484
|
+
onMoveEnd: handleMoveEnd
|
|
6485
|
+
} : undefined;
|
|
6486
|
+
}, [moveFeatures, handleMoveEnd]);
|
|
6134
6487
|
var featureCollectionRef = useRef(undefined);
|
|
6135
6488
|
var projectionRef = useRef(projection);
|
|
6136
6489
|
var features = useRef([]);
|
|
@@ -6139,7 +6492,7 @@ var OpenLayersFeatureLayer = function OpenLayersFeatureLayer(_ref) {
|
|
|
6139
6492
|
if (projection && featureCollection) {
|
|
6140
6493
|
featureCollectionRef.current = featureCollection;
|
|
6141
6494
|
projectionRef.current = projection;
|
|
6142
|
-
var formatter = new
|
|
6495
|
+
var formatter = new GeoJSON({
|
|
6143
6496
|
featureProjection: projection
|
|
6144
6497
|
});
|
|
6145
6498
|
features.current = formatter.readFeatures(featureCollection);
|
|
@@ -6156,6 +6509,7 @@ var OpenLayersFeatureLayer = function OpenLayersFeatureLayer(_ref) {
|
|
|
6156
6509
|
features: features.current,
|
|
6157
6510
|
hoverSelect: hoverSelect,
|
|
6158
6511
|
layerId: layerId,
|
|
6512
|
+
moveFeatures: moveFeaturesConfig,
|
|
6159
6513
|
opacity: opacity,
|
|
6160
6514
|
style: style,
|
|
6161
6515
|
testId: testId,
|
|
@@ -9571,7 +9925,22 @@ var FEATURE_MY_LOCATION = new Style$1({
|
|
|
9571
9925
|
ctx.restore();
|
|
9572
9926
|
}
|
|
9573
9927
|
});
|
|
9928
|
+
var SELECTED_FEATURE_COLOR = '#006CFD';
|
|
9929
|
+
var getBoxSelectPreviewStyle = function getBoxSelectPreviewStyle(fill) {
|
|
9930
|
+
return new Style$1({
|
|
9931
|
+
stroke: new Stroke({
|
|
9932
|
+
color: SELECTED_FEATURE_COLOR,
|
|
9933
|
+
width: 2,
|
|
9934
|
+
lineDash: [4, 4]
|
|
9935
|
+
}),
|
|
9936
|
+
fill: new Fill({
|
|
9937
|
+
color: geowebColorToOpenLayersColor(fill, 0.3)
|
|
9938
|
+
}),
|
|
9939
|
+
zIndex: 9997
|
|
9940
|
+
});
|
|
9941
|
+
};
|
|
9574
9942
|
var getFeaturePointStyle = function getFeaturePointStyle(fillColor, fillOpacity) {
|
|
9943
|
+
var isSelected = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
9575
9944
|
return new Style$1({
|
|
9576
9945
|
renderer: function renderer(pixelCoordinates, state) {
|
|
9577
9946
|
var ctx = state.context,
|
|
@@ -9586,10 +9955,33 @@ var getFeaturePointStyle = function getFeaturePointStyle(fillColor, fillOpacity)
|
|
|
9586
9955
|
ctx.arc(coord[0], coord[1], 9 * pixelRatio, 0, 2 * Math.PI);
|
|
9587
9956
|
ctx.fill();
|
|
9588
9957
|
ctx.shadowBlur = 0;
|
|
9958
|
+
if (isSelected) {
|
|
9959
|
+
ctx.strokeStyle = SELECTED_FEATURE_COLOR;
|
|
9960
|
+
ctx.lineWidth = 3 * pixelRatio;
|
|
9961
|
+
ctx.beginPath();
|
|
9962
|
+
ctx.arc(coord[0], coord[1], 12 * pixelRatio, 0, 2 * Math.PI);
|
|
9963
|
+
ctx.stroke();
|
|
9964
|
+
}
|
|
9589
9965
|
ctx.restore();
|
|
9590
9966
|
}
|
|
9591
9967
|
});
|
|
9592
9968
|
};
|
|
9969
|
+
// For icon points; getFeaturePointStyle draws the ring for the rest.
|
|
9970
|
+
var SELECTED_POINT_HALO_STYLE = new Style$1({
|
|
9971
|
+
renderer: function renderer(pixelCoordinates, state) {
|
|
9972
|
+
var ctx = state.context,
|
|
9973
|
+
pixelRatio = state.pixelRatio;
|
|
9974
|
+
var coord = pixelCoordinates;
|
|
9975
|
+
ctx.save();
|
|
9976
|
+
ctx.strokeStyle = SELECTED_FEATURE_COLOR;
|
|
9977
|
+
ctx.lineWidth = 3 * pixelRatio;
|
|
9978
|
+
ctx.beginPath();
|
|
9979
|
+
ctx.arc(coord[0], coord[1], 16 * pixelRatio, 0, 2 * Math.PI);
|
|
9980
|
+
ctx.stroke();
|
|
9981
|
+
ctx.restore();
|
|
9982
|
+
},
|
|
9983
|
+
zIndex: 9998
|
|
9984
|
+
});
|
|
9593
9985
|
var FEATURE_POINT_MODIFY = new Style$1({
|
|
9594
9986
|
renderer: function renderer(pixelCoordinates, state) {
|
|
9595
9987
|
var ctx = state.context,
|
|
@@ -10018,27 +10410,23 @@ var genericOpenLayersFeatureStyle = function genericOpenLayersFeatureStyle(featu
|
|
|
10018
10410
|
}
|
|
10019
10411
|
return undefined;
|
|
10020
10412
|
}
|
|
10413
|
+
var isSelectedFeature = Boolean(highlightSelectedFeature || isSelected);
|
|
10414
|
+
var canHighlightPoint = mapFeatureClass !== MapFeatureClass.ObservationStation && mapFeatureClass !== MapFeatureClass.Plugin && selectionType !== 'fir';
|
|
10021
10415
|
if (((_feature$getGeometry3 = feature.getGeometry) === null || _feature$getGeometry3 === void 0 || (_feature$getGeometry3 = _feature$getGeometry3.call(feature)) === null || _feature$getGeometry3 === void 0 ? void 0 : _feature$getGeometry3.getType()) === 'Point' && props.iconPath) {
|
|
10022
10416
|
var iconStyle = customIconStyle(feature);
|
|
10417
|
+
var styles = [iconStyle];
|
|
10418
|
+
if (isSelectedFeature && canHighlightPoint) {
|
|
10419
|
+
styles.unshift(SELECTED_POINT_HALO_STYLE);
|
|
10420
|
+
}
|
|
10023
10421
|
if (hoverLabelStyle) {
|
|
10024
|
-
|
|
10422
|
+
styles.push(hoverLabelStyle);
|
|
10025
10423
|
}
|
|
10026
|
-
return iconStyle;
|
|
10424
|
+
return styles.length === 1 ? iconStyle : styles;
|
|
10027
10425
|
}
|
|
10028
10426
|
var shouldHighlight = geometry && geometry.getType() !== 'Point' && mapFeatureClass !== MapFeatureClass.ObservationStation && mapFeatureClass !== MapFeatureClass.Plugin && selectionType !== 'fir';
|
|
10029
10427
|
// Preview highlight during box-select drag
|
|
10030
10428
|
if (boxSelectPreview && shouldHighlight) {
|
|
10031
|
-
return
|
|
10032
|
-
stroke: new Stroke({
|
|
10033
|
-
color: '#006CFD',
|
|
10034
|
-
width: 2,
|
|
10035
|
-
lineDash: [4, 4]
|
|
10036
|
-
}),
|
|
10037
|
-
fill: new Fill({
|
|
10038
|
-
color: geowebColorToOpenLayersColor(fill, 0.3)
|
|
10039
|
-
}),
|
|
10040
|
-
zIndex: 9997
|
|
10041
|
-
});
|
|
10429
|
+
return getBoxSelectPreviewStyle(fill);
|
|
10042
10430
|
}
|
|
10043
10431
|
// Highlight selected features (applies to predefined areas, etc)
|
|
10044
10432
|
if ((highlightSelectedFeature || isSelected) && shouldHighlight) {
|
|
@@ -10072,7 +10460,7 @@ var genericOpenLayersFeatureStyle = function genericOpenLayersFeatureStyle(featu
|
|
|
10072
10460
|
return [].concat(_toConsumableArray(inlineFeatureStyle(feature)), [hoverLabelStyle]);
|
|
10073
10461
|
}
|
|
10074
10462
|
if ((!mapFeatureClass || mapFeatureClass === MapFeatureClass["default"]) && geometry && selectionType === 'point') {
|
|
10075
|
-
return getFeaturePointStyle(fill, effectiveFillOpacity);
|
|
10463
|
+
return getFeaturePointStyle(fill, effectiveFillOpacity, isSelectedFeature && canHighlightPoint);
|
|
10076
10464
|
}
|
|
10077
10465
|
if (fill || stroke) {
|
|
10078
10466
|
return inlineFeatureStyle(feature);
|
|
@@ -10701,10 +11089,12 @@ var OpenLayersMapDraw = function OpenLayersMapDraw(_ref) {
|
|
|
10701
11089
|
viewOnlyStyle = _ref.viewOnlyStyle,
|
|
10702
11090
|
geojson = _ref.geojson,
|
|
10703
11091
|
selectedFeatureIndex = _ref.selectedFeatureIndex,
|
|
11092
|
+
selectedFeatureIndices = _ref.selectedFeatureIndices,
|
|
10704
11093
|
exitDrawModeCallback = _ref.exitDrawModeCallback,
|
|
10705
11094
|
updateGeojson = _ref.updateGeojson,
|
|
10706
11095
|
onViewOnlyFeatureClick = _ref.onViewOnlyFeatureClick,
|
|
10707
|
-
onNoFeatureClick = _ref.onNoFeatureClick
|
|
11096
|
+
onNoFeatureClick = _ref.onNoFeatureClick,
|
|
11097
|
+
boxSelect = _ref.boxSelect;
|
|
10708
11098
|
var _React$useContext = React.useContext(MapContext),
|
|
10709
11099
|
map = _React$useContext.map;
|
|
10710
11100
|
var projection = useProjection();
|
|
@@ -10712,10 +11102,12 @@ var OpenLayersMapDraw = function OpenLayersMapDraw(_ref) {
|
|
|
10712
11102
|
var updateGeojsonRef = React.useRef(updateGeojson);
|
|
10713
11103
|
var onViewOnlyFeatureClickRef = React.useRef(onViewOnlyFeatureClick);
|
|
10714
11104
|
var onNoFeatureClickRef = React.useRef(onNoFeatureClick);
|
|
11105
|
+
var boxSelectRef = React.useRef(boxSelect);
|
|
10715
11106
|
exitDrawModeCallbackRef.current = exitDrawModeCallback;
|
|
10716
11107
|
updateGeojsonRef.current = updateGeojson;
|
|
10717
11108
|
onViewOnlyFeatureClickRef.current = onViewOnlyFeatureClick;
|
|
10718
11109
|
onNoFeatureClickRef.current = onNoFeatureClick;
|
|
11110
|
+
boxSelectRef.current = boxSelect;
|
|
10719
11111
|
React.useEffect(function () {
|
|
10720
11112
|
var _geojson$features$sel;
|
|
10721
11113
|
if (!map || !isInEditMode) {
|
|
@@ -10733,10 +11125,18 @@ var OpenLayersMapDraw = function OpenLayersMapDraw(_ref) {
|
|
|
10733
11125
|
var drawOperation = createDrawOperation(actualDrawMode, selectedFeature === null || selectedFeature === void 0 ? void 0 : selectedFeature.geometry.type);
|
|
10734
11126
|
var drawStyle = drawStyles[actualDrawMode];
|
|
10735
11127
|
var modifyStyle = modifyStyles[actualDrawMode];
|
|
10736
|
-
var geojsonFormatter = new
|
|
11128
|
+
var geojsonFormatter = new GeoJSON({
|
|
10737
11129
|
featureProjection: projection
|
|
10738
11130
|
});
|
|
10739
11131
|
var allFeatures = geojson ? geojsonFormatter.readFeatures(geojson) : [];
|
|
11132
|
+
if (selectedFeatureIndices) {
|
|
11133
|
+
var selectedIndexSet = new Set(selectedFeatureIndices);
|
|
11134
|
+
allFeatures.forEach(function (feature, index) {
|
|
11135
|
+
var isSelected = selectedIndexSet.has(index);
|
|
11136
|
+
feature.set('isSelected', isSelected, true);
|
|
11137
|
+
feature.set('highlightSelectedFeature', isSelected, true);
|
|
11138
|
+
});
|
|
11139
|
+
}
|
|
10740
11140
|
var viewOnlyFeatures = allFeatures.filter(function (_f, i) {
|
|
10741
11141
|
return i !== selectedFeatureIndex;
|
|
10742
11142
|
});
|
|
@@ -10753,9 +11153,16 @@ var OpenLayersMapDraw = function OpenLayersMapDraw(_ref) {
|
|
|
10753
11153
|
features: editFeatureCollection
|
|
10754
11154
|
});
|
|
10755
11155
|
var selectedFeatureHasGeometry = selectedFeature && !isGeoJSONGeometryEmpty(selectedFeature);
|
|
11156
|
+
// Without this the shape being edited is the only one missing a drag box outline.
|
|
11157
|
+
var editStyle = function editStyle(feature, resolution) {
|
|
11158
|
+
if (feature.get('boxSelectPreview')) {
|
|
11159
|
+
return getBoxSelectPreviewStyle(feature.get('fill'));
|
|
11160
|
+
}
|
|
11161
|
+
return typeof modifyStyle === 'function' ? modifyStyle(feature, resolution) : modifyStyle;
|
|
11162
|
+
};
|
|
10756
11163
|
var layer = new VectorLayer({
|
|
10757
11164
|
source: source,
|
|
10758
|
-
style:
|
|
11165
|
+
style: editStyle,
|
|
10759
11166
|
zIndex: 1000000
|
|
10760
11167
|
});
|
|
10761
11168
|
map.addLayer(layer);
|
|
@@ -10773,8 +11180,9 @@ var OpenLayersMapDraw = function OpenLayersMapDraw(_ref) {
|
|
|
10773
11180
|
}
|
|
10774
11181
|
});
|
|
10775
11182
|
if (features.length) {
|
|
10776
|
-
var _onViewOnlyFeatureCli;
|
|
10777
|
-
(
|
|
11183
|
+
var _event$originalEvent, _onViewOnlyFeatureCli;
|
|
11184
|
+
var isShiftClick = Boolean((_event$originalEvent = event.originalEvent) === null || _event$originalEvent === void 0 ? void 0 : _event$originalEvent.shiftKey);
|
|
11185
|
+
(_onViewOnlyFeatureCli = onViewOnlyFeatureClickRef.current) === null || _onViewOnlyFeatureCli === void 0 || _onViewOnlyFeatureCli.call(onViewOnlyFeatureClickRef, features, isShiftClick);
|
|
10778
11186
|
} else {
|
|
10779
11187
|
var _onNoFeatureClickRef$;
|
|
10780
11188
|
(_onNoFeatureClickRef$ = onNoFeatureClickRef.current) === null || _onNoFeatureClickRef$ === void 0 || _onNoFeatureClickRef$.call(onNoFeatureClickRef);
|
|
@@ -10807,7 +11215,7 @@ var OpenLayersMapDraw = function OpenLayersMapDraw(_ref) {
|
|
|
10807
11215
|
return;
|
|
10808
11216
|
}
|
|
10809
11217
|
// GeoJsons are always treated as latlon, therefore using EPSG:4326 as transformer does not do anything except translating the object.
|
|
10810
|
-
var geojsonFormatterNoTransform = new
|
|
11218
|
+
var geojsonFormatterNoTransform = new GeoJSON({
|
|
10811
11219
|
featureProjection: 'EPSG:4326'
|
|
10812
11220
|
});
|
|
10813
11221
|
var isLineSplit = selectedFeature.geometry.type === 'LineString';
|
|
@@ -10821,9 +11229,11 @@ var OpenLayersMapDraw = function OpenLayersMapDraw(_ref) {
|
|
|
10821
11229
|
}
|
|
10822
11230
|
// Transform back to orig
|
|
10823
11231
|
var splitResultAsGeoJson = geojsonFormatter.writeFeaturesObject(geojsonFormatterNoTransform.readFeatures(splitResult));
|
|
11232
|
+
// Only the first part continues as the current feature, the other parts are new features
|
|
11233
|
+
var splitFeatures = keepIdentityOnFirstSplitFeature(splitResultAsGeoJson.features, selectedFeature);
|
|
10824
11234
|
// Assemble the result.
|
|
10825
11235
|
var newGeoJson = _objectSpread2(_objectSpread2({}, geojson), {}, {
|
|
10826
|
-
features: [].concat(_toConsumableArray(geojson.features.slice(0, selectedFeatureIndex)), _toConsumableArray(
|
|
11236
|
+
features: [].concat(_toConsumableArray(geojson.features.slice(0, selectedFeatureIndex)), _toConsumableArray(splitFeatures), _toConsumableArray(geojson.features.slice(selectedFeatureIndex + 1)))
|
|
10827
11237
|
});
|
|
10828
11238
|
updateGeojson === null || updateGeojson === void 0 || updateGeojson(newGeoJson, NEW_FEATURE_CREATED);
|
|
10829
11239
|
};
|
|
@@ -11040,7 +11450,7 @@ var OpenLayersMapDraw = function OpenLayersMapDraw(_ref) {
|
|
|
11040
11450
|
updateFeature(evt.features.getArray()[0]);
|
|
11041
11451
|
});
|
|
11042
11452
|
}
|
|
11043
|
-
var translate = new Translate({
|
|
11453
|
+
var translate = new Translate$1({
|
|
11044
11454
|
features: editFeatureCollection
|
|
11045
11455
|
});
|
|
11046
11456
|
translate.on('translateend', function (evt) {
|
|
@@ -11056,6 +11466,9 @@ var OpenLayersMapDraw = function OpenLayersMapDraw(_ref) {
|
|
|
11056
11466
|
// immediately show a grabbing cursor on mousedown (before any movement).
|
|
11057
11467
|
var isPointerDownNearCorner = false;
|
|
11058
11468
|
var handlePointerDownNearCorner = function handlePointerDownNearCorner(event) {
|
|
11469
|
+
if (isBoxSelectModifier(event)) {
|
|
11470
|
+
return;
|
|
11471
|
+
}
|
|
11059
11472
|
if (!isBoxOrSquare || !selectedFeatureHasGeometry) {
|
|
11060
11473
|
return;
|
|
11061
11474
|
}
|
|
@@ -11106,6 +11519,9 @@ var OpenLayersMapDraw = function OpenLayersMapDraw(_ref) {
|
|
|
11106
11519
|
isPointerDownNearCorner = false;
|
|
11107
11520
|
};
|
|
11108
11521
|
var startRotateIfOnHandle = function startRotateIfOnHandle(event) {
|
|
11522
|
+
if (isBoxSelectModifier(event)) {
|
|
11523
|
+
return;
|
|
11524
|
+
}
|
|
11109
11525
|
if (!isBoxOrSquareRotatable || !selectedFeatureHasGeometry) {
|
|
11110
11526
|
return;
|
|
11111
11527
|
}
|
|
@@ -11321,14 +11737,36 @@ var OpenLayersMapDraw = function OpenLayersMapDraw(_ref) {
|
|
|
11321
11737
|
_viewport2.addEventListener('pointerup', handlePointerUpAfterCorner);
|
|
11322
11738
|
}
|
|
11323
11739
|
window.addEventListener('keydown', abortOnEsc);
|
|
11740
|
+
// Read from the prop, not the ref: `boxSelect?.active` is a dependency of this
|
|
11741
|
+
// effect, so toggling it adds or removes the DragBox. Only `onBoxSelect` goes
|
|
11742
|
+
// through the ref, to keep an inline arrow from re-running the effect.
|
|
11743
|
+
// Not while sketching, or the drag would both box select and dangle the sketch.
|
|
11744
|
+
var shouldEnableBoxSelect = (boxSelect === null || boxSelect === void 0 ? void 0 : boxSelect.active) && actualDrawMode !== DRAWMODE.SPLIT && Boolean(selectedFeatureHasGeometry);
|
|
11745
|
+
var disposeBoxSelect;
|
|
11746
|
+
if (shouldEnableBoxSelect) {
|
|
11747
|
+
var _createDragBoxSelect = createDragBoxSelect({
|
|
11748
|
+
sources: [viewOnlySource, source],
|
|
11749
|
+
onBoxSelect: function onBoxSelect(features, addToSelection) {
|
|
11750
|
+
var _boxSelectRef$current;
|
|
11751
|
+
return (_boxSelectRef$current = boxSelectRef.current) === null || _boxSelectRef$current === void 0 ? void 0 : _boxSelectRef$current.onBoxSelect(features, addToSelection);
|
|
11752
|
+
}
|
|
11753
|
+
}),
|
|
11754
|
+
dragBox = _createDragBoxSelect.dragBox,
|
|
11755
|
+
dispose = _createDragBoxSelect.dispose;
|
|
11756
|
+
// Added last so it takes priority over Translate and Modify.
|
|
11757
|
+
interactions.push(dragBox);
|
|
11758
|
+
disposeBoxSelect = dispose;
|
|
11759
|
+
}
|
|
11324
11760
|
interactions.forEach(function (i) {
|
|
11325
11761
|
return map.addInteraction(i);
|
|
11326
11762
|
});
|
|
11327
11763
|
return function () {
|
|
11764
|
+
var _disposeBoxSelect;
|
|
11328
11765
|
map.getViewport().removeEventListener('dblclick', handleDoubleClickToClosePolygon);
|
|
11329
11766
|
map.getViewport().removeEventListener('click', handleClickNearPolygonStartPoint);
|
|
11330
11767
|
map.getViewport().removeEventListener('pointerdown', recordPointerDownPosition);
|
|
11331
11768
|
window.removeEventListener('keydown', abortOnEsc);
|
|
11769
|
+
(_disposeBoxSelect = disposeBoxSelect) === null || _disposeBoxSelect === void 0 || _disposeBoxSelect();
|
|
11332
11770
|
interactions.forEach(function (i) {
|
|
11333
11771
|
return map.removeInteraction(i);
|
|
11334
11772
|
});
|
|
@@ -11355,7 +11793,7 @@ var OpenLayersMapDraw = function OpenLayersMapDraw(_ref) {
|
|
|
11355
11793
|
// re-run when parents pass inline arrows. Re-running mid-sketch would
|
|
11356
11794
|
// tear down the Draw interaction and lose the in-progress polygon.
|
|
11357
11795
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
11358
|
-
}, [map, isInEditMode, geojson, projection, viewOnlyStyle, selectedFeatureIndex, drawMode]);
|
|
11796
|
+
}, [map, isInEditMode, geojson, projection, viewOnlyStyle, selectedFeatureIndex, selectedFeatureIndices, boxSelect === null || boxSelect === void 0 ? void 0 : boxSelect.active, drawMode]);
|
|
11359
11797
|
return null;
|
|
11360
11798
|
};
|
|
11361
11799
|
|
|
@@ -12974,6 +13412,51 @@ var endToolExampleConfig = {
|
|
|
12974
13412
|
}
|
|
12975
13413
|
};
|
|
12976
13414
|
|
|
13415
|
+
/* *
|
|
13416
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
13417
|
+
* you may not use this file except in compliance with the License.
|
|
13418
|
+
* You may obtain a copy of the License at
|
|
13419
|
+
*
|
|
13420
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13421
|
+
*
|
|
13422
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13423
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13424
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13425
|
+
* See the License for the specific language governing permissions and
|
|
13426
|
+
* limitations under the License.
|
|
13427
|
+
*
|
|
13428
|
+
* Copyright 2026 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
13429
|
+
* Copyright 2026 - Finnish Meteorological Institute (FMI)
|
|
13430
|
+
* Copyright 2026 - The Norwegian Meteorological Institute (MET Norway)
|
|
13431
|
+
* */
|
|
13432
|
+
var calculateNewSelection = function calculateNewSelection(currentSelectedIndices, clickedIndex, isShiftClick) {
|
|
13433
|
+
if (isShiftClick) {
|
|
13434
|
+
if (currentSelectedIndices.includes(clickedIndex)) {
|
|
13435
|
+
return currentSelectedIndices.filter(function (i) {
|
|
13436
|
+
return i !== clickedIndex;
|
|
13437
|
+
});
|
|
13438
|
+
}
|
|
13439
|
+
return [].concat(_toConsumableArray(currentSelectedIndices), [clickedIndex]);
|
|
13440
|
+
}
|
|
13441
|
+
var isSoleSelection = currentSelectedIndices.length === 1 && currentSelectedIndices[0] === clickedIndex;
|
|
13442
|
+
return isSoleSelection ? [] : [clickedIndex];
|
|
13443
|
+
};
|
|
13444
|
+
var getAffectedIndices = function getAffectedIndices(oldSelection, newSelection) {
|
|
13445
|
+
var allIndices = new Set([].concat(_toConsumableArray(oldSelection), _toConsumableArray(newSelection)));
|
|
13446
|
+
return Array.from(allIndices).filter(function (idx) {
|
|
13447
|
+
return oldSelection.includes(idx) !== newSelection.includes(idx);
|
|
13448
|
+
});
|
|
13449
|
+
};
|
|
13450
|
+
var shouldEnterEditMode = function shouldEnterEditMode(isReadonly, isShiftClick, newSelectionCount) {
|
|
13451
|
+
return !isReadonly && !isShiftClick && newSelectionCount === 1;
|
|
13452
|
+
};
|
|
13453
|
+
var shouldExitEditModeForMultiSelect = function shouldExitEditModeForMultiSelect(newSelectionCount) {
|
|
13454
|
+
return newSelectionCount > 1;
|
|
13455
|
+
};
|
|
13456
|
+
var calculateBoxSelection = function calculateBoxSelection(currentSelectedIndices, boxSelectedIndices, addToSelection) {
|
|
13457
|
+
return addToSelection ? Array.from(new Set([].concat(_toConsumableArray(currentSelectedIndices), _toConsumableArray(boxSelectedIndices)))) : boxSelectedIndices;
|
|
13458
|
+
};
|
|
13459
|
+
|
|
12977
13460
|
var ClickOnMapTool = function ClickOnMapTool(_ref) {
|
|
12978
13461
|
var isActive = _ref.isActive,
|
|
12979
13462
|
isVisible = _ref.isVisible,
|
|
@@ -13663,4 +14146,4 @@ var getLayerUpdateInfo = function getLayerUpdateInfo(wmLayer, mapId) {
|
|
|
13663
14146
|
return updateObject;
|
|
13664
14147
|
};
|
|
13665
14148
|
|
|
13666
|
-
export { BaseLayerType, CLASSNAME_MAP_MEASURE_TOOLTIP, ClickOnMapTool, Clock, DEFAULT_GEOJSON_STYLE_FILL_OPACITY, DRAWMODE, DefaultBaseLayers, DimensionSelectButton, DimensionSelectDialog, DimensionSelectSlider, EditModeButton as EditModeButtonField, FEATURE_DRAW_FILL_COLOR, FEATURE_DRAW_FILL_COLOR_TRANSPARENT, FEATURE_DRAW_SECONDARY_FILL_COLOR, FEATURE_DRAW_SECONDARY_STROKE_COLOR, FEATURE_DRAW_STROKE_COLOR, FEATURE_FILL, FEATURE_FILL_SELECTED, FEATURE_STROKE, FEATURE_STROKE_EDIT, FEATURE_STROKE_SELECTED, FEATURE_VERTICES_EDIT_HANDLES, FEATURE_VERTICE_HANDLE_IMAGE, FEATURE_VERTICE_IMAGE, FeatureLayer, FeatureLayers, GeoJSONTextField, IntersectionSelect, LayerInfoButton, LayerInfoDialog, LayerInfoLegend, LayerInfoList, LayerInfoText, Legend, LegendButton, LegendDialog, LegendLayout, MIN_HEIGHT, MIN_WIDTH, MapContext, MapControlButton, MapControls, MapDimensionSelect, MapFeatureClass, MapMeasure, MapTime, MapWarningProperties, NEW_FEATURE_CREATED, NEW_LINESTRING_CREATED, NEW_POINT_CREATED, OpenLayersFeatureLayer, OpenLayersGetFeatureInfo, OpenLayersLayer, OpenLayersMapDraw, OpenLayersMapView, OpenLayersZoomControl, POINTER_CLICK_TOLERANCE_PX, STAC_ASSET_STYLE_PREFIX, STAC_ITEM_PAGE_LIMIT, STAC_ITEM_SEARCH_FIELDS_CONFORMANCE, STAC_TEMPORAL_STEP_SAMPLE_LIMIT, SelectField, StoryLayoutGrid, TimeAwareEDRLocationLayer, TimeAwareGeoTIFFLayer, TimeAwareWMTSLayer, TimeContext, TimeawareImageSource, TimeawareImageSourceWMSLayer, WEBMAP_REACT_NAMESPACE, WMSLayer, WMTSLayer, XYZLayer, ZoomControls, addFeatureProperties, addGeoJSONProperties, addSelectionTypeToGeoJSON, basicExampleDrawOptions, basicExampleMultipleShapeDrawOptions, basicExampleMultipleShapeWithValuesDrawOptions, catmullRomSpline, clearImageCacheForAllMaps, colorMaps, createBoxBasedOnModifiedVertex, createIconStyle, createInterSections, createOval, currentlySupportedDrawModes, defaultBox, defaultCircle, defaultDelete, defaultEdrStyles, defaultFreehandLine, defaultGeoJSONStyleProperties, defaultIntersectionStyleProperties, defaultLayers, defaultLineString, defaultLocation, defaultModes, defaultOval, defaultPoint, defaultPolygon, defaultRotatableBox, defaultSmoothLine, defaultSplit, defaultSquare, defaultTimeFormat, dimensionConfig, drawPolyStoryStyles, drawStyles, emptyGeoJSON, endToolExampleConfig, exampleIntersectionOptions, exampleIntersectionWithShapeOptions, exampleIntersections, exampleIntersectionsMultiDrawTool, featureMultiPoint, featurePoint, featurePolygon, fetchStacCatalogCollections, fetchStacCatalogRoot, fetchStacCollection, fetchStacItem, fetchStacItems, fetchStacItemsPage, fetchStacItemsWithPagination, fillOptions, firSelectionType, formatTime, generateImageFromLegend, genericOpenLayersFeatureStyle, geowebColorToOpenLayersColor, getBoxRotateHandlePoints, getDimensionIcon, getDimensionLabel, getDimensionValue, getDimensionsList, getDoubleControlToolIcon, getDrawModeIdFromSelectionType, getFeatureCollection, getFeatureExtent, getFeaturePointStyle, getFirTitle, getGeoJSONPropertyValue, getGeoJson, getIcon, getIntersectionToolIcon, getIsInsideAcceptanceTime, getLastEmptyFeatureIndex, getLayerBbox, getLayerStyles, getLayerUpdateInfo, getLegendClass, getProj4, getRendersAsStyles, getStacAssetKeyFromStyle, getStacAssetStyles, getStacCollectionStyles, getStacFrameItemsToRender, getStacItemLookupWindowForTimes, getStacItemSearchUrl, getStacItemsUrl, getTimeDimension, getToolIcon, initializeOpenLayersProjections, inlineFeatureStyle, intersectPointGeoJSONS, intersectPolygonGeoJSONS, intersectionFeatureBE, intersectionFeatureNL, isBrowserReadableGeoTIFFAsset, isClickFromDrag, isGeoJSONFeatureCreatedByTool, isGeoJSONGeometryEmpty, isGeoTIFFAsset, isPointFeatureCollection, labelOptions, lineString, lineStringCollection, makeFeatureStyleDisc, makeFeatureStyleLoading, makeFeatureStyleMultiParam, makeFeatureStyleMultiParamLoading, makeFeatureStyleWind, makeLegendFromColorMap, makeLegendFromStyleName, makeTimeList, makeView, marksByDimension, measureResultStyle, measureToolStyle, modifyStyles, moveFeature, multiLineStringLabelStyle, multiPolygonLabelStyle, opacityOptions, openLayersGetMapImageStore, polygonCleanDangling, polygonCleanDanglingCoords, polygonFeatureCollectionCleanDangling, precipitationMMLegendColorsWoW, projectorCache, publicLayers, publicServices, removeOverlappingLines, resolvePreferredStyleName$1 as resolvePreferredStyleName, resolveStacAssetKey, rewindGeometry, roundCoordinates, roundFeatureCoordinates, selectPreferredWMSProjection, setMapCenter, setViewFromExtent, setViewFromFeature, simpleBoxGeoJSON, simpleBoxGeoJSONWrongOrder, simpleFlightRouteLineStringGeoJSON, simpleFlightRoutePointsGeoJSON, simpleGeometryCollectionGeoJSON, simpleLineStringGeoJSON, simpleMultiPolygon, simplePointsGeojson, simplePolygonGeoJSON, simpleSmallLineStringGeoJSON, splitLine, splitPolygon, splitStyle, stacCatalogCollectionToLayerProps, stacColormapToOlStyle, stacGrayscaleOlStyle, stacNormalizedGrayscaleOlStyle, startToolExampleConfig, strokeWidthOptions, styleNameToStyleLike, temperatureLegendColorsCWK, temperatureLegendColorsWoW, textLabelStyle, textStyle, textStyleWithMargin, updateEditModeButtonsWithFir, useAnimationForLayer, useEDRGetCollectionDetails, useEDRGetParameterData, useEDRWMLayer, useGeoJSON, useGetWMLayerInstance, useGetWMSLayerStyleList, useIconStyle, useMapDrawTool, useProjection, useQueryGetWMSGetCapabilities, useQueryGetWMSLayer, useQueryGetWMSLayers, useQueryGetWMSLayersTree, useQueryGetWMSServiceInfo, useQueryWMTSGetCapabilities, useSetIntervalWhenVisible, useStacCatalogRoot, useStacCollection, useStacItems, useStacOverviewItems, useStacTemporalStepItems, useViewFromLayer, viewUtils, webmapEDRQueryOptions, webmapReactTranslations };
|
|
14149
|
+
export { BaseLayerType, CLASSNAME_MAP_MEASURE_TOOLTIP, ClickOnMapTool, Clock, DEFAULT_GEOJSON_STYLE_FILL_OPACITY, DRAWMODE, DefaultBaseLayers, DimensionSelectButton, DimensionSelectDialog, DimensionSelectSlider, EditModeButton as EditModeButtonField, FEATURE_DRAW_FILL_COLOR, FEATURE_DRAW_FILL_COLOR_TRANSPARENT, FEATURE_DRAW_SECONDARY_FILL_COLOR, FEATURE_DRAW_SECONDARY_STROKE_COLOR, FEATURE_DRAW_STROKE_COLOR, FEATURE_FILL, FEATURE_FILL_SELECTED, FEATURE_STROKE, FEATURE_STROKE_EDIT, FEATURE_STROKE_SELECTED, FEATURE_VERTICES_EDIT_HANDLES, FEATURE_VERTICE_HANDLE_IMAGE, FEATURE_VERTICE_IMAGE, FeatureLayer, FeatureLayers, GeoJSONTextField, IntersectionSelect, LayerInfoButton, LayerInfoDialog, LayerInfoLegend, LayerInfoList, LayerInfoText, Legend, LegendButton, LegendDialog, LegendLayout, MIN_HEIGHT, MIN_WIDTH, MapContext, MapControlButton, MapControls, MapDimensionSelect, MapFeatureClass, MapMeasure, MapTime, MapWarningProperties, NEW_FEATURE_CREATED, NEW_LINESTRING_CREATED, NEW_POINT_CREATED, OpenLayersFeatureLayer, OpenLayersGetFeatureInfo, OpenLayersLayer, OpenLayersMapDraw, OpenLayersMapView, OpenLayersZoomControl, POINTER_CLICK_TOLERANCE_PX, SELECTED_FEATURE_COLOR, SELECTED_POINT_HALO_STYLE, STAC_ASSET_STYLE_PREFIX, STAC_ITEM_PAGE_LIMIT, STAC_ITEM_SEARCH_FIELDS_CONFORMANCE, STAC_TEMPORAL_STEP_SAMPLE_LIMIT, SelectField, StoryLayoutGrid, TimeAwareEDRLocationLayer, TimeAwareGeoTIFFLayer, TimeAwareWMTSLayer, TimeContext, TimeawareImageSource, TimeawareImageSourceWMSLayer, WEBMAP_REACT_NAMESPACE, WMSLayer, WMTSLayer, XYZLayer, ZoomControls, addFeatureProperties, addGeoJSONProperties, addSelectionTypeToGeoJSON, asNewFeature, basicExampleDrawOptions, basicExampleMultipleShapeDrawOptions, basicExampleMultipleShapeWithValuesDrawOptions, calculateBoxSelection, calculateNewSelection, catmullRomSpline, clearImageCacheForAllMaps, colorMaps, createBoxBasedOnModifiedVertex, createIconStyle, createInterSections, createMoveFeatures, createOval, currentlySupportedDrawModes, defaultBox, defaultCircle, defaultDelete, defaultEdrStyles, defaultFreehandLine, defaultGeoJSONStyleProperties, defaultIntersectionStyleProperties, defaultLayers, defaultLineString, defaultLocation, defaultModes, defaultOval, defaultPoint, defaultPolygon, defaultRotatableBox, defaultSmoothLine, defaultSplit, defaultSquare, defaultTimeFormat, dimensionConfig, drawPolyStoryStyles, drawStyles, emptyGeoJSON, endToolExampleConfig, exampleIntersectionOptions, exampleIntersectionWithShapeOptions, exampleIntersections, exampleIntersectionsMultiDrawTool, featureMultiPoint, featurePoint, featurePolygon, fetchStacCatalogCollections, fetchStacCatalogRoot, fetchStacCollection, fetchStacItem, fetchStacItems, fetchStacItemsPage, fetchStacItemsWithPagination, fillOptions, firSelectionType, formatTime, generateImageFromLegend, genericOpenLayersFeatureStyle, geowebColorToOpenLayersColor, getAffectedIndices, getBoxRotateHandlePoints, getBoxSelectPreviewStyle, getDimensionIcon, getDimensionLabel, getDimensionValue, getDimensionsList, getDoubleControlToolIcon, getDrawModeIdFromSelectionType, getFeatureCollection, getFeatureExtent, getFeaturePointStyle, getFirTitle, getGeoJSONPropertyValue, getGeoJson, getIcon, getIntersectionToolIcon, getIsInsideAcceptanceTime, getLastEmptyFeatureIndex, getLayerBbox, getLayerExtentForProjection, getLayerStyles, getLayerUpdateInfo, getLegendClass, getOlFeatureKey, getProj4, getRendersAsStyles, getStacAssetKeyFromStyle, getStacAssetStyles, getStacCollectionStyles, getStacFrameItemsToRender, getStacItemLookupWindowForTimes, getStacItemSearchUrl, getStacItemsUrl, getTimeDimension, getToolIcon, initializeOpenLayersProjections, inlineFeatureStyle, intersectPointGeoJSONS, intersectPolygonGeoJSONS, intersectionFeatureBE, intersectionFeatureNL, isBrowserReadableGeoTIFFAsset, isClickFromDrag, isDefaultMovable, isGeoJSONFeatureCreatedByTool, isGeoJSONGeometryEmpty, isGeoTIFFAsset, isPointFeatureCollection, keepIdentityOnFirstSplitFeature, labelOptions, lineString, lineStringCollection, makeFeatureStyleDisc, makeFeatureStyleLoading, makeFeatureStyleMultiParam, makeFeatureStyleMultiParamLoading, makeFeatureStyleWind, makeLegendFromColorMap, makeLegendFromStyleName, makeTimeList, makeView, marksByDimension, measureResultStyle, measureToolStyle, modifyStyles, moveFeature, multiLineStringLabelStyle, multiPolygonLabelStyle, opacityOptions, openLayersGetMapImageStore, polygonCleanDangling, polygonCleanDanglingCoords, polygonFeatureCollectionCleanDangling, precipitationMMLegendColorsWoW, projectorCache, publicLayers, publicServices, removeOverlappingLines, resolvePreferredStyleName$1 as resolvePreferredStyleName, resolveStacAssetKey, rewindGeometry, roundCoordinates, roundFeatureCoordinates, selectPreferredWMSProjection, setMapCenter, setViewFromExtent, setViewFromFeature, shouldEnterEditMode, shouldExitEditModeForMultiSelect, simpleBoxGeoJSON, simpleBoxGeoJSONWrongOrder, simpleFlightRouteLineStringGeoJSON, simpleFlightRoutePointsGeoJSON, simpleGeometryCollectionGeoJSON, simpleLineStringGeoJSON, simpleMultiPolygon, simplePointsGeojson, simplePolygonGeoJSON, simpleSmallLineStringGeoJSON, splitLine, splitPolygon, splitStyle, stacCatalogCollectionToLayerProps, stacColormapToOlStyle, stacGrayscaleOlStyle, stacNormalizedGrayscaleOlStyle, startToolExampleConfig, strokeWidthOptions, styleNameToStyleLike, temperatureLegendColorsCWK, temperatureLegendColorsWoW, textLabelStyle, textStyle, textStyleWithMargin, updateEditModeButtonsWithFir, useAnimationForLayer, useEDRGetCollectionDetails, useEDRGetParameterData, useEDRWMLayer, useGeoJSON, useGetWMLayerInstance, useGetWMSLayerStyleList, useIconStyle, useMapDrawTool, useMoveFeatures, useProjection, useQueryGetWMSGetCapabilities, useQueryGetWMSLayer, useQueryGetWMSLayers, useQueryGetWMSLayersTree, useQueryGetWMSServiceInfo, useQueryWMTSGetCapabilities, useSetIntervalWhenVisible, useStacCatalogRoot, useStacCollection, useStacItems, useStacOverviewItems, useStacTemporalStepItems, useViewFromLayer, viewUtils, webmapEDRQueryOptions, webmapReactTranslations };
|