@opengeoweb/webmap-react 19.0.0 → 19.1.1
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/README.md +11 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +12712 -0
- package/dist/src/index.d.ts +11 -0
- package/dist/src/lib/components/Clock/Clock.d.ts +23 -0
- package/dist/src/lib/components/Clock/ClockContainer.d.ts +9 -0
- package/dist/src/lib/components/Clock/clockContainerUtils.d.ts +1 -0
- package/dist/src/lib/components/Clock/index.d.ts +1 -0
- package/dist/src/lib/components/HoldShiftToZoomMessage/HoldShiftToZoomMessage.d.ts +2 -0
- package/dist/src/lib/components/LayerInfo/LayerInfoButton.d.ts +8 -0
- package/dist/src/lib/components/LayerInfo/LayerInfoDialog.d.ts +18 -0
- package/dist/src/lib/components/LayerInfo/LayerInfoLegend.d.ts +7 -0
- package/dist/src/lib/components/LayerInfo/LayerInfoList.d.ts +10 -0
- package/dist/src/lib/components/LayerInfo/LayerInfoText.d.ts +16 -0
- package/dist/src/lib/components/LayerInfo/LayerInfoUtils.d.ts +9 -0
- package/dist/src/lib/components/LayerInfo/index.d.ts +6 -0
- package/dist/src/lib/components/Legend/Legend.d.ts +8 -0
- package/dist/src/lib/components/Legend/LegendButton.d.ts +5 -0
- package/dist/src/lib/components/Legend/LegendDialog.d.ts +16 -0
- package/dist/src/lib/components/Legend/LegendLayout.d.ts +10 -0
- package/dist/src/lib/components/Legend/index.d.ts +4 -0
- package/dist/src/lib/components/MapControls/MapControlButton.d.ts +10 -0
- package/dist/src/lib/components/MapControls/MapControls.d.ts +7 -0
- package/dist/src/lib/components/MapControls/ZoomControls.d.ts +8 -0
- package/dist/src/lib/components/MapControls/index.d.ts +3 -0
- package/dist/src/lib/components/MapDimensionSelect/DimensionSelectButton.d.ts +8 -0
- package/dist/src/lib/components/MapDimensionSelect/DimensionSelectDialog.d.ts +14 -0
- package/dist/src/lib/components/MapDimensionSelect/DimensionSelectSlider.d.ts +14 -0
- package/dist/src/lib/components/MapDimensionSelect/MapDimensionSelect.d.ts +12 -0
- package/dist/src/lib/components/MapDimensionSelect/index.d.ts +6 -0
- package/dist/src/lib/components/MapDimensionSelect/utils.d.ts +18 -0
- package/dist/src/lib/components/MapMeasure/MapMeasure.d.ts +5 -0
- package/dist/src/lib/components/MapMeasure/index.d.ts +1 -0
- package/dist/src/lib/components/MapMousePosition/MapMousePosition.d.ts +2 -0
- package/dist/src/lib/components/MapMousePosition/index.d.ts +1 -0
- package/dist/src/lib/components/MapTime/MapTime.d.ts +11 -0
- package/dist/src/lib/components/MapTime/index.d.ts +1 -0
- package/dist/src/lib/components/MapWarning/MapWarningProperties.d.ts +22 -0
- package/dist/src/lib/components/MapWarning/index.d.ts +1 -0
- package/dist/src/lib/components/OpenLayers/OlColors.d.ts +5 -0
- package/dist/src/lib/components/OpenLayers/OlStyles.d.ts +52 -0
- package/dist/src/lib/components/OpenLayers/OpenLayersConstants.d.ts +2 -0
- package/dist/src/lib/components/OpenLayers/component/OpenLayersMapView.d.ts +13 -0
- package/dist/src/lib/components/OpenLayers/context/MapContext.d.ts +6 -0
- package/dist/src/lib/components/OpenLayers/context/TimeContext.d.ts +6 -0
- package/dist/src/lib/components/OpenLayers/controls/OpenLayersGetFeatureInfo.d.ts +8 -0
- package/dist/src/lib/components/OpenLayers/controls/OpenLayersZoomControl.d.ts +6 -0
- package/dist/src/lib/components/OpenLayers/controls/index.d.ts +2 -0
- package/dist/src/lib/components/OpenLayers/draw/OpenLayersMapDraw.d.ts +29 -0
- package/dist/src/lib/components/OpenLayers/draw/geojsonShapes.d.ts +19 -0
- package/dist/src/lib/components/OpenLayers/draw/index.d.ts +12 -0
- package/dist/src/lib/components/OpenLayers/draw/mapDrawUtils.d.ts +12 -0
- package/dist/src/lib/components/OpenLayers/draw/polygonCleanDangling.d.ts +35 -0
- package/dist/src/lib/components/OpenLayers/draw/storyComponents/EditModeButton.d.ts +7 -0
- package/dist/src/lib/components/OpenLayers/draw/storyComponents/FeatureLayers.d.ts +8 -0
- package/dist/src/lib/components/OpenLayers/draw/storyComponents/GeoJSONTextField.d.ts +11 -0
- package/dist/src/lib/components/OpenLayers/draw/storyComponents/IntersectionSelect.d.ts +12 -0
- package/dist/src/lib/components/OpenLayers/draw/storyComponents/SelectField.d.ts +9 -0
- package/dist/src/lib/components/OpenLayers/draw/storyComponents/StoryLayout.d.ts +9 -0
- package/dist/src/lib/components/OpenLayers/draw/storyComponents/StoryLayoutGrid.d.ts +4 -0
- package/dist/src/lib/components/OpenLayers/draw/storyComponents/ToolButton.d.ts +9 -0
- package/dist/src/lib/components/OpenLayers/draw/storyComponents/geojsonExamples.d.ts +12 -0
- package/dist/src/lib/components/OpenLayers/draw/storyComponents/index.d.ts +8 -0
- package/dist/src/lib/components/OpenLayers/draw/storyComponents/storyUtils.d.ts +48 -0
- package/dist/src/lib/components/OpenLayers/draw/storyExamplesMapDrawTool.d.ts +9 -0
- package/dist/src/lib/components/OpenLayers/draw/storyExamplesMapDrawToolIntersection.d.ts +9 -0
- package/dist/src/lib/components/OpenLayers/draw/storyExamplesMapDrawToolMultipleDrawTools.d.ts +12 -0
- package/dist/src/lib/components/OpenLayers/draw/types.d.ts +43 -0
- package/dist/src/lib/components/OpenLayers/draw/useMapDrawTool.d.ts +61 -0
- package/dist/src/lib/components/OpenLayers/draw/utils.d.ts +84 -0
- package/dist/src/lib/components/OpenLayers/index.d.ts +14 -0
- package/dist/src/lib/components/OpenLayers/layers/DefaultBaseLayers.d.ts +9 -0
- package/dist/src/lib/components/OpenLayers/layers/FeatureLayer.d.ts +16 -0
- package/dist/src/lib/components/OpenLayers/layers/GeoTIFFLayer.d.ts +13 -0
- package/dist/src/lib/components/OpenLayers/layers/OpenLayersFeatureLayer.d.ts +16 -0
- package/dist/src/lib/components/OpenLayers/layers/OpenLayersLayer.d.ts +20 -0
- package/dist/src/lib/components/OpenLayers/layers/TiledWMSLayer.d.ts +10 -0
- package/dist/src/lib/components/OpenLayers/layers/TimeAwareEDRLocationLayer.d.ts +14 -0
- package/dist/src/lib/components/OpenLayers/layers/TimeAwareGeoTIFFLayer.d.ts +17 -0
- package/dist/src/lib/components/OpenLayers/layers/TimeAwareGeoTIFFLayerUtils.d.ts +20 -0
- package/dist/src/lib/components/OpenLayers/layers/TimeAwareWMTSLayer.d.ts +17 -0
- package/dist/src/lib/components/OpenLayers/layers/TimeawareImageSourceWMSLayer.d.ts +18 -0
- package/dist/src/lib/components/OpenLayers/layers/WMSLayer.d.ts +10 -0
- package/dist/src/lib/components/OpenLayers/layers/WMTSLayer.d.ts +10 -0
- package/dist/src/lib/components/OpenLayers/layers/XYZLayer.d.ts +9 -0
- package/dist/src/lib/components/OpenLayers/layers/fakeApiWmtsQueries.d.ts +1 -0
- package/dist/src/lib/components/OpenLayers/layers/index.d.ts +11 -0
- package/dist/src/lib/components/OpenLayers/layers/utils.d.ts +2 -0
- package/dist/src/lib/components/OpenLayers/storyComponents/OlStoryLayout.d.ts +10 -0
- package/dist/src/lib/components/OpenLayers/storyComponents/index.d.ts +1 -0
- package/dist/src/lib/components/OpenLayers/styles/useIconStyle.d.ts +25 -0
- package/dist/src/lib/components/OpenLayers/tools/ClickOnMapTool.d.ts +9 -0
- package/dist/src/lib/components/OpenLayers/tools/index.d.ts +1 -0
- package/dist/src/lib/components/OpenLayers/types/Timespan.d.ts +11 -0
- package/dist/src/lib/components/OpenLayers/types/WorkerQueue.d.ts +6 -0
- package/dist/src/lib/components/OpenLayers/useProjectionDropDown.d.ts +17 -0
- package/dist/src/lib/components/OpenLayers/utils/ShowTimeAwareLayerInfo.d.ts +10 -0
- package/dist/src/lib/components/OpenLayers/utils/TimeAwareImageWrapper.d.ts +44 -0
- package/dist/src/lib/components/OpenLayers/utils/TimeawareImageSource.d.ts +68 -0
- package/dist/src/lib/components/OpenLayers/utils/WorkerQueue.d.ts +14 -0
- package/dist/src/lib/components/OpenLayers/utils/constants.d.ts +8 -0
- package/dist/src/lib/components/OpenLayers/utils/makeDimValuesToPrefetch.d.ts +26 -0
- package/dist/src/lib/components/OpenLayers/utils/projections.d.ts +16 -0
- package/dist/src/lib/components/OpenLayers/utils/setMapCenter.d.ts +2 -0
- package/dist/src/lib/components/OpenLayers/utils/types.d.ts +19 -0
- package/dist/src/lib/components/OpenLayers/utils/viewUtils.d.ts +11 -0
- package/dist/src/lib/components/Providers/Providers.d.ts +2 -0
- package/dist/src/lib/components/Providers/index.d.ts +1 -0
- package/dist/src/lib/components/TanStackDemo/storyUtils.d.ts +6 -0
- package/dist/src/lib/components/WMSViewerDemo/components/WMSDimTimeYearSelector.d.ts +18 -0
- package/dist/src/lib/components/WMSViewerDemo/components/WMSLayerSelector.d.ts +9 -0
- package/dist/src/lib/components/WMSViewerDemo/components/WMSStyleSelector.d.ts +8 -0
- package/dist/src/lib/components/WMSViewerDemo/components/WMSTimeSlider.d.ts +8 -0
- package/dist/src/lib/components/index.d.ts +9 -0
- package/dist/src/lib/edr-layer-api/api.d.ts +7 -0
- package/dist/src/lib/edr-layer-api/colormaps/colormaps.d.ts +9 -0
- package/dist/src/lib/edr-layer-api/colormaps/edrOlLegendUtils.d.ts +32 -0
- package/dist/src/lib/edr-layer-api/colormaps/index.d.ts +2 -0
- package/dist/src/lib/edr-layer-api/fakeApi.d.ts +1 -0
- package/dist/src/lib/edr-layer-api/hooks.d.ts +14 -0
- package/dist/src/lib/edr-layer-api/index.d.ts +3 -0
- package/dist/src/lib/edr-layer-api/utils/coverageCollectionToFeatureCollection.d.ts +2 -0
- package/dist/src/lib/edr-layer-api/utils/useEDRWMLayer.d.ts +11 -0
- package/dist/src/lib/geotiff-layer-api/api.d.ts +92 -0
- package/dist/src/lib/geotiff-layer-api/fakeApi.d.ts +1 -0
- package/dist/src/lib/geotiff-layer-api/hooks.d.ts +5 -0
- package/dist/src/lib/geotiff-layer-api/index.d.ts +3 -0
- package/dist/src/lib/geotiff-layer-api/utils/stacColormapToOlStyle.d.ts +25 -0
- package/dist/src/lib/geotiff-layer-api/utils/stacTimeStepUtils.d.ts +18 -0
- package/dist/src/lib/geotiff-layer-api/utils/useGetStacGeoTIFFLayerInstance.d.ts +11 -0
- package/dist/src/lib/hooks/index.d.ts +4 -0
- package/dist/src/lib/hooks/useAnimationForLayer.d.ts +9 -0
- package/dist/src/lib/hooks/useHooksGetCapabilities.d.ts +63 -0
- package/dist/src/lib/hooks/useSetInterValWhenVisible.d.ts +1 -0
- package/dist/src/lib/hooks/useViewFromLayer.d.ts +7 -0
- package/dist/src/lib/index.d.ts +8 -0
- package/dist/src/lib/layers/defaultLayers.d.ts +15 -0
- package/dist/src/lib/layers/defaultStorybookSettings.d.ts +9 -0
- package/dist/src/lib/layers/index.d.ts +3 -0
- package/dist/src/lib/layers/profileLayers.d.ts +19 -0
- package/dist/src/lib/layers/publicLayers.d.ts +310 -0
- package/dist/src/lib/layers/publicServices.d.ts +90 -0
- package/dist/src/lib/types/index.d.ts +1 -0
- package/dist/src/lib/types/types.d.ts +64 -0
- package/dist/src/lib/utils/i18n.d.ts +8 -0
- package/dist/src/lib/utils/index.d.ts +1 -0
- package/dist/src/lib/utils/utils.d.ts +4 -0
- package/package.json +2 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { WEBMAP_NAMESPACE, webmapTranslations } from '@opengeoweb/webmap';
|
|
2
|
+
import webmapReactTranslations from '../locales/webmap-react.json';
|
|
3
|
+
import TimeContext from './lib/components/OpenLayers/context/TimeContext';
|
|
4
|
+
import type { TimeContextType } from './lib/components/OpenLayers/types/Timespan';
|
|
5
|
+
import { makeTimeList } from './lib/components/OpenLayers/utils/makeDimValuesToPrefetch';
|
|
6
|
+
import { TimeawareImageSource } from './lib/components/OpenLayers/utils/TimeawareImageSource';
|
|
7
|
+
export * from './lib';
|
|
8
|
+
export { webmapReactTranslations };
|
|
9
|
+
export { WEBMAP_NAMESPACE, webmapTranslations };
|
|
10
|
+
export { TimeContext, TimeawareImageSource, makeTimeList };
|
|
11
|
+
export type { TimeContextType };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { FC, Ref } from 'react';
|
|
2
|
+
export declare const MIN_WIDTH = 240;
|
|
3
|
+
export declare const MIN_HEIGHT = 32;
|
|
4
|
+
export interface Position {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
}
|
|
8
|
+
export interface Size {
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
}
|
|
12
|
+
export declare const Clock: FC<{
|
|
13
|
+
optionsElement: Ref<HTMLButtonElement>;
|
|
14
|
+
time: number;
|
|
15
|
+
isVisible?: boolean;
|
|
16
|
+
onToggleClock?: (isVisible: boolean) => void;
|
|
17
|
+
position?: Position | undefined;
|
|
18
|
+
onSetPosition: (position: Position) => void;
|
|
19
|
+
size?: Size | undefined;
|
|
20
|
+
onSetSize: (size: Size) => void;
|
|
21
|
+
onToggleOptions?: () => void;
|
|
22
|
+
isOptionsMenuVisible?: boolean;
|
|
23
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dateToManualFormatString: (inDate: Date | undefined) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Clock';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CustomIconProps } from '@opengeoweb/shared';
|
|
2
|
+
interface LayerInfoButtonProps extends CustomIconProps {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
isActive?: boolean;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const LayerInfoButton: React.FC<LayerInfoButtonProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Position, Source } from '@opengeoweb/shared';
|
|
2
|
+
import type { LayerProps } from '@opengeoweb/webmap';
|
|
3
|
+
export interface LayerInfoDialogProps {
|
|
4
|
+
layer: LayerProps;
|
|
5
|
+
serviceName: string;
|
|
6
|
+
serviceUrl?: string;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
isOpen: boolean;
|
|
9
|
+
onMouseDown?: () => void;
|
|
10
|
+
order?: number;
|
|
11
|
+
source?: Source;
|
|
12
|
+
dialogHeight?: number;
|
|
13
|
+
startPosition?: Position;
|
|
14
|
+
selectedStyle?: string;
|
|
15
|
+
showLayerLegend: boolean;
|
|
16
|
+
onToggleLayerLegendVisibility: (showLegend: boolean) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const LayerInfoDialog: React.FC<LayerInfoDialogProps>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface LayerInfoTextProps {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const textStyle: {
|
|
6
|
+
lineHeight: string;
|
|
7
|
+
letterSpacing: string;
|
|
8
|
+
overflowWrap: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const textStyleWithMargin: {
|
|
11
|
+
marginBottom: number;
|
|
12
|
+
lineHeight: string;
|
|
13
|
+
letterSpacing: string;
|
|
14
|
+
overflowWrap: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const LayerInfoText: React.FC<LayerInfoTextProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TFunction } from 'i18next';
|
|
2
|
+
import type { Dimension, LayerProps } from '@opengeoweb/webmap';
|
|
3
|
+
import type { ListItem } from './LayerInfoList';
|
|
4
|
+
export declare const getLayerStyles: (layer: LayerProps) => string;
|
|
5
|
+
export declare const getDimensionValue: (name: string, dimensions: Dimension[]) => string;
|
|
6
|
+
export declare const getLayerBbox: (t: TFunction, layer: LayerProps) => string;
|
|
7
|
+
export declare const getDimensionIcon: (name: string, dimensions: Dimension[]) => React.ReactElement;
|
|
8
|
+
export declare const getDimensionLabel: (name: string) => string;
|
|
9
|
+
export declare const getDimensionsList: (dimensions: Dimension[]) => ListItem[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { LayerFoundation } from '@opengeoweb/webmap';
|
|
3
|
+
interface LegendProps {
|
|
4
|
+
layer: LayerFoundation;
|
|
5
|
+
onToggleLayerLegendVisibility: (layerId: string, showLegend: boolean) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const Legend: React.FC<LegendProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Source } from '@opengeoweb/shared';
|
|
3
|
+
import type { LayerFoundation } from '@opengeoweb/webmap';
|
|
4
|
+
interface LegendDialogProps {
|
|
5
|
+
layers: LayerFoundation[];
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
onMouseDown?: () => void;
|
|
9
|
+
mapId: string;
|
|
10
|
+
showMapId?: boolean;
|
|
11
|
+
order?: number;
|
|
12
|
+
source?: Source;
|
|
13
|
+
onToggleLayerLegendVisibility: (layerId: string, showLegend: boolean) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const LegendDialog: React.FC<LegendDialogProps>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface LegendLayoutProps {
|
|
2
|
+
title: string;
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
height?: number;
|
|
5
|
+
width?: number;
|
|
6
|
+
showLayerLegend?: boolean;
|
|
7
|
+
toggleLayerLegendVisibility?: (showLegend: boolean) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const LegendLayout: React.FC<LegendLayoutProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { TooltipProps } from '@mui/material';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { CustomIconProps } from '@opengeoweb/shared';
|
|
4
|
+
interface MapControlButtonProps extends CustomIconProps {
|
|
5
|
+
isActive?: boolean;
|
|
6
|
+
placement?: TooltipProps['placement'];
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const MapControlButton: React.FC<MapControlButtonProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface DimensionSelectButtonProps {
|
|
3
|
+
dimension: string;
|
|
4
|
+
onClickDimensionButton: () => void;
|
|
5
|
+
isActive?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const DimensionSelectButton: React.FC<DimensionSelectButtonProps>;
|
|
8
|
+
export default DimensionSelectButton;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Source } from '@opengeoweb/shared';
|
|
3
|
+
export interface DimensionSelectProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
order?: number;
|
|
6
|
+
onMouseDown?: () => void;
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
source?: Source;
|
|
9
|
+
dimensionName: string;
|
|
10
|
+
index?: number;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
declare const DimensionSelectDialog: React.FC<DimensionSelectProps>;
|
|
14
|
+
export default DimensionSelectDialog;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Mark } from './utils';
|
|
3
|
+
interface DimensionSelectSliderProps {
|
|
4
|
+
marks: Mark[];
|
|
5
|
+
layerTitle: string;
|
|
6
|
+
reverse?: boolean;
|
|
7
|
+
isDisabled?: boolean;
|
|
8
|
+
managedValue?: number | string;
|
|
9
|
+
validSelection?: boolean;
|
|
10
|
+
alertColor?: string;
|
|
11
|
+
onChangeDimensionValue: (dimensionValue: string) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const DimensionSelectSlider: React.FC<DimensionSelectSliderProps>;
|
|
14
|
+
export default DimensionSelectSlider;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Dimension } from '@opengeoweb/webmap';
|
|
3
|
+
export interface MapDimensionSelectProps {
|
|
4
|
+
layerId: string;
|
|
5
|
+
dimensionName: string;
|
|
6
|
+
handleDimensionValueChanged: (layerId: string, dimensionName: string, dimensionValue: string) => void;
|
|
7
|
+
handleSyncChanged: (layerId: string, dimensionName: string, dimensionValue: string, synced: boolean) => void;
|
|
8
|
+
layerDimension: Dimension;
|
|
9
|
+
layerName: string;
|
|
10
|
+
}
|
|
11
|
+
declare const MapDimensionSelect: React.FC<MapDimensionSelectProps>;
|
|
12
|
+
export default MapDimensionSelect;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as DimensionSelectButton } from './DimensionSelectButton';
|
|
2
|
+
export { default as DimensionSelectDialog } from './DimensionSelectDialog';
|
|
3
|
+
export { default as DimensionSelectSlider } from './DimensionSelectSlider';
|
|
4
|
+
export { default as MapDimensionSelect } from './MapDimensionSelect';
|
|
5
|
+
export { dimensionConfig, marksByDimension } from './utils';
|
|
6
|
+
export type { DimensionConfig } from './utils';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { SvgIconProps } from '@mui/material';
|
|
2
|
+
import type { TFunction } from 'i18next';
|
|
3
|
+
import type React from 'react';
|
|
4
|
+
import type { WMJSDimension } from '@opengeoweb/webmap';
|
|
5
|
+
export interface DimensionConfig {
|
|
6
|
+
name: string;
|
|
7
|
+
label: string;
|
|
8
|
+
defaultUnit: string;
|
|
9
|
+
reversed: boolean;
|
|
10
|
+
iconType: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const dimensionConfig: (t: TFunction) => DimensionConfig[];
|
|
13
|
+
export declare const getDimensionIcon: (iconType: string) => React.FC<SvgIconProps>;
|
|
14
|
+
export interface Mark {
|
|
15
|
+
value: number | string;
|
|
16
|
+
label?: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export declare const marksByDimension: (t: TFunction, dim: WMJSDimension) => Mark[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MapMeasure';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MapMousePosition';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Dimension } from '@opengeoweb/webmap';
|
|
3
|
+
export declare const getTimeDimension: (dimensions: Dimension[]) => Dimension;
|
|
4
|
+
export declare const formatTime: (time: string, timeFormat: string) => string;
|
|
5
|
+
interface MapeTimeProps {
|
|
6
|
+
dimensions: Dimension[];
|
|
7
|
+
timeFormat?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const defaultTimeFormat = "EEE dd MMM yyyy HH:mm 'UTC'";
|
|
10
|
+
export declare const MapTime: React.FC<MapeTimeProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MapTime';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
interface WarningListProps {
|
|
2
|
+
selectedFeatureProperties: {
|
|
3
|
+
identifier?: string;
|
|
4
|
+
severity?: string;
|
|
5
|
+
certainty?: string;
|
|
6
|
+
onset?: string;
|
|
7
|
+
expires?: string;
|
|
8
|
+
languages?: Language[];
|
|
9
|
+
};
|
|
10
|
+
languageIndex?: number;
|
|
11
|
+
parentSize?: number;
|
|
12
|
+
}
|
|
13
|
+
interface Language {
|
|
14
|
+
areaDesc: string;
|
|
15
|
+
language: string;
|
|
16
|
+
event: string;
|
|
17
|
+
senderName: string;
|
|
18
|
+
headline: string;
|
|
19
|
+
description: string;
|
|
20
|
+
}
|
|
21
|
+
export declare const MapWarningProperties: React.FC<WarningListProps>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MapWarningProperties } from './MapWarningProperties';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const FEATURE_DRAW_FILL_COLOR_TRANSPARENT = "#186DFF18";
|
|
2
|
+
export declare const FEATURE_DRAW_FILL_COLOR = "#186DFF";
|
|
3
|
+
export declare const FEATURE_DRAW_STROKE_COLOR = "#186DFF";
|
|
4
|
+
export declare const FEATURE_DRAW_SECONDARY_FILL_COLOR = "#6e1e91";
|
|
5
|
+
export declare const FEATURE_DRAW_SECONDARY_STROKE_COLOR = "#6e1e91";
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { ColorLike } from 'ol/colorlike';
|
|
2
|
+
import type { Coordinate } from 'ol/coordinate';
|
|
3
|
+
import type { FeatureLike } from 'ol/Feature';
|
|
4
|
+
import { Polygon } from 'ol/geom';
|
|
5
|
+
import type { LineCoordType, GeometryFunction } from 'ol/interaction/Draw';
|
|
6
|
+
import { Circle, Fill, Stroke } from 'ol/style';
|
|
7
|
+
import type { StyleFunction, StyleLike } from 'ol/style/Style';
|
|
8
|
+
import Style from 'ol/style/Style';
|
|
9
|
+
import type { DrawModeValue } from './draw/types';
|
|
10
|
+
export declare enum MapFeatureClass {
|
|
11
|
+
MyLocation = "MyLocation",
|
|
12
|
+
GenericMarker = "GenericMarker",
|
|
13
|
+
ObservationStation = "ObservationStation",
|
|
14
|
+
EDRFeature = "EDRFeature",
|
|
15
|
+
EDRMultiPolygon = "EDRMultiPolygon",
|
|
16
|
+
Plugin = "Plugin",
|
|
17
|
+
default = "default"
|
|
18
|
+
}
|
|
19
|
+
export declare const FEATURE_FILL: Fill;
|
|
20
|
+
export declare const FEATURE_STROKE: Stroke;
|
|
21
|
+
export declare const FEATURE_STROKE_EDIT: Stroke;
|
|
22
|
+
export declare const FEATURE_FILL_SELECTED: Fill;
|
|
23
|
+
export declare const FEATURE_STROKE_SELECTED: Stroke;
|
|
24
|
+
export declare const FEATURE_VERTICE_IMAGE: Circle;
|
|
25
|
+
export declare const FEATURE_VERTICE_HANDLE_IMAGE: Circle;
|
|
26
|
+
export declare const FEATURE_VERTICES_EDIT_HANDLES: Style;
|
|
27
|
+
export declare const getFeaturePointStyle: (fillColor?: string, fillOpacity?: number) => Style;
|
|
28
|
+
export declare const labelOptions: {
|
|
29
|
+
font: string;
|
|
30
|
+
padding: number[];
|
|
31
|
+
fill: Fill;
|
|
32
|
+
text: string;
|
|
33
|
+
backgroundFill: Fill;
|
|
34
|
+
backgroundStroke: Stroke;
|
|
35
|
+
offsetY: number;
|
|
36
|
+
overflow: boolean;
|
|
37
|
+
};
|
|
38
|
+
export declare const textLabelStyle: (text: string) => Style;
|
|
39
|
+
export declare const multiPolygonLabelStyle: (text: string) => Style;
|
|
40
|
+
export declare const multiLineStringLabelStyle: (text: string) => Style;
|
|
41
|
+
export declare const measureToolStyle: (lineColor: string) => Style;
|
|
42
|
+
export declare const measureResultStyle: (lineColor: string) => Style;
|
|
43
|
+
export declare const geowebColorToOpenLayersColor: (color: string | undefined, opacity?: string | number) => ColorLike;
|
|
44
|
+
export declare const inlineFeatureStyle: (feature: FeatureLike) => Style[];
|
|
45
|
+
export declare const genericOpenLayersFeatureStyle: StyleFunction;
|
|
46
|
+
export declare const splitStyle: StyleLike;
|
|
47
|
+
export declare const catmullRomSpline: (points: LineCoordType, numPoints?: number) => Coordinate[];
|
|
48
|
+
export declare const createBoxBasedOnModifiedVertex: (modifiedGeometry: Polygon, originalGeometry: Polygon, keepSquare?: boolean) => Polygon;
|
|
49
|
+
export declare const getBoxRotateHandlePoints: (feature: FeatureLike, resolution?: number) => Coordinate[] | undefined;
|
|
50
|
+
export declare const createOval: () => GeometryFunction;
|
|
51
|
+
export declare const drawStyles: Record<DrawModeValue, StyleLike>;
|
|
52
|
+
export declare const modifyStyles: Record<DrawModeValue, Style[] | StyleLike>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { View } from 'ol';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import 'ol/ol.css';
|
|
4
|
+
export interface OpenLayersMapViewProps {
|
|
5
|
+
view?: View;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
isFocused?: boolean;
|
|
8
|
+
isMouseWheelZoomEnabled?: boolean;
|
|
9
|
+
passiveMap?: boolean;
|
|
10
|
+
holdShiftToScroll?: boolean;
|
|
11
|
+
mapId?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const OpenLayersMapView: React.FC<OpenLayersMapViewProps>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { TimeContextType } from '../types/Timespan';
|
|
2
|
+
export type ChangeRelevantTimestepsFn = (layerId: string, dimensionValues: string[]) => void;
|
|
3
|
+
export type ResetPrefetchFn = (layerId: string) => void;
|
|
4
|
+
export type TimestepPrefetchedFn = (layerId: string, dimensionValue: string) => void;
|
|
5
|
+
declare const TimeContext: import("react").Context<TimeContextType>;
|
|
6
|
+
export default TimeContext;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { MapLocation } from '../../../types/types';
|
|
2
|
+
export interface OpenLayersGetFeatureInfoProps {
|
|
3
|
+
displayMapPin?: boolean;
|
|
4
|
+
disableMapPin?: boolean;
|
|
5
|
+
mapPinLocation?: MapLocation;
|
|
6
|
+
selectLocation: (location: MapLocation) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const OpenLayersGetFeatureInfo: React.FC<OpenLayersGetFeatureInfoProps>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Feature } from 'ol';
|
|
2
|
+
import type { Geometry } from 'ol/geom';
|
|
3
|
+
import type { StyleLike } from 'ol/style/Style';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import type { DrawModeExitCallback, DrawModeValue } from './types';
|
|
6
|
+
export interface OpenLayersMapDrawProps {
|
|
7
|
+
geojson: GeoJSON.FeatureCollection;
|
|
8
|
+
drawMode?: DrawModeValue;
|
|
9
|
+
viewOnlyStyle: StyleLike;
|
|
10
|
+
exitDrawModeCallback?: (reason: DrawModeExitCallback) => void;
|
|
11
|
+
isInEditMode: boolean;
|
|
12
|
+
selectedFeatureIndex: number;
|
|
13
|
+
updateGeojson?: (geoJson: GeoJSON.FeatureCollection, text: string) => void;
|
|
14
|
+
onViewOnlyFeatureClick?: (feature: Feature<Geometry>[]) => void;
|
|
15
|
+
onNoFeatureClick?: () => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Integrates with OpenLayers Draw and Modify (+Snap) interactions, to implement feature drawing
|
|
19
|
+
* and modification behaviour.
|
|
20
|
+
*
|
|
21
|
+
* There is a corner case where this fails: the user will only be able to edit the existing
|
|
22
|
+
* feature (not add) when there are 1) multiple features in the geojson, and 2) the
|
|
23
|
+
* selectedFeatureIndex points to a feature with of the same type as drawMode is going to draw. To
|
|
24
|
+
* fix this properly, it would be better that the surrounding code would add a placeholder feature
|
|
25
|
+
* in the geojson and then activate drawing at that feature index. This means the openlayers version
|
|
26
|
+
* works slightly differently from the WebMapJS version, but since the multi-feature edit feature
|
|
27
|
+
* is not really a requirement for any production workflows, this functionality was left as is.
|
|
28
|
+
*/
|
|
29
|
+
export declare const OpenLayersMapDraw: React.FC<OpenLayersMapDrawProps>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const DEFAULT_GEOJSON_STYLE_FILL_OPACITY = 0.1;
|
|
2
|
+
export declare const defaultGeoJSONStyleProperties: GeoJSON.GeoJsonProperties;
|
|
3
|
+
export declare const emptyGeoJSON: GeoJSON.FeatureCollection;
|
|
4
|
+
export declare const featurePoint: GeoJSON.Feature<GeoJSON.Point>;
|
|
5
|
+
export declare const featureMultiPoint: GeoJSON.Feature<GeoJSON.MultiPoint>;
|
|
6
|
+
export declare const featurePolygon: GeoJSON.Feature<GeoJSON.Polygon>;
|
|
7
|
+
export declare const lineString: GeoJSON.Feature<GeoJSON.LineString>;
|
|
8
|
+
export declare const lineStringCollection: GeoJSON.FeatureCollection;
|
|
9
|
+
export interface GeoFeatureStyle {
|
|
10
|
+
stroke?: string;
|
|
11
|
+
fill?: string;
|
|
12
|
+
'stroke-width'?: number;
|
|
13
|
+
'stroke-opacity'?: number;
|
|
14
|
+
'fill-opacity'?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface Coordinate {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './OpenLayersMapDraw';
|
|
2
|
+
export * from './types';
|
|
3
|
+
export { useMapDrawTool, defaultPoint, defaultDelete, defaultPolygon, defaultBox, defaultLocation, defaultIntersectionStyleProperties, defaultSmoothLine, defaultCircle, defaultFreehandLine, defaultLineString, defaultOval, defaultSplit, defaultSquare, defaultRotatableBox, getIcon, currentlySupportedDrawModes, defaultModes, } from './useMapDrawTool';
|
|
4
|
+
export type { MapDrawToolOptions } from './useMapDrawTool';
|
|
5
|
+
export * from './utils';
|
|
6
|
+
export * from './storyExamplesMapDrawTool';
|
|
7
|
+
export * from './storyExamplesMapDrawToolIntersection';
|
|
8
|
+
export * from './storyExamplesMapDrawToolMultipleDrawTools';
|
|
9
|
+
export * from './geojsonShapes';
|
|
10
|
+
export * from './mapDrawUtils';
|
|
11
|
+
export * from './storyComponents';
|
|
12
|
+
export * from './polygonCleanDangling';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FeatureCollection, Feature, Position } from 'geojson';
|
|
2
|
+
import type { Converter } from 'proj4';
|
|
3
|
+
export type ProjectorCache = Record<string, Converter>;
|
|
4
|
+
export declare const projectorCache: ProjectorCache;
|
|
5
|
+
export declare const getProj4: (projection: string | Converter) => Converter;
|
|
6
|
+
export declare const NEW_LINESTRING_CREATED = "new point in LineString created";
|
|
7
|
+
export declare const NEW_FEATURE_CREATED = "new feature created";
|
|
8
|
+
export declare const NEW_POINT_CREATED = "new point created";
|
|
9
|
+
export declare const roundCoordinates: <T extends Position | Position[] | Position[][] | Position[][][]>(coords: T) => T;
|
|
10
|
+
export declare const roundFeatureCoordinates: <T extends Feature>(feature: T) => T;
|
|
11
|
+
export declare const splitPolygon: (polygonFeature: Feature<GeoJSON.Polygon>, splitFeature: Feature<GeoJSON.Polygon>) => FeatureCollection<GeoJSON.Polygon> | null;
|
|
12
|
+
export declare const splitLine: (drawFeature: Feature<GeoJSON.LineString>, splitFeature: Feature<GeoJSON.LineString>) => FeatureCollection<GeoJSON.LineString> | null;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Polygon, FeatureCollection, GeoJsonProperties } from 'geojson';
|
|
2
|
+
import type { Feature as OlFeature } from 'ol';
|
|
3
|
+
import type { Coordinate } from 'ol/coordinate';
|
|
4
|
+
/**
|
|
5
|
+
* Removes lines that are reversed in direction
|
|
6
|
+
* @param newPolyCoords List of coordinates
|
|
7
|
+
* @returns Cleaned up list of coordinates.
|
|
8
|
+
*/
|
|
9
|
+
export declare const removeOverlappingLines: (newPolyCoords: Coordinate[], props?: {
|
|
10
|
+
angleTolerance: number;
|
|
11
|
+
}) => Coordinate[];
|
|
12
|
+
export declare const polygonCleanDanglingCoords: (polyCoords: Coordinate[], props?: {
|
|
13
|
+
distanceTolerance: number;
|
|
14
|
+
angleTolerance: number;
|
|
15
|
+
}) => Coordinate[];
|
|
16
|
+
/**
|
|
17
|
+
* This cleans dangling line segments from a polygon. The distanceTolerance can be set to remove small segments too.
|
|
18
|
+
* @param features Feature to clean, currently only Polygons are supported.
|
|
19
|
+
* @param distanceTolerance The distanceTolerance in the same coordinate system as the feature
|
|
20
|
+
* @returns cleaned up features
|
|
21
|
+
*/
|
|
22
|
+
export declare const polygonCleanDangling: (features: OlFeature[], props?: {
|
|
23
|
+
distanceTolerance: number;
|
|
24
|
+
angleTolerance: number;
|
|
25
|
+
}) => OlFeature[];
|
|
26
|
+
/**
|
|
27
|
+
* This cleans dangling line segments from a polygon. The distanceTolerance can be set to remove small segments too.
|
|
28
|
+
* @param features Feature to clean, currently only Polygons are supported.
|
|
29
|
+
* @param distanceTolerance The distanceTolerance in the same coordinate system as the feature
|
|
30
|
+
* @returns cleaned up features
|
|
31
|
+
*/
|
|
32
|
+
export declare const polygonFeatureCollectionCleanDangling: (features: FeatureCollection<Polygon, GeoJsonProperties> | null, props?: {
|
|
33
|
+
distanceTolerance: number;
|
|
34
|
+
angleTolerance: number;
|
|
35
|
+
}) => FeatureCollection<Polygon, GeoJsonProperties> | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface FeatureLayersProps {
|
|
2
|
+
geojson: GeoJSON.FeatureCollection;
|
|
3
|
+
onChangeLayerIndex: (newIndex: number, feature: GeoJSON.Feature) => void;
|
|
4
|
+
activeFeatureLayerIndex: number;
|
|
5
|
+
getToolIcon: (selectionType: string) => React.ReactElement;
|
|
6
|
+
}
|
|
7
|
+
declare const FeatureLayers: React.FC<FeatureLayersProps>;
|
|
8
|
+
export default FeatureLayers;
|