@opengeoweb/webmap-react 19.5.1-nightly-20260831 → 19.6.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/dist/index.esm.js
CHANGED
|
@@ -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';
|
|
@@ -2594,6 +2594,14 @@ var Legend = function Legend(_ref) {
|
|
|
2594
2594
|
});
|
|
2595
2595
|
};
|
|
2596
2596
|
|
|
2597
|
+
var minSize = {
|
|
2598
|
+
width: 100,
|
|
2599
|
+
height: 120
|
|
2600
|
+
};
|
|
2601
|
+
var defaultSize = {
|
|
2602
|
+
width: 'auto',
|
|
2603
|
+
height: 'auto'
|
|
2604
|
+
};
|
|
2597
2605
|
var LegendDialog = function LegendDialog(_ref) {
|
|
2598
2606
|
var _nodeRef$current, _nodeRef$current2;
|
|
2599
2607
|
var layers = _ref.layers,
|
|
@@ -2608,14 +2616,41 @@ var LegendDialog = function LegendDialog(_ref) {
|
|
|
2608
2616
|
order = _ref$order === void 0 ? 0 : _ref$order,
|
|
2609
2617
|
_ref$source = _ref.source,
|
|
2610
2618
|
source = _ref$source === void 0 ? 'app' : _ref$source,
|
|
2611
|
-
onToggleLayerLegendVisibility = _ref.onToggleLayerLegendVisibility
|
|
2619
|
+
onToggleLayerLegendVisibility = _ref.onToggleLayerLegendVisibility,
|
|
2620
|
+
_ref$startDraggablePo = _ref.startDraggablePosition,
|
|
2621
|
+
startDraggablePosition = _ref$startDraggablePo === void 0 ? {
|
|
2622
|
+
x: 0,
|
|
2623
|
+
y: 0
|
|
2624
|
+
} : _ref$startDraggablePo,
|
|
2625
|
+
_ref$startPosition = _ref.startPosition,
|
|
2626
|
+
startPosition = _ref$startPosition === void 0 ? {
|
|
2627
|
+
right: 20,
|
|
2628
|
+
top: 50
|
|
2629
|
+
} : _ref$startPosition,
|
|
2630
|
+
startSize = _ref.startSize,
|
|
2631
|
+
_ref$onDragEnd = _ref.onDragEnd,
|
|
2632
|
+
onDragEnd = _ref$onDragEnd === void 0 ? function () {} : _ref$onDragEnd;
|
|
2612
2633
|
var _useWebmapReactTransl = useWebmapReactTranslation(),
|
|
2613
2634
|
t = _useWebmapReactTransl.t;
|
|
2614
2635
|
var stopWheelEventPropagationRef = useWheelStopPropagation();
|
|
2615
|
-
var _React$useState = React.useState(
|
|
2636
|
+
var _React$useState = React.useState(function () {
|
|
2637
|
+
return startSize ? calculateStartSize(minSize, startSize, startPosition) : defaultSize;
|
|
2638
|
+
}),
|
|
2616
2639
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
2617
|
-
|
|
2618
|
-
|
|
2640
|
+
sizeInState = _React$useState2[0],
|
|
2641
|
+
setSizeInState = _React$useState2[1];
|
|
2642
|
+
var wasOpenRef = React.useRef(isOpen);
|
|
2643
|
+
React.useLayoutEffect(function () {
|
|
2644
|
+
var isOpening = isOpen && !wasOpenRef.current;
|
|
2645
|
+
if (isOpening) {
|
|
2646
|
+
setSizeInState(startSize ? calculateStartSize(minSize, startSize, startPosition) : defaultSize);
|
|
2647
|
+
}
|
|
2648
|
+
wasOpenRef.current = isOpen;
|
|
2649
|
+
}, [isOpen, startPosition, startSize]);
|
|
2650
|
+
var _React$useState3 = React.useState('initial'),
|
|
2651
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
2652
|
+
legendMaxHeight = _React$useState4[0],
|
|
2653
|
+
setLegendMaxHeight = _React$useState4[1];
|
|
2619
2654
|
// get refs for the legend and mapview
|
|
2620
2655
|
var nodeRef = useRef(null);
|
|
2621
2656
|
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 +2680,10 @@ var LegendDialog = function LegendDialog(_ref) {
|
|
|
2645
2680
|
updateInitialMaxHeight();
|
|
2646
2681
|
}
|
|
2647
2682
|
}, [nodeRef, updateInitialMaxHeight]);
|
|
2683
|
+
var handleDragEnd = React.useCallback(function (position, dragSize) {
|
|
2684
|
+
setSizeInState(dragSize);
|
|
2685
|
+
onDragEnd(position, dragSize);
|
|
2686
|
+
}, [onDragEnd]);
|
|
2648
2687
|
return jsx(ToolContainerDraggable, {
|
|
2649
2688
|
bounds: "parent",
|
|
2650
2689
|
"data-testid": "moveable-legend",
|
|
@@ -2653,13 +2692,14 @@ var LegendDialog = function LegendDialog(_ref) {
|
|
|
2653
2692
|
isOpen: isOpen,
|
|
2654
2693
|
minWidth: 100,
|
|
2655
2694
|
onClose: onClose,
|
|
2695
|
+
onDragEnd: handleDragEnd,
|
|
2656
2696
|
onMouseDown: onMouseDown,
|
|
2657
2697
|
order: order,
|
|
2698
|
+
resetPositionOnOpen: true,
|
|
2658
2699
|
source: source,
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
},
|
|
2700
|
+
startDraggablePosition: startDraggablePosition,
|
|
2701
|
+
startPosition: startPosition,
|
|
2702
|
+
startSize: sizeInState,
|
|
2663
2703
|
title: showMapId ? "".concat(t('webmap-react-legend'), " ").concat(mapId) : t('webmap-react-legend'),
|
|
2664
2704
|
children: jsx(Box, {
|
|
2665
2705
|
ref: nodeRef,
|
|
@@ -2699,7 +2739,7 @@ var LegendDialog = function LegendDialog(_ref) {
|
|
|
2699
2739
|
});
|
|
2700
2740
|
};
|
|
2701
2741
|
|
|
2702
|
-
var _excluded$
|
|
2742
|
+
var _excluded$3 = ["onClick", "children", "title", "placement", "isActive"];
|
|
2703
2743
|
var MapControlButton = function MapControlButton(_ref) {
|
|
2704
2744
|
var onClick = _ref.onClick,
|
|
2705
2745
|
children = _ref.children,
|
|
@@ -2708,7 +2748,7 @@ var MapControlButton = function MapControlButton(_ref) {
|
|
|
2708
2748
|
placement = _ref$placement === void 0 ? 'right' : _ref$placement,
|
|
2709
2749
|
_ref$isActive = _ref.isActive,
|
|
2710
2750
|
isActive = _ref$isActive === void 0 ? false : _ref$isActive,
|
|
2711
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2751
|
+
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
2712
2752
|
return jsx(CustomIconButton, _objectSpread2(_objectSpread2({
|
|
2713
2753
|
isSelected: isActive,
|
|
2714
2754
|
onClick: onClick,
|
|
@@ -2748,10 +2788,10 @@ var ZoomControls = function ZoomControls(_ref) {
|
|
|
2748
2788
|
});
|
|
2749
2789
|
};
|
|
2750
2790
|
|
|
2751
|
-
var _excluded$
|
|
2791
|
+
var _excluded$2 = ["children"];
|
|
2752
2792
|
var MapControls = function MapControls(_ref) {
|
|
2753
2793
|
var children = _ref.children,
|
|
2754
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2794
|
+
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
2755
2795
|
return jsx(Box, _objectSpread2(_objectSpread2({
|
|
2756
2796
|
sx: {
|
|
2757
2797
|
position: 'absolute',
|
|
@@ -3207,11 +3247,11 @@ var MapDimensionSelect = function MapDimensionSelect(_ref2) {
|
|
|
3207
3247
|
}, layerId);
|
|
3208
3248
|
};
|
|
3209
3249
|
|
|
3210
|
-
var _excluded = ["isActive", "onClick"];
|
|
3250
|
+
var _excluded$1 = ["isActive", "onClick"];
|
|
3211
3251
|
var LayerInfoButton = function LayerInfoButton(_ref) {
|
|
3212
3252
|
var isActive = _ref.isActive,
|
|
3213
3253
|
onClick = _ref.onClick,
|
|
3214
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
3254
|
+
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
3215
3255
|
return jsx(CustomIconButton, _objectSpread2(_objectSpread2({
|
|
3216
3256
|
"aria-label": "layer info",
|
|
3217
3257
|
className: "layerInfoButton",
|
|
@@ -3542,7 +3582,12 @@ var HoldShiftToZoomMessage = function HoldShiftToZoomMessage() {
|
|
|
3542
3582
|
var timerRef = useRef(undefined);
|
|
3543
3583
|
var _useWebmapReactTransl = useWebmapReactTranslation(WEBMAP_NAMESPACE),
|
|
3544
3584
|
t = _useWebmapReactTransl.t;
|
|
3585
|
+
var _useContext = useContext(MapContext),
|
|
3586
|
+
map = _useContext.map;
|
|
3545
3587
|
useEffect(function () {
|
|
3588
|
+
if (!map) {
|
|
3589
|
+
return function () {};
|
|
3590
|
+
}
|
|
3546
3591
|
var updateScroll = function updateScroll(e) {
|
|
3547
3592
|
if (e.deltaY) {
|
|
3548
3593
|
clearTimeout(timerRef.current);
|
|
@@ -3552,11 +3597,12 @@ var HoldShiftToZoomMessage = function HoldShiftToZoomMessage() {
|
|
|
3552
3597
|
!e.shiftKey && setShowMessage(true);
|
|
3553
3598
|
}
|
|
3554
3599
|
};
|
|
3555
|
-
|
|
3600
|
+
var viewPort = map.getViewport();
|
|
3601
|
+
viewPort.addEventListener('wheel', updateScroll);
|
|
3556
3602
|
return function () {
|
|
3557
|
-
|
|
3603
|
+
viewPort.removeEventListener('wheel', updateScroll);
|
|
3558
3604
|
};
|
|
3559
|
-
}, [
|
|
3605
|
+
}, [map]);
|
|
3560
3606
|
return jsx("div", {
|
|
3561
3607
|
style: {
|
|
3562
3608
|
position: 'absolute',
|
|
@@ -4243,6 +4289,7 @@ var splitLine = function splitLine(drawFeature, splitFeature) {
|
|
|
4243
4289
|
return featureCollection(newLines);
|
|
4244
4290
|
};
|
|
4245
4291
|
|
|
4292
|
+
var _excluded = ["id"];
|
|
4246
4293
|
/**
|
|
4247
4294
|
* Adds properties to the first geojson feature based on the given property object.
|
|
4248
4295
|
* It only extends or changes the properties which are defined in styleConfig,
|
|
@@ -4343,7 +4390,8 @@ var moveFeature = function moveFeature(currentGeoJSON, newGeoJSON, featureLayerI
|
|
|
4343
4390
|
selectionType: selectionType
|
|
4344
4391
|
})
|
|
4345
4392
|
});
|
|
4346
|
-
|
|
4393
|
+
// remove id, objectName from copyFeature (the new, split off shape)
|
|
4394
|
+
newGeoJSON.features.push(asNewFeature(copyFeature));
|
|
4347
4395
|
return newGeoJSON.features.length - 1;
|
|
4348
4396
|
}
|
|
4349
4397
|
if (geometry.type === 'LineString' && geometry.coordinates.length > 2 && reason === NEW_LINESTRING_CREATED) {
|
|
@@ -4358,7 +4406,8 @@ var moveFeature = function moveFeature(currentGeoJSON, newGeoJSON, featureLayerI
|
|
|
4358
4406
|
selectionType: selectionType
|
|
4359
4407
|
})
|
|
4360
4408
|
});
|
|
4361
|
-
|
|
4409
|
+
// remove id, objectName from copyFeature (the new, split off shape)
|
|
4410
|
+
newGeoJSON.features.push(asNewFeature(_copyFeature));
|
|
4362
4411
|
return newGeoJSON.features.length - 1;
|
|
4363
4412
|
}
|
|
4364
4413
|
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 +4600,41 @@ var createInterSections = function createInterSections(geojson, otherGeoJSON) {
|
|
|
4551
4600
|
});
|
|
4552
4601
|
return intersections;
|
|
4553
4602
|
};
|
|
4603
|
+
var IDENTITY_PROPERTIES = ['objectName', 'isSelected', 'highlightSelectedFeature'];
|
|
4604
|
+
/**
|
|
4605
|
+
* Turns a feature which originates from another feature into a new feature: the
|
|
4606
|
+
* id and the properties identifying the original feature are removed
|
|
4607
|
+
* @param feature feature which originates from another feature
|
|
4608
|
+
* @returns feature without the identity of the original feature
|
|
4609
|
+
*/
|
|
4610
|
+
var asNewFeature = function asNewFeature(feature) {
|
|
4611
|
+
feature.id;
|
|
4612
|
+
var featureWithoutId = _objectWithoutProperties(feature, _excluded);
|
|
4613
|
+
var properties = _objectSpread2({}, featureWithoutId.properties);
|
|
4614
|
+
IDENTITY_PROPERTIES.forEach(function (property) {
|
|
4615
|
+
delete properties[property];
|
|
4616
|
+
});
|
|
4617
|
+
return _objectSpread2(_objectSpread2({}, featureWithoutId), {}, {
|
|
4618
|
+
properties: properties
|
|
4619
|
+
});
|
|
4620
|
+
};
|
|
4621
|
+
/**
|
|
4622
|
+
* Keeps the identity of the original feature on the first of the features it was
|
|
4623
|
+
* split into, the other features become new features
|
|
4624
|
+
* @param splitFeatures features resulting from splitting a feature
|
|
4625
|
+
* @param originalFeature feature which was split
|
|
4626
|
+
* @returns split features where only the first one keeps the original identity
|
|
4627
|
+
*/
|
|
4628
|
+
var keepIdentityOnFirstSplitFeature = function keepIdentityOnFirstSplitFeature(splitFeatures, originalFeature) {
|
|
4629
|
+
return splitFeatures.map(function (splitFeature, index) {
|
|
4630
|
+
if (index > 0) {
|
|
4631
|
+
return asNewFeature(splitFeature);
|
|
4632
|
+
}
|
|
4633
|
+
return _objectSpread2(_objectSpread2({}, splitFeature), (originalFeature === null || originalFeature === void 0 ? void 0 : originalFeature.id) !== undefined && {
|
|
4634
|
+
id: originalFeature.id
|
|
4635
|
+
});
|
|
4636
|
+
});
|
|
4637
|
+
};
|
|
4554
4638
|
var getGeoJson = function getGeoJson(geojson, shouldAllowMultipleShapes) {
|
|
4555
4639
|
if (shouldAllowMultipleShapes || !geojson.features.length) {
|
|
4556
4640
|
return geojson;
|
|
@@ -4619,14 +4703,21 @@ var isGeoJSONFeatureCreatedByTool = function isGeoJSONFeatureCreatedByTool(exist
|
|
|
4619
4703
|
};
|
|
4620
4704
|
var rewindGeometry = function rewindGeometry(geoJSON) {
|
|
4621
4705
|
return produce(geoJSON, function (geoJSONDraft) {
|
|
4622
|
-
|
|
4623
|
-
|
|
4706
|
+
var _geoJSONDraft$feature;
|
|
4707
|
+
if (!(geoJSONDraft !== null && geoJSONDraft !== void 0 && (_geoJSONDraft$feature = geoJSONDraft.features) !== null && _geoJSONDraft$feature !== void 0 && _geoJSONDraft$feature.length)) {
|
|
4708
|
+
return;
|
|
4709
|
+
}
|
|
4710
|
+
geoJSONDraft.features.forEach(function (draftFeature, index) {
|
|
4711
|
+
var _draftFeature$geometr, _draftFeature$geometr2;
|
|
4712
|
+
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) {
|
|
4713
|
+
return;
|
|
4714
|
+
}
|
|
4715
|
+
var geometry = geoJSON.features[index].geometry;
|
|
4624
4716
|
var lineString = polygonToLine(geometry);
|
|
4625
4717
|
if (booleanClockwise(lineString.geometry.coordinates)) {
|
|
4626
|
-
|
|
4627
|
-
geoJSONDraft.features[0].geometry = rewind(geoJSONDraft.features[0].geometry);
|
|
4718
|
+
draftFeature.geometry = rewind(draftFeature.geometry);
|
|
4628
4719
|
}
|
|
4629
|
-
}
|
|
4720
|
+
});
|
|
4630
4721
|
});
|
|
4631
4722
|
};
|
|
4632
4723
|
var addGeoJSONPropertiesToFeature = function addGeoJSONPropertiesToFeature(geoJSONFeature, newProperties) {
|
|
@@ -10821,9 +10912,11 @@ var OpenLayersMapDraw = function OpenLayersMapDraw(_ref) {
|
|
|
10821
10912
|
}
|
|
10822
10913
|
// Transform back to orig
|
|
10823
10914
|
var splitResultAsGeoJson = geojsonFormatter.writeFeaturesObject(geojsonFormatterNoTransform.readFeatures(splitResult));
|
|
10915
|
+
// Only the first part continues as the current feature, the other parts are new features
|
|
10916
|
+
var splitFeatures = keepIdentityOnFirstSplitFeature(splitResultAsGeoJson.features, selectedFeature);
|
|
10824
10917
|
// Assemble the result.
|
|
10825
10918
|
var newGeoJson = _objectSpread2(_objectSpread2({}, geojson), {}, {
|
|
10826
|
-
features: [].concat(_toConsumableArray(geojson.features.slice(0, selectedFeatureIndex)), _toConsumableArray(
|
|
10919
|
+
features: [].concat(_toConsumableArray(geojson.features.slice(0, selectedFeatureIndex)), _toConsumableArray(splitFeatures), _toConsumableArray(geojson.features.slice(selectedFeatureIndex + 1)))
|
|
10827
10920
|
});
|
|
10828
10921
|
updateGeojson === null || updateGeojson === void 0 || updateGeojson(newGeoJson, NEW_FEATURE_CREATED);
|
|
10829
10922
|
};
|
|
@@ -13663,4 +13756,4 @@ var getLayerUpdateInfo = function getLayerUpdateInfo(wmLayer, mapId) {
|
|
|
13663
13756
|
return updateObject;
|
|
13664
13757
|
};
|
|
13665
13758
|
|
|
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 };
|
|
13759
|
+
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, asNewFeature, 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, 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, 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 };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { Source } from '@opengeoweb/shared';
|
|
2
|
+
import type { Source, DraggablePosition, DraggableSize, Position, Size } from '@opengeoweb/shared';
|
|
3
3
|
import type { LayerFoundation } from '@opengeoweb/webmap';
|
|
4
4
|
interface LegendDialogProps {
|
|
5
5
|
layers: LayerFoundation[];
|
|
@@ -11,6 +11,10 @@ interface LegendDialogProps {
|
|
|
11
11
|
order?: number;
|
|
12
12
|
source?: Source;
|
|
13
13
|
onToggleLayerLegendVisibility: (layerId: string, showLegend: boolean) => void;
|
|
14
|
+
startDraggablePosition?: DraggablePosition;
|
|
15
|
+
startPosition?: Position;
|
|
16
|
+
startSize?: DraggableSize;
|
|
17
|
+
onDragEnd?: (position: DraggablePosition, size: Size) => void;
|
|
14
18
|
}
|
|
15
19
|
export declare const LegendDialog: React.FC<LegendDialogProps>;
|
|
16
20
|
export {};
|
|
@@ -73,6 +73,21 @@ export declare const isPointFeatureCollection: (geojson: GeoJSON.FeatureCollecti
|
|
|
73
73
|
* @returns GeoJSONS extend with intersections
|
|
74
74
|
*/
|
|
75
75
|
export declare const createInterSections: (geojson: GeoJSON.FeatureCollection, otherGeoJSON: GeoJSON.FeatureCollection, geoJSONproperties?: GeoJSON.GeoJsonProperties, proj?: string) => GeoJSON.FeatureCollection;
|
|
76
|
+
/**
|
|
77
|
+
* Turns a feature which originates from another feature into a new feature: the
|
|
78
|
+
* id and the properties identifying the original feature are removed
|
|
79
|
+
* @param feature feature which originates from another feature
|
|
80
|
+
* @returns feature without the identity of the original feature
|
|
81
|
+
*/
|
|
82
|
+
export declare const asNewFeature: (feature: GeoJSON.Feature) => GeoJSON.Feature;
|
|
83
|
+
/**
|
|
84
|
+
* Keeps the identity of the original feature on the first of the features it was
|
|
85
|
+
* split into, the other features become new features
|
|
86
|
+
* @param splitFeatures features resulting from splitting a feature
|
|
87
|
+
* @param originalFeature feature which was split
|
|
88
|
+
* @returns split features where only the first one keeps the original identity
|
|
89
|
+
*/
|
|
90
|
+
export declare const keepIdentityOnFirstSplitFeature: (splitFeatures: GeoJSON.Feature[], originalFeature: GeoJSON.Feature | undefined) => GeoJSON.Feature[];
|
|
76
91
|
export declare const getGeoJson: (geojson: GeoJSON.FeatureCollection, shouldAllowMultipleShapes: boolean) => GeoJSON.FeatureCollection;
|
|
77
92
|
export declare const getLastEmptyFeatureIndex: (geoJSONFeatureCollection: GeoJSON.FeatureCollection) => number | undefined;
|
|
78
93
|
export declare const getFeatureCollection: (geoJSONFeature: GeoJSON.Feature | GeoJSON.FeatureCollection, shouldAllowMultipleShapes: boolean, geoJSONFeatureCollection?: GeoJSON.FeatureCollection) => GeoJSON.FeatureCollection;
|
package/package.json
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
2
|
+
"name": "@opengeoweb/webmap-react",
|
|
3
|
+
"version": "19.6.0",
|
|
4
|
+
"description": "GeoWeb react wrapper for webmap",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
|
+
},
|
|
10
|
+
"main": "./dist/index.esm.js",
|
|
11
|
+
"module": "./dist/index.esm.js",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
"./package.json": "./package.json",
|
|
15
|
+
".": {
|
|
16
|
+
"@opengeoweb/source": "./src/index.ts",
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/index.esm.js",
|
|
19
|
+
"default": "./dist/index.esm.js"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@opengeoweb/webmap": "*",
|
|
24
|
+
"@opengeoweb/theme": "*",
|
|
25
|
+
"@opengeoweb/shared": "*",
|
|
26
|
+
"lodash": "^4.18.1",
|
|
27
|
+
"ol": "^10.4.0",
|
|
28
|
+
"proj4": "^2.9.2",
|
|
29
|
+
"@turf/turf": "^7.1.0",
|
|
30
|
+
"immer": "^10.0.3",
|
|
31
|
+
"i18next": "^25.0.1",
|
|
32
|
+
"@mui/material": "^9.0.1",
|
|
33
|
+
"react-i18next": "^15.1.1",
|
|
34
|
+
"@tanstack/react-query": "^5.85.5",
|
|
35
|
+
"@types/geojson": "^7946.0.14"
|
|
36
|
+
},
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"react": "19",
|
|
39
|
+
"@emotion/react": "*",
|
|
40
|
+
"@emotion/styled": "*"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"eslint-plugin-storybook": "10.3.3"
|
|
44
|
+
},
|
|
45
|
+
"files": [
|
|
46
|
+
"dist",
|
|
47
|
+
"!dist/package.json",
|
|
48
|
+
"README.md",
|
|
49
|
+
"package.json"
|
|
50
|
+
]
|
|
51
|
+
}
|