@opengeoweb/webmap-react 11.1.0 → 12.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +11028 -8179
- package/package.json +6 -5
- package/src/index.d.ts +10 -0
- package/src/lib/components/HoldShiftToZoomMessage/HoldShiftToZoomMessage.d.ts +2 -0
- package/src/lib/components/HoldShiftToZoomMessage/HoldShiftToZoomMessage.spec.d.ts +1 -0
- package/src/lib/components/MapDrawTool/useMapDrawTool.d.ts +3 -3
- package/src/lib/components/MapDrawTool/utils.d.ts +10 -0
- package/src/lib/components/MapMousePosition/MapMousePosition.d.ts +2 -0
- package/src/lib/components/MapMousePosition/MapMousePosition.spec.d.ts +1 -0
- package/src/lib/components/MapMousePosition/index.d.ts +1 -0
- package/src/lib/components/OpenLayers/OlStyles.d.ts +27 -0
- package/src/lib/components/OpenLayers/OlStyles.spec.d.ts +1 -0
- package/src/lib/components/OpenLayers/OpenLayers.BaseLayer.stories.d.ts +6 -0
- package/src/lib/components/OpenLayers/OpenLayers.ClickFeatureLayer.stories.d.ts +10 -0
- package/src/lib/components/OpenLayers/OpenLayers.ClickOnMapTool.stories.d.ts +10 -0
- package/src/lib/components/OpenLayers/OpenLayers.FeatureLayer.stories.d.ts +10 -0
- package/src/lib/components/OpenLayers/OpenLayers.GetFeatureInfo.stories.d.ts +10 -0
- package/src/lib/components/OpenLayers/OpenLayers.HoverFeatureLayer.stories.d.ts +10 -0
- package/src/lib/components/OpenLayers/OpenLayers.Prefetch.stories.d.ts +10 -0
- package/src/lib/components/OpenLayers/OpenLayersConstants.d.ts +2 -0
- package/src/lib/components/OpenLayers/OpenLayersMapView.Error.stories.d.ts +6 -0
- package/src/lib/components/OpenLayers/OpenLayersMapView.MapPin.stories.d.ts +6 -0
- package/src/lib/components/OpenLayers/OpenLayersMapView.Passive.stories.d.ts +6 -0
- package/src/lib/components/OpenLayers/OpenLayersMapView.RadarAnimation.stories.d.ts +6 -0
- package/src/lib/components/OpenLayers/OpenLayersMapView.RadarData.stories.d.ts +6 -0
- package/src/lib/components/OpenLayers/OpenLayersMapView.SetProjectionBBox.stories.d.ts +6 -0
- package/src/lib/components/OpenLayers/OpenLayersMapView.SetProjectionBBoxLocalState.stories.d.ts +6 -0
- package/src/lib/components/OpenLayers/OpenLayersMapView.ShiftToZoom.stories.d.ts +6 -0
- package/src/lib/components/OpenLayers/OpenLayersMapView.ShowLayerInfo.stories.d.ts +6 -0
- package/src/lib/components/{MapView/MapView.TiledBaseLayers.stories.d.ts → OpenLayers/OpenLayersMapView.TiledBaseLayers.stories.d.ts} +3 -3
- package/src/lib/components/OpenLayers/OpenLayersMapView.VFXData.stories.d.ts +6 -0
- package/src/lib/components/OpenLayers/component/OpenLayersMapView.d.ts +12 -0
- package/src/lib/components/OpenLayers/component/OpenLayersMapView.spec.d.ts +1 -0
- package/src/lib/components/OpenLayers/context/MapContext.d.ts +7 -0
- package/src/lib/components/OpenLayers/context/TimeContext.d.ts +7 -0
- package/src/lib/components/OpenLayers/controls/OpenLayersGetFeatureInfo.d.ts +8 -0
- package/src/lib/components/OpenLayers/controls/OpenLayersZoomControl.d.ts +7 -0
- package/src/lib/components/OpenLayers/controls/OpenLayersZoomControl.spec.d.ts +1 -0
- package/src/lib/components/OpenLayers/controls/index.d.ts +2 -0
- package/src/lib/components/OpenLayers/draw/OpenLayersMapDraw.d.ts +26 -0
- package/src/lib/components/OpenLayers/draw/OpenLayersMapDraw.stories.d.ts +9 -0
- package/src/lib/components/OpenLayers/draw/index.d.ts +1 -0
- package/src/lib/components/OpenLayers/index.d.ts +12 -0
- package/src/lib/components/OpenLayers/layers/DefaultBaseLayers.d.ts +10 -0
- package/src/lib/components/OpenLayers/layers/FeatureLayer.d.ts +13 -0
- package/src/lib/components/OpenLayers/layers/OpenLayersFeatureLayer.d.ts +13 -0
- package/src/lib/components/OpenLayers/layers/OpenLayersLayer.d.ts +19 -0
- package/src/lib/components/OpenLayers/layers/TiledWMSLayer.d.ts +11 -0
- package/src/lib/components/OpenLayers/layers/TimeawareImageSourceWMSLayer.d.ts +19 -0
- package/src/lib/components/OpenLayers/layers/TimeawareImageSourceWMSLayer.spec.d.ts +1 -0
- package/src/lib/components/OpenLayers/layers/WMSLayer.d.ts +11 -0
- package/src/lib/components/OpenLayers/layers/WMTSLayer.d.ts +11 -0
- package/src/lib/components/OpenLayers/layers/XYZLayer.d.ts +10 -0
- package/src/lib/components/OpenLayers/layers/index.d.ts +8 -0
- package/src/lib/components/OpenLayers/storyComponents/OlStoryLayout.d.ts +10 -0
- package/src/lib/components/OpenLayers/storyComponents/index.d.ts +1 -0
- package/src/lib/components/OpenLayers/styles/useIconStyle.d.ts +25 -0
- package/src/lib/components/OpenLayers/tools/ClickOnMapTool.d.ts +10 -0
- package/src/lib/components/OpenLayers/tools/index.d.ts +1 -0
- package/src/lib/components/OpenLayers/types/Timespan.d.ts +9 -0
- package/src/lib/components/OpenLayers/types/WorkerQueue.d.ts +6 -0
- package/src/lib/components/OpenLayers/useProjectionDropDown.d.ts +17 -0
- package/src/lib/components/OpenLayers/utils/ShowTimeAwareLayerInfo.d.ts +11 -0
- package/src/lib/components/OpenLayers/utils/TimeAwareImageWrapper.d.ts +42 -0
- package/src/lib/components/OpenLayers/utils/TimeawareImageSource.d.ts +50 -0
- package/src/lib/components/OpenLayers/utils/WorkerQueue.d.ts +14 -0
- package/src/lib/components/OpenLayers/utils/constants.d.ts +6 -0
- package/src/lib/components/OpenLayers/utils/makeDimValuesToPrefetch.d.ts +10 -0
- package/src/lib/components/OpenLayers/utils/makeDimValuesToPrefetch.spec.d.ts +1 -0
- package/src/lib/components/OpenLayers/utils/projections.d.ts +16 -0
- package/src/lib/components/OpenLayers/utils/setMapCenter.d.ts +2 -0
- package/src/lib/components/OpenLayers/utils/types.d.ts +15 -0
- package/src/lib/components/OpenLayers/utils/viewUtils.d.ts +11 -0
- package/src/lib/components/ReactMapView/types.d.ts +1 -0
- package/src/lib/components/WebMapMapView/MapView.VFXData.stories.d.ts +6 -0
- package/src/lib/components/{MapView/MapView.Error.stories.d.ts → WebMapMapView/WebMapMapView.Error.stories.d.ts} +3 -3
- package/src/lib/components/WebMapMapView/WebMapMapView.MapPin.stories.d.ts +6 -0
- package/src/lib/components/WebMapMapView/WebMapMapView.Passive.stories.d.ts +6 -0
- package/src/lib/components/WebMapMapView/WebMapMapView.ProfileSounding.stories.d.ts +6 -0
- package/src/lib/components/WebMapMapView/WebMapMapView.RadarAnimation.stories.d.ts +6 -0
- package/src/lib/components/WebMapMapView/WebMapMapView.RadarData.stories.d.ts +6 -0
- package/src/lib/components/WebMapMapView/WebMapMapView.SetProjectionBBox.stories.d.ts +6 -0
- package/src/lib/components/WebMapMapView/WebMapMapView.SetProjectionBBoxLocalState.stories.d.ts +6 -0
- package/src/lib/components/WebMapMapView/WebMapMapView.ShiftToZoom.stories.d.ts +6 -0
- package/src/lib/components/WebMapMapView/WebMapMapView.ShowLayerInfo.stories.d.ts +6 -0
- package/src/lib/components/WebMapMapView/WebMapMapView.TiledBaseLayers.stories.d.ts +17 -0
- package/src/lib/components/index.d.ts +1 -0
- package/src/lib/hooks/index.d.ts +4 -0
- package/src/lib/hooks/useAnimationForLayer.d.ts +3 -0
- package/src/lib/hooks/useHooksGetCapabilities.d.ts +1 -1
- package/src/lib/hooks/useSetInterValWhenVisible.d.ts +1 -0
- package/src/lib/hooks/useViewFromLayer.d.ts +7 -0
- package/src/lib/index.d.ts +1 -1
- package/src/lib/components/MapView/MapView.MapPin.stories.d.ts +0 -6
- package/src/lib/components/MapView/MapView.Passive.stories.d.ts +0 -6
- package/src/lib/components/MapView/MapView.ProfileSounding.stories.d.ts +0 -6
- package/src/lib/components/MapView/MapView.RadarAnimation.stories.d.ts +0 -6
- package/src/lib/components/MapView/MapView.RadarData.stories.d.ts +0 -6
- package/src/lib/components/MapView/MapView.SetProjectionBBox.stories.d.ts +0 -6
- package/src/lib/components/MapView/MapView.SetProjectionBBoxLocalState.stories.d.ts +0 -6
- package/src/lib/components/MapView/MapView.ShiftToZoom.stories.d.ts +0 -6
- package/src/lib/components/MapView/MapView.ShowLayerInfo.stories.d.ts +0 -6
- package/src/lib/components/MapView/MapView.VFXData.stories.d.ts +0 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/webmap-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.1.0",
|
|
4
4
|
"description": "GeoWeb react wrapper for webmap",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@opengeoweb/webmap": "
|
|
11
|
+
"@opengeoweb/webmap": "12.1.0",
|
|
12
12
|
"axios": "^1.7.7",
|
|
13
|
-
"@opengeoweb/theme": "
|
|
14
|
-
"@opengeoweb/shared": "
|
|
13
|
+
"@opengeoweb/theme": "12.1.0",
|
|
14
|
+
"@opengeoweb/shared": "12.1.0",
|
|
15
15
|
"lodash": "^4.17.21",
|
|
16
|
+
"ol": "^10.4.0",
|
|
16
17
|
"proj4": "^2.9.2",
|
|
17
18
|
"@turf/turf": "^7.1.0",
|
|
18
19
|
"immer": "^10.0.3",
|
|
@@ -20,7 +21,7 @@
|
|
|
20
21
|
"i18next": "^23.11.5",
|
|
21
22
|
"@mui/material": "^6.1.1",
|
|
22
23
|
"react-i18next": "^15.1.1",
|
|
23
|
-
"@tanstack/react-query": "^5.
|
|
24
|
+
"@tanstack/react-query": "^5.62.7"
|
|
24
25
|
},
|
|
25
26
|
"peerDependencies": {
|
|
26
27
|
"react": "18",
|
package/src/index.d.ts
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { WEBMAP_NAMESPACE, webmapTranslations } from '@opengeoweb/webmap';
|
|
2
2
|
import webmapReactTranslations from '../locales/webmap-react.json';
|
|
3
|
+
import { OpenLayersLayerProps, OpenLayersLayer } from './lib/components/OpenLayers/layers/OpenLayersLayer';
|
|
4
|
+
import { DefaultBaseLayers } from './lib/components/OpenLayers/layers/DefaultBaseLayers';
|
|
5
|
+
import { OpenLayersFeatureLayer, WMSLayer } from './lib/components/OpenLayers/layers';
|
|
6
|
+
import TimeContext from './lib/components/OpenLayers/context/TimeContext';
|
|
7
|
+
import { TimeContextType } from './lib/components/OpenLayers/types/Timespan';
|
|
8
|
+
import { TimeawareImageSource } from './lib/components/OpenLayers/utils/TimeawareImageSource';
|
|
3
9
|
export * from './lib';
|
|
4
10
|
export { webmapReactTranslations };
|
|
5
11
|
export { WEBMAP_NAMESPACE, webmapTranslations };
|
|
12
|
+
export { TimeContext, TimeawareImageSource, OpenLayersFeatureLayer, WMSLayer, DefaultBaseLayers, OpenLayersLayer, };
|
|
13
|
+
export type { TimeContextType, OpenLayersLayerProps };
|
|
14
|
+
export declare const setOpenLayersEnabled: (openLayersOnOrOff: boolean) => void;
|
|
15
|
+
export declare const isOpenLayersEnabled: () => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DrawMode, DrawModeValue, SelectionType } from './types';
|
|
3
|
-
import {
|
|
3
|
+
import { OpenLayersLayerProps } from '../OpenLayers/layers';
|
|
4
4
|
export declare const defaultIntersectionStyleProperties: GeoJSON.GeoJsonProperties;
|
|
5
5
|
export declare const emptyLineString: GeoJSON.Feature;
|
|
6
6
|
export declare const emptyPoint: GeoJSON.Feature;
|
|
@@ -24,8 +24,8 @@ export interface MapDrawToolProps {
|
|
|
24
24
|
activeTool: string;
|
|
25
25
|
changeActiveTool: (newMode: DrawMode) => void;
|
|
26
26
|
setActiveTool: (newToolId: string) => void;
|
|
27
|
-
layers:
|
|
28
|
-
getLayer: (layerType: DrawLayerType, layerId: string) =>
|
|
27
|
+
layers: OpenLayersLayerProps[];
|
|
28
|
+
getLayer: (layerType: DrawLayerType, layerId: string) => OpenLayersLayerProps;
|
|
29
29
|
deactivateTool: () => void;
|
|
30
30
|
changeProperties: (geoJSONProperties: GeoJSON.GeoJsonProperties) => void;
|
|
31
31
|
getProperties: () => GeoJSON.GeoJsonProperties;
|
|
@@ -9,6 +9,16 @@ import { DrawMode, SelectionType } from './types';
|
|
|
9
9
|
* @param featureProperties
|
|
10
10
|
*/
|
|
11
11
|
export declare const addFeatureProperties: (geojson: GeoJSON.FeatureCollection | undefined, featureProperties: GeoJSON.GeoJsonProperties, featureIndex?: number) => GeoJSON.FeatureCollection;
|
|
12
|
+
/**
|
|
13
|
+
* Checks if the geometry of the feature is empty as defined per GeoJSON spec.
|
|
14
|
+
* According to the specification, an empty geometry is type 'Polygon' and coordinates
|
|
15
|
+
* equal [[]]. Also GeoWeb uses empty linestring and poit geometries (coordinates [])
|
|
16
|
+
* which are supported as well.
|
|
17
|
+
*
|
|
18
|
+
* @param feature Feature to test
|
|
19
|
+
* @returns Whether `feature` is empty or not
|
|
20
|
+
*/
|
|
21
|
+
export declare const isGeoJSONGeometryEmpty: (feature: GeoJSON.Feature) => boolean;
|
|
12
22
|
export declare const getGeoJSONPropertyValue: (property: string, properties: GeoJSON.GeoJsonProperties, polygonDrawMode: DrawMode | undefined, defaultProperties?: GeoJSON.GeoJsonProperties) => number | string;
|
|
13
23
|
/**
|
|
14
24
|
* moves geoJSON feature as new feature. Mutates newGeoJSON
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MapMousePosition';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Circle, Fill, Stroke } from 'ol/style';
|
|
2
|
+
import Style, { StyleFunction, StyleLike } from 'ol/style/Style';
|
|
3
|
+
import { ColorLike } from 'ol/colorlike';
|
|
4
|
+
import { DrawModeValue } from '../MapDrawTool';
|
|
5
|
+
export declare enum MapFeatureClass {
|
|
6
|
+
MyLocation = "MyLocation",
|
|
7
|
+
GenericMarker = "GenericMarker",
|
|
8
|
+
ObservationStation = "ObservationStation",
|
|
9
|
+
EDRFeature = "EDRFeature",
|
|
10
|
+
EDRMultiPolygon = "EDRMultiPolygon",
|
|
11
|
+
default = "default"
|
|
12
|
+
}
|
|
13
|
+
export declare const FEATURE_FILL: Fill;
|
|
14
|
+
export declare const FEATURE_STROKE: Stroke;
|
|
15
|
+
export declare const FEATURE_STROKE_EDIT: Stroke;
|
|
16
|
+
export declare const FEATURE_VERTICE_IMAGE: Circle;
|
|
17
|
+
export declare const FEATURE_VERTICE_HANDLE_IMAGE: Circle;
|
|
18
|
+
export declare const ICON_LOCATIONMARKER: Style;
|
|
19
|
+
export declare const ICON_LOCATIONMARKER_MODIFY: Style;
|
|
20
|
+
export declare const FEATURE_VERTICES_EDIT_HANDLES: Style;
|
|
21
|
+
export declare const textLabelStyle: (text: string) => Style;
|
|
22
|
+
export declare const multiPolygonLabelStyle: (text: string) => Style;
|
|
23
|
+
export declare const geowebColorToOpenLayersColor: (color: string, opacity?: string | number) => ColorLike;
|
|
24
|
+
export declare const inlineFeatureStyle: StyleFunction;
|
|
25
|
+
export declare const genericOpenLayersFeatureStyle: StyleFunction;
|
|
26
|
+
export declare const drawStyles: Record<DrawModeValue, StyleLike>;
|
|
27
|
+
export declare const modifyStyles: Record<DrawModeValue, Style[]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { OpenLayersMapView } from '.';
|
|
3
|
+
declare const meta: Meta<typeof OpenLayersMapView>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof OpenLayersMapView>;
|
|
6
|
+
export declare const BaseLayerStory: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.FC<import("./component/OpenLayersMapView").OpenLayersMapViewProps>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const ClickFeatureLayerMap: {
|
|
8
|
+
(): React.ReactNode;
|
|
9
|
+
storyName: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.FC<import("./component/OpenLayersMapView").OpenLayersMapViewProps>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const ClickOnMapToolExample: {
|
|
8
|
+
(): React.ReactNode;
|
|
9
|
+
storyName: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.FC<import("./component/OpenLayersMapView").OpenLayersMapViewProps>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const FeatureLayerMap: {
|
|
8
|
+
(): React.ReactNode;
|
|
9
|
+
storyName: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.FC<import("./component/OpenLayersMapView").OpenLayersMapViewProps>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const GetFeatureInfoExample: {
|
|
8
|
+
(): React.ReactNode;
|
|
9
|
+
storyName: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.FC<import("./component/OpenLayersMapView").OpenLayersMapViewProps>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const HoverFeatureLayerMap: {
|
|
8
|
+
(): React.ReactNode;
|
|
9
|
+
storyName: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.FC<import("./component/OpenLayersMapView").OpenLayersMapViewProps>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const PrefetchMap: {
|
|
8
|
+
(): React.ReactNode;
|
|
9
|
+
storyName: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { OpenLayersMapView } from '.';
|
|
3
|
+
declare const meta: Meta<typeof OpenLayersMapView>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof OpenLayersMapView>;
|
|
6
|
+
export declare const RadarAnimation: Story;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { OpenLayersMapView } from '.';
|
|
3
|
+
declare const meta: Meta<typeof OpenLayersMapView>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof OpenLayersMapView>;
|
|
6
|
+
export declare const SetProjectionBBox: Story;
|
package/src/lib/components/OpenLayers/OpenLayersMapView.SetProjectionBBoxLocalState.stories.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { OpenLayersMapView } from '.';
|
|
3
|
+
declare const meta: Meta<typeof OpenLayersMapView>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof OpenLayersMapView>;
|
|
6
|
+
export declare const SetProjectionBBoxLocalState: Story;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { OpenLayersMapView } from '.';
|
|
3
|
+
declare const meta: Meta<typeof OpenLayersMapView>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof OpenLayersMapView>;
|
|
6
|
+
export declare const HoldShiftToZoom: Story;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { OpenLayersMapView } from '.';
|
|
3
|
+
declare const meta: Meta<typeof OpenLayersMapView>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof OpenLayersMapView>;
|
|
6
|
+
export declare const MapWithShowLayerInfoEnabled: Story;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import {
|
|
3
|
-
declare const meta: Meta<typeof
|
|
2
|
+
import { OpenLayersMapView } from '.';
|
|
3
|
+
declare const meta: Meta<typeof OpenLayersMapView>;
|
|
4
4
|
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof
|
|
5
|
+
type Story = StoryObj<typeof OpenLayersMapView>;
|
|
6
6
|
export interface MapDropDownItem {
|
|
7
7
|
name: string;
|
|
8
8
|
title: string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { OpenLayersMapView } from './component/OpenLayersMapView';
|
|
3
|
+
declare const meta: Meta<typeof OpenLayersMapView>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof OpenLayersMapView>;
|
|
6
|
+
export declare const MapViewVFX: Story;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View } from 'ol';
|
|
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
|
+
}
|
|
12
|
+
export declare const OpenLayersMapView: React.FC<OpenLayersMapViewProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TimeContextType } from '../types/Timespan';
|
|
3
|
+
export type ChangeRelevantTimestepsFn = (layerId: string, dimensionValues: string[]) => void;
|
|
4
|
+
export type ResetPrefetchFn = (layerId: string) => void;
|
|
5
|
+
export type TimestepPrefetchedFn = (layerId: string, dimensionValue: string) => void;
|
|
6
|
+
declare const TimeContext: import("react").Context<TimeContextType>;
|
|
7
|
+
export default TimeContext;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { MapLocation } from '../../ReactMapView';
|
|
3
|
+
export interface OpenLayersGetFeatureInfoProps {
|
|
4
|
+
displayMapPin?: boolean;
|
|
5
|
+
mapPinLocation?: MapLocation;
|
|
6
|
+
selectLocation: (location: MapLocation) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const OpenLayersGetFeatureInfo: React.FC<OpenLayersGetFeatureInfoProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { StyleLike } from 'ol/style/Style';
|
|
3
|
+
import { DrawModeExitCallback } from '../../MapDraw';
|
|
4
|
+
import { DrawModeValue } from '../../MapDrawTool';
|
|
5
|
+
export interface OpenLayersMapDrawProps {
|
|
6
|
+
geojson: GeoJSON.FeatureCollection;
|
|
7
|
+
drawMode?: DrawModeValue;
|
|
8
|
+
viewOnlyStyle: StyleLike;
|
|
9
|
+
exitDrawModeCallback?: (reason: DrawModeExitCallback) => void;
|
|
10
|
+
isInEditMode: boolean;
|
|
11
|
+
selectedFeatureIndex: number;
|
|
12
|
+
updateGeojson?: (geoJson: GeoJSON.FeatureCollection, text: string) => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Integrates with OpenLayers Draw and Modify (+Snap) interactions, to implement feature drawing
|
|
16
|
+
* and modification behaviour.
|
|
17
|
+
*
|
|
18
|
+
* There is a corner case where this fails: the user will only be able to edit the existing
|
|
19
|
+
* feature (not add) when there are 1) multiple features in the geojson, and 2) the
|
|
20
|
+
* selectedFeatureIndex points to a feature with of the same type as drawMode is going to draw. To
|
|
21
|
+
* fix this properly, it would be better that the surrounding code would add a placeholder feature
|
|
22
|
+
* in the geojson and then activate drawing at that feature index. This means the openlayers version
|
|
23
|
+
* works slightly differently from the WebMapJS version, but since the multi-feature edit feature
|
|
24
|
+
* is not really a requirement for any production workflows, this functionality was left as is.
|
|
25
|
+
*/
|
|
26
|
+
export declare const OpenLayersMapDraw: React.FC<OpenLayersMapDrawProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { useMapDrawTool } from '../../MapDrawTool';
|
|
3
|
+
declare const meta: Meta<typeof useMapDrawTool>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof useMapDrawTool>;
|
|
6
|
+
export declare const OlBasicMapDrawTool: Story;
|
|
7
|
+
export declare const OlBasicMapDrawToolShape: Story;
|
|
8
|
+
export declare const OlBasicMapDrawToolWithMultipleShapes: Story;
|
|
9
|
+
export declare const OlBasicMapDrawToolWithMultipleShapesValues: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './OpenLayersMapDraw';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { default as MapContext } from './context/MapContext';
|
|
2
|
+
export * from './component/OpenLayersMapView';
|
|
3
|
+
export * from './utils/TimeAwareImageWrapper';
|
|
4
|
+
export * from './utils/types';
|
|
5
|
+
export * from './utils/projections';
|
|
6
|
+
export * from './utils/setMapCenter';
|
|
7
|
+
export * from './utils/viewUtils';
|
|
8
|
+
export * from './controls';
|
|
9
|
+
export * from './draw';
|
|
10
|
+
export * from './styles/useIconStyle';
|
|
11
|
+
export * from './OlStyles';
|
|
12
|
+
export * from './tools';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare enum BaseLayerType {
|
|
3
|
+
LIGHT_GREY_CANVAS = 0,
|
|
4
|
+
WORLD_TOPO = 1
|
|
5
|
+
}
|
|
6
|
+
interface DefaultBaseLayersOptions {
|
|
7
|
+
type?: BaseLayerType;
|
|
8
|
+
}
|
|
9
|
+
export declare const DefaultBaseLayers: React.FC<DefaultBaseLayersOptions>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Feature } from 'ol';
|
|
3
|
+
import { StyleLike } from 'ol/style/Style';
|
|
4
|
+
import { ClickOnFeature, HoverSelect } from '../utils/types';
|
|
5
|
+
export interface FeatureLayerProps {
|
|
6
|
+
features: Feature[];
|
|
7
|
+
style: StyleLike;
|
|
8
|
+
zIndex?: number;
|
|
9
|
+
hoverSelect?: HoverSelect;
|
|
10
|
+
clickOnFeature?: ClickOnFeature;
|
|
11
|
+
testId?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const FeatureLayer: React.FC<FeatureLayerProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { StyleLike } from 'ol/style/Style';
|
|
3
|
+
import { FeatureCollection } from 'geojson';
|
|
4
|
+
import { ClickOnFeature, HoverSelect } from '../utils/types';
|
|
5
|
+
export interface OpenLayersFeatureLayerProps {
|
|
6
|
+
featureCollection?: FeatureCollection;
|
|
7
|
+
style: StyleLike;
|
|
8
|
+
zIndex?: number;
|
|
9
|
+
hoverSelect?: HoverSelect;
|
|
10
|
+
clickOnFeature?: ClickOnFeature;
|
|
11
|
+
testId?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const OpenLayersFeatureLayer: React.FC<OpenLayersFeatureLayerProps>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { LayerFoundation } from '@opengeoweb/webmap';
|
|
2
|
+
import type { OnInitializeLayerProps } from '../utils/types';
|
|
3
|
+
import { DrawModeExitCallback, FeatureEvent } from '../../MapDraw';
|
|
4
|
+
export interface OpenLayersLayerProps extends LayerFoundation {
|
|
5
|
+
zIndex?: number;
|
|
6
|
+
onInitializeLayer?: (payload: OnInitializeLayerProps) => void;
|
|
7
|
+
onLayerReady?: (layerId: string) => void;
|
|
8
|
+
onLayerError?: (layerId: string, message: string) => void;
|
|
9
|
+
debugMode?: boolean;
|
|
10
|
+
id: string;
|
|
11
|
+
isInEditMode?: boolean;
|
|
12
|
+
drawMode?: string;
|
|
13
|
+
updateGeojson?: (geoJson: GeoJSON.FeatureCollection, reason: string) => void;
|
|
14
|
+
exitDrawModeCallback?: (reason: DrawModeExitCallback) => void;
|
|
15
|
+
selectedFeatureIndex?: number;
|
|
16
|
+
onClickFeature?: (event?: FeatureEvent) => void;
|
|
17
|
+
onHoverFeature?: (event: FeatureEvent) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const OpenLayersLayer: (layerProps: OpenLayersLayerProps) => React.ReactElement;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import ImageLayer from 'ol/layer/Image';
|
|
3
|
+
import { LayerFoundation } from '@opengeoweb/webmap';
|
|
4
|
+
export interface TiledWMSLayerProps {
|
|
5
|
+
url: string;
|
|
6
|
+
layerName: string;
|
|
7
|
+
styleName: string;
|
|
8
|
+
layerOptions: ConstructorParameters<typeof ImageLayer>[0];
|
|
9
|
+
layerProps?: LayerFoundation;
|
|
10
|
+
}
|
|
11
|
+
export declare const TiledWMSLayer: React.FC<TiledWMSLayerProps>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import ImageLayer from 'ol/layer/Image';
|
|
3
|
+
import { Dimension } from '@opengeoweb/webmap';
|
|
4
|
+
import type { OnInitializeLayerProps } from '../utils/types';
|
|
5
|
+
interface TimeawareImageSourceWMSLayerProps {
|
|
6
|
+
layerId?: string;
|
|
7
|
+
getCapsURL: string;
|
|
8
|
+
layerName: string;
|
|
9
|
+
styleName?: string;
|
|
10
|
+
layerOptions: ConstructorParameters<typeof ImageLayer>[0];
|
|
11
|
+
dimensions?: Dimension[];
|
|
12
|
+
visible?: boolean;
|
|
13
|
+
onInitializeLayer?: (payload: OnInitializeLayerProps) => void;
|
|
14
|
+
onLayerReady?: (layerId: string) => void;
|
|
15
|
+
onLayerError?: (layerId: string, message: string) => void;
|
|
16
|
+
debugMode?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare const TimeawareImageSourceWMSLayer: React.FC<TimeawareImageSourceWMSLayerProps>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import ImageLayer from 'ol/layer/Image';
|
|
3
|
+
import { LayerFoundation } from '@opengeoweb/webmap';
|
|
4
|
+
export interface WMSLayerProps {
|
|
5
|
+
url: string;
|
|
6
|
+
layerName: string;
|
|
7
|
+
styleName: string;
|
|
8
|
+
layerOptions: ConstructorParameters<typeof ImageLayer>[0];
|
|
9
|
+
layerProps?: LayerFoundation;
|
|
10
|
+
}
|
|
11
|
+
export declare const WMSLayer: React.FC<WMSLayerProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import TileLayer from 'ol/layer/Tile';
|
|
3
|
+
import { LayerFoundation } from '@opengeoweb/webmap';
|
|
4
|
+
export interface WMTSLayerProps {
|
|
5
|
+
getCapsURL: string;
|
|
6
|
+
layerName: string;
|
|
7
|
+
tileMatrixSet: string;
|
|
8
|
+
layerOptions: ConstructorParameters<typeof TileLayer>[0];
|
|
9
|
+
layerProps?: LayerFoundation;
|
|
10
|
+
}
|
|
11
|
+
export declare const WMTSLayer: React.FC<WMTSLayerProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import TileLayer from 'ol/layer/Tile';
|
|
3
|
+
import { LayerFoundation } from '@opengeoweb/webmap';
|
|
4
|
+
export interface XYZLayerProps {
|
|
5
|
+
urlTemplate: string;
|
|
6
|
+
layerOptions: ConstructorParameters<typeof TileLayer>[0];
|
|
7
|
+
layerProps?: LayerFoundation;
|
|
8
|
+
tileProjectionCode?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const XYZLayer: React.FC<XYZLayerProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './TimeawareImageSourceWMSLayer';
|
|
2
|
+
export * from './WMSLayer';
|
|
3
|
+
export * from './WMTSLayer';
|
|
4
|
+
export * from './XYZLayer';
|
|
5
|
+
export * from './DefaultBaseLayers';
|
|
6
|
+
export * from './OpenLayersLayer';
|
|
7
|
+
export * from './FeatureLayer';
|
|
8
|
+
export * from './OpenLayersFeatureLayer';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DrawModeExitCallback } from '../../MapDraw';
|
|
3
|
+
import { OpenLayersLayerProps } from '../layers';
|
|
4
|
+
interface OlStoryLayoutProps {
|
|
5
|
+
layers: OpenLayersLayerProps[];
|
|
6
|
+
children: React.ReactElement;
|
|
7
|
+
onExitDrawMode: (reason: DrawModeExitCallback) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const OlStoryLayout: React.FC<OlStoryLayoutProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './OlStoryLayout';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Style } from 'ol/style';
|
|
2
|
+
import { Options } from 'ol/style/Icon';
|
|
3
|
+
type IconSVG = string | {
|
|
4
|
+
path: string;
|
|
5
|
+
width?: number;
|
|
6
|
+
height?: number;
|
|
7
|
+
};
|
|
8
|
+
interface IconParameters {
|
|
9
|
+
render?: {
|
|
10
|
+
fillStyle?: string | CanvasGradient | CanvasPattern;
|
|
11
|
+
strokeStyle?: string | CanvasGradient | CanvasPattern;
|
|
12
|
+
lineWidth?: number;
|
|
13
|
+
};
|
|
14
|
+
icon?: Omit<Options, 'img'>;
|
|
15
|
+
}
|
|
16
|
+
interface UseIconStyleProps {
|
|
17
|
+
svgPath: string;
|
|
18
|
+
options: IconParameters;
|
|
19
|
+
}
|
|
20
|
+
interface IconStyle {
|
|
21
|
+
icon: Style;
|
|
22
|
+
}
|
|
23
|
+
export declare const createIconStyle: ((input: IconSVG, options: IconParameters) => Style) & import("lodash").MemoizedFunction;
|
|
24
|
+
export declare const useIconStyle: ({ svgPath, options, }: UseIconStyleProps) => IconStyle;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { StyleLike } from 'ol/style/Style';
|
|
3
|
+
export interface ClickOnMapToolProps {
|
|
4
|
+
isActive: boolean;
|
|
5
|
+
isVisible: boolean;
|
|
6
|
+
layerZIndex?: number;
|
|
7
|
+
pointStyle: StyleLike;
|
|
8
|
+
pointSelected: (coords: number[]) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const ClickOnMapTool: React.FC<ClickOnMapToolProps>;
|