@opengeoweb/webmap-react 6.0.4 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/webmap-react",
3
- "version": "6.0.4",
3
+ "version": "7.0.0",
4
4
  "description": "GeoWeb react wrapper for webmap",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ import { Source } from '@opengeoweb/shared';
3
+ import { 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
+ }
14
+ export declare const LegendDialog: React.FC<LegendDialogProps>;
15
+ export {};
@@ -1,2 +1,3 @@
1
1
  export * from './Legend';
2
2
  export * from './LegendLayout';
3
+ export * from './LegendDialog';
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ import { TooltipProps } from '@mui/material';
3
+ import { 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,7 @@
1
+ import * as React from 'react';
2
+ interface MapControlsProps {
3
+ children: React.ReactNode;
4
+ style?: React.CSSProperties;
5
+ }
6
+ export declare const MapControls: React.FC<MapControlsProps>;
7
+ export {};
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ interface ZoomControlsProps {
3
+ onZoomIn: () => void;
4
+ onZoomOut: () => void;
5
+ onZoomReset: () => void;
6
+ }
7
+ export declare const ZoomControls: React.FC<ZoomControlsProps>;
8
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './ZoomControls';
2
+ export * from './MapControlButton';
3
+ export * from './MapControls';
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ import { 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,8 @@
1
+ import * as React from 'react';
2
+ import { ReactMapViewProps } from '../ReactMapView';
3
+ export interface MapViewProps extends ReactMapViewProps {
4
+ controls?: {
5
+ zoomControls?: boolean;
6
+ };
7
+ }
8
+ export declare const MapView: React.FC<MapViewProps>;
@@ -0,0 +1,17 @@
1
+ import * as React from 'react';
2
+ import { GeoJSONObject } from '@turf/turf';
3
+ import { LayerFoundation, WMJSMap, WMLayer } from '@opengeoweb/webmap';
4
+ import { DrawModeExitCallback, FeatureEvent } from '../MapDraw';
5
+ export interface MapViewLayerProps extends LayerFoundation {
6
+ id: string;
7
+ onLayerReady?: (layer: WMLayer, webmap?: WMJSMap) => void;
8
+ onLayerError?: (layer: WMLayer, error?: Error) => void;
9
+ isInEditMode?: boolean;
10
+ drawMode?: string;
11
+ updateGeojson?: (geoJson: GeoJSONObject) => void;
12
+ exitDrawModeCallback?: (reason: DrawModeExitCallback) => void;
13
+ featureNrToEdit?: number;
14
+ onClickFeature?: (event: FeatureEvent) => void;
15
+ onHoverFeature?: (event: FeatureEvent) => void;
16
+ }
17
+ export declare const MapViewLayer: React.FC<MapViewLayerProps>;
@@ -0,0 +1,2 @@
1
+ export * from './MapView';
2
+ export * from './MapViewLayer';
@@ -0,0 +1,58 @@
1
+ /// <reference types="node" />
2
+ import * as React from 'react';
3
+ import { WMJSMap, WMLayer, WMBBOX } from '@opengeoweb/webmap';
4
+ import { ReactMapViewProps } from './types';
5
+ export declare const ORIGIN_REACTMAPVIEW_ONMAPCHANGEDIMENSION = "ORIGIN_REACTMAPVIEW_ONMAPCHANGEDIMENSION";
6
+ export declare const ORIGIN_REACTMAPVIEW_ONUPDATELAYERINFO = "ORIGIN_REACTMAPVIEW_ONUPDATELAYERINFO";
7
+ interface ReactMapViewState {
8
+ adagucInitialised: boolean;
9
+ }
10
+ interface AdagucObjectProp {
11
+ initialized: boolean;
12
+ baseLayers: WMLayer[];
13
+ oldbbox: WMBBOX;
14
+ currentWidth: number;
15
+ currentHeight: number;
16
+ currentMapProps: {
17
+ children?: React.ReactNode;
18
+ };
19
+ }
20
+ export declare class ReactMapView extends React.Component<ReactMapViewProps, ReactMapViewState> {
21
+ adaguc: AdagucObjectProp;
22
+ adagucContainerRef: React.RefObject<HTMLDivElement>;
23
+ adagucWebMapJSRef: React.RefObject<HTMLDivElement>;
24
+ refetchTimer: NodeJS.Timeout | number | null;
25
+ static defaultProps: {
26
+ srs: string;
27
+ bbox: {
28
+ left: number;
29
+ bottom: number;
30
+ right: number;
31
+ top: number;
32
+ };
33
+ shouldAutoFetch: boolean;
34
+ displayMapPin: boolean;
35
+ disableMapPin: boolean;
36
+ onWMJSMount: () => void;
37
+ onMapChangeDimension: () => void;
38
+ onUpdateLayerInformation: () => void;
39
+ onMapZoomEnd: () => void;
40
+ };
41
+ constructor(props: ReactMapViewProps);
42
+ componentDidMount(): void;
43
+ componentDidUpdate(prevProps: ReactMapViewProps): void;
44
+ componentWillUnmount(): void;
45
+ handleWindowResize(): void;
46
+ onDimChangeListener(): void;
47
+ onAfterSetBBoxListener(): void;
48
+ onUpdateBBoxListener(newBbox: WMBBOX): void;
49
+ onStartRefetchTimer: () => void;
50
+ clearRefetchTimer: () => void;
51
+ parseWMJSLayer: (wmLayer: WMLayer, forceReload: boolean, child?: React.ReactElement) => void;
52
+ updateWMJSMapProps(prevProps: ReactMapViewProps, props: ReactMapViewProps): void;
53
+ drawDebounced(): void;
54
+ mountWMJSMap(): WMJSMap | null;
55
+ resize(): void;
56
+ render(): React.ReactElement;
57
+ }
58
+ export {};
@@ -0,0 +1,8 @@
1
+ import { WMLayer } from '@opengeoweb/webmap';
2
+ import * as React from 'react';
3
+ interface ReactMapViewLayerProps {
4
+ id: string;
5
+ onLayerReady?: (layer: WMLayer) => void;
6
+ }
7
+ export declare const ReactMapViewLayer: React.FC<ReactMapViewLayerProps>;
8
+ export {};
@@ -0,0 +1,4 @@
1
+ import { WMLayer, WMJSDimension } from '@opengeoweb/webmap';
2
+ import { UpdateLayerInfoPayload } from './types';
3
+ export declare const getCurrentDimensionValue: (name: string, dimensions?: WMJSDimension[]) => string;
4
+ export declare const setLayerInfo: (wmLayer: WMLayer, mapId: string, onUpdateLayerInformation?: ((payload: UpdateLayerInfoPayload) => void) | undefined) => void;
@@ -0,0 +1,3 @@
1
+ export * from './ReactMapViewLayer';
2
+ export * from './ReactMapView';
3
+ export * from './types';
@@ -0,0 +1,72 @@
1
+ /// <reference types="react" />
2
+ import { Bbox, Dimension, WMJSMap } from '@opengeoweb/webmap';
3
+ export interface ReactMapViewProps {
4
+ listeners?: {
5
+ name?: string;
6
+ data: string;
7
+ keep: boolean;
8
+ callbackfunction: (webMap: WMJSMap, value: string) => void;
9
+ }[];
10
+ srs?: string;
11
+ bbox?: Bbox;
12
+ children?: React.ReactNode;
13
+ mapId: string;
14
+ activeLayerId?: string;
15
+ showScaleBar?: boolean;
16
+ showLegend?: boolean;
17
+ passiveMap?: boolean;
18
+ displayTimeInMap?: boolean;
19
+ animationDelay?: number;
20
+ dimensions?: Dimension[];
21
+ onClick?: () => void;
22
+ displayMapPin?: boolean;
23
+ mapPinLocation?: MapLocation;
24
+ shouldAutoFetch?: boolean;
25
+ showLayerInfo?: boolean;
26
+ disableMapPin?: boolean;
27
+ onWMJSMount?: (mapId: string) => void;
28
+ onMapChangeDimension?: (payload: SetMapDimensionPayload) => void;
29
+ onMapZoomEnd?: (payload: SetBboxPayload) => void;
30
+ onMapPinChangeLocation?: (payload: MapPinLocationPayload) => void;
31
+ onUpdateLayerInformation?: (payload: UpdateLayerInfoPayload) => void;
32
+ }
33
+ export interface MapLocation {
34
+ lat: number;
35
+ lon: number;
36
+ }
37
+ export interface MapPinLocationPayload {
38
+ mapId: string;
39
+ mapPinLocation: MapLocation;
40
+ }
41
+ export interface SetMapDimensionPayload {
42
+ origin: string;
43
+ mapId: string;
44
+ dimension: Dimension;
45
+ }
46
+ export interface SetBboxPayload {
47
+ mapId: string;
48
+ bbox: Bbox;
49
+ srs?: string;
50
+ }
51
+ export interface SetLayerDimensionsPayload {
52
+ layerId: string;
53
+ origin: string;
54
+ dimensions: Dimension[];
55
+ }
56
+ export interface UpdateAllMapDimensionsPayload {
57
+ origin: string;
58
+ mapId: string;
59
+ dimensions: Dimension[];
60
+ }
61
+ export interface SetLayerStylePayload {
62
+ layerId: string;
63
+ style: string;
64
+ mapId?: string;
65
+ origin?: string;
66
+ }
67
+ export interface UpdateLayerInfoPayload {
68
+ origin: string;
69
+ mapDimensions?: UpdateAllMapDimensionsPayload;
70
+ layerStyle?: SetLayerStylePayload;
71
+ layerDimensions?: SetLayerDimensionsPayload;
72
+ }
@@ -0,0 +1,22 @@
1
+ import { Dimension, LayerFoundation, WMLayer } from '@opengeoweb/webmap';
2
+ import { FeatureLayer } from '../MapDraw';
3
+ /**
4
+ * Returns filtered list of props with geoJson
5
+ * @param children React.ReactNode, layers with geoJson
6
+ */
7
+ export declare const getFeatureLayers: (children: React.ReactNode) => FeatureLayer[];
8
+ /**
9
+ * Returns true if this is a maplayer and not a baselayer or overlayer
10
+ * @param layer The LayerFoundation object, or the props from the ReactWMJSLayer
11
+ */
12
+ export declare const isAMapLayer: (layer: LayerFoundation) => boolean;
13
+ /**
14
+ * Returns true if this is a geojsonlayer (layer containing geojson field)
15
+ * @param layer The LayerFoundation object, or the props from the ReactWMJSLayer
16
+ */
17
+ export declare const isAGeoJSONLayer: (layer: LayerFoundation) => boolean;
18
+ export declare const getWMJSLayerFromReactLayer: (mapId: string, wmLayers: WMLayer[], reactWebMapJSLayer: React.ReactElement, wmLayerIndex: number) => {
19
+ layer: WMLayer;
20
+ layerArrayMutated: boolean;
21
+ };
22
+ export declare function getIsInsideAcceptanceTime(acceptanceTimeInMinutes: number | undefined, mapDimensions: Dimension[] | undefined, layerDimensions: Dimension[] | undefined): boolean;
@@ -1,3 +1,7 @@
1
1
  export * from './CanvasComponent';
2
2
  export * from './Legend';
3
3
  export * from './MapDraw';
4
+ export * from './ReactMapView';
5
+ export * from './MapView';
6
+ export * from './MapTime';
7
+ export * from './MapControls';
@@ -1 +1,2 @@
1
1
  export * from './components';
2
+ export * from './layers';
@@ -0,0 +1,15 @@
1
+ import { LayerType } from '@opengeoweb/webmap';
2
+ export declare const baseLayerGrey: {
3
+ id: string;
4
+ name: string;
5
+ type: string;
6
+ layerType: LayerType;
7
+ };
8
+ export declare const overLayer: {
9
+ service: string;
10
+ name: string;
11
+ format: string;
12
+ enabled: boolean;
13
+ id: string;
14
+ layerType: LayerType;
15
+ };
@@ -0,0 +1,3 @@
1
+ export * as publicLayers from './publicLayers';
2
+ export * as defaultLayers from './defaultLayers';
3
+ export * as publicServices from './publicServices';
@@ -0,0 +1,310 @@
1
+ import { LayerType } from '@opengeoweb/webmap';
2
+ import * as defaultLayers from './defaultLayers';
3
+ export { defaultLayers };
4
+ export declare const baseLayer: {
5
+ name: string;
6
+ title: string;
7
+ type: string;
8
+ layerType: LayerType;
9
+ enabled: boolean;
10
+ id: string;
11
+ };
12
+ export declare const baseLayerOpenStreetMapNL: {
13
+ id: string;
14
+ name: string;
15
+ type: string;
16
+ layerType: LayerType;
17
+ enabled: boolean;
18
+ };
19
+ export declare const baseLayerArcGisCanvas: {
20
+ service: string;
21
+ id: string;
22
+ name: string;
23
+ type: string;
24
+ enabled: boolean;
25
+ layerType: LayerType;
26
+ };
27
+ export declare const baseLayerWorldMap: {
28
+ id: string;
29
+ name: string;
30
+ type: string;
31
+ layerType: LayerType;
32
+ enabled: boolean;
33
+ };
34
+ export declare const baseLayerHeiGit: {
35
+ service: string;
36
+ id: string;
37
+ name: string;
38
+ layerType: LayerType;
39
+ };
40
+ export declare const msgCppLayer: {
41
+ service: string;
42
+ name: string;
43
+ format: string;
44
+ enabled: boolean;
45
+ style: string;
46
+ id: string;
47
+ layerType: LayerType;
48
+ };
49
+ export declare const veiligheidsRegiosGebiedsIndelingenLabels: {
50
+ service: string;
51
+ name: string;
52
+ style: string;
53
+ enabled: boolean;
54
+ layerType: LayerType;
55
+ };
56
+ export declare const veiligheidsRegiosGebiedsIndelingen: {
57
+ service: string;
58
+ name: string;
59
+ style: string;
60
+ enabled: boolean;
61
+ layerType: LayerType;
62
+ };
63
+ export declare const radarLayer: {
64
+ service: string;
65
+ name: string;
66
+ format: string;
67
+ enabled: boolean;
68
+ style: string;
69
+ id: string;
70
+ layerType: LayerType;
71
+ };
72
+ export declare const radarLayerWithError: {
73
+ service: string;
74
+ name: string;
75
+ format: string;
76
+ enabled: boolean;
77
+ style: string;
78
+ id: string;
79
+ layerType: LayerType;
80
+ };
81
+ export declare const obsAirTemperature: {
82
+ service: string;
83
+ name: string;
84
+ id: string;
85
+ layerType: LayerType;
86
+ };
87
+ export declare const obsWind: {
88
+ service: string;
89
+ name: string;
90
+ id: string;
91
+ layerType: LayerType;
92
+ };
93
+ export declare const obsAirPressureAtSeaLevel: {
94
+ service: string;
95
+ name: string;
96
+ id: string;
97
+ layerType: LayerType;
98
+ };
99
+ export declare const obsRelativeHumidity: {
100
+ service: string;
101
+ name: string;
102
+ id: string;
103
+ layerType: LayerType;
104
+ };
105
+ export declare const obsGlobalSolarRadiation: {
106
+ service: string;
107
+ name: string;
108
+ id: string;
109
+ layerType: LayerType;
110
+ };
111
+ export declare const obsPrecipitationIntensityPWS: {
112
+ service: string;
113
+ name: string;
114
+ id: string;
115
+ layerType: LayerType;
116
+ };
117
+ export declare const harmonieRelativeHumidityPl: {
118
+ service: string;
119
+ name: string;
120
+ id: string;
121
+ layerType: LayerType;
122
+ enabled: boolean;
123
+ };
124
+ export declare const harmonieWindPl: {
125
+ service: string;
126
+ name: string;
127
+ id: string;
128
+ layerType: LayerType;
129
+ enabled: boolean;
130
+ };
131
+ export declare const harmonieAirTemperature: {
132
+ service: string;
133
+ name: string;
134
+ id: string;
135
+ layerType: LayerType;
136
+ enabled: boolean;
137
+ };
138
+ export declare const harmoniePrecipitation: {
139
+ service: string;
140
+ name: string;
141
+ id: string;
142
+ layerType: LayerType;
143
+ enabled: boolean;
144
+ };
145
+ export declare const harmoniePressure: {
146
+ service: string;
147
+ name: string;
148
+ id: string;
149
+ layerType: LayerType;
150
+ enabled: boolean;
151
+ };
152
+ export declare const harmonieWindFlags: {
153
+ service: string;
154
+ name: string;
155
+ enabled: boolean;
156
+ id: string;
157
+ layerType: LayerType;
158
+ };
159
+ export declare const klimaatAtlasTG3: {
160
+ service: string;
161
+ name: string;
162
+ enabled: boolean;
163
+ id: string;
164
+ layerType: LayerType;
165
+ };
166
+ export declare const dwdWarningLayer: {
167
+ service: string;
168
+ name: string;
169
+ format: string;
170
+ enabled: boolean;
171
+ id: string;
172
+ layerType: LayerType;
173
+ };
174
+ export declare const dwdRadarLayer: {
175
+ service: string;
176
+ name: string;
177
+ format: string;
178
+ enabled: boolean;
179
+ id: string;
180
+ layerType: LayerType;
181
+ };
182
+ export declare const dwdObservationsWetterLayer: {
183
+ service: string;
184
+ name: string;
185
+ style: string;
186
+ format: string;
187
+ enabled: boolean;
188
+ id: string;
189
+ layerType: LayerType;
190
+ };
191
+ export declare const dwdObservationsWetterLayerWithHeader: {
192
+ service: string;
193
+ name: string;
194
+ style: string;
195
+ format: string;
196
+ enabled: boolean;
197
+ id: string;
198
+ layerType: LayerType;
199
+ headers: {
200
+ name: string;
201
+ value: string;
202
+ }[];
203
+ };
204
+ export declare const dwdObservationsWindLayer: {
205
+ service: string;
206
+ name: string;
207
+ style: string;
208
+ format: string;
209
+ enabled: boolean;
210
+ id: string;
211
+ layerType: LayerType;
212
+ };
213
+ export declare const FMITemp: {
214
+ service: string;
215
+ name: string;
216
+ format: string;
217
+ enabled: boolean;
218
+ id: string;
219
+ layerType: LayerType;
220
+ };
221
+ export declare const MetNoTemp: {
222
+ service: string;
223
+ name: string;
224
+ format: string;
225
+ enabled: boolean;
226
+ id: string;
227
+ layerType: LayerType;
228
+ };
229
+ export declare const metNorwayWind1: {
230
+ service: string;
231
+ name: string;
232
+ format: string;
233
+ enabled: boolean;
234
+ id: string;
235
+ layerType: LayerType;
236
+ };
237
+ export declare const metNorwayWind2: {
238
+ service: string;
239
+ name: string;
240
+ format: string;
241
+ enabled: boolean;
242
+ id: string;
243
+ layerType: LayerType;
244
+ };
245
+ export declare const metNorwayWind3: {
246
+ service: string;
247
+ name: string;
248
+ format: string;
249
+ enabled: boolean;
250
+ id: string;
251
+ layerType: LayerType;
252
+ };
253
+ export declare const metNorwayLatestT: {
254
+ service: string;
255
+ name: string;
256
+ format: string;
257
+ enabled: boolean;
258
+ id: string;
259
+ layerType: LayerType;
260
+ };
261
+ export declare const metNorwaySalinaty: {
262
+ service: string;
263
+ name: string;
264
+ format: string;
265
+ enabled: boolean;
266
+ id: string;
267
+ layerType: LayerType;
268
+ };
269
+ export declare const msgFesEUMETSAT: {
270
+ service: string;
271
+ name: string;
272
+ enabled: boolean;
273
+ id: string;
274
+ layerType: LayerType;
275
+ };
276
+ export declare const msgNaturalenhncdEUMETSAT: {
277
+ service: string;
278
+ name: string;
279
+ enabled: boolean;
280
+ id: string;
281
+ layerType: LayerType;
282
+ };
283
+ export declare const msgAshEUMETSAT: {
284
+ service: string;
285
+ name: string;
286
+ enabled: boolean;
287
+ id: string;
288
+ layerType: LayerType;
289
+ };
290
+ export declare const msgCthEUMETSAT: {
291
+ service: string;
292
+ name: string;
293
+ enabled: boolean;
294
+ id: string;
295
+ layerType: LayerType;
296
+ };
297
+ export declare const msgFogEUMETSAT: {
298
+ service: string;
299
+ name: string;
300
+ enabled: boolean;
301
+ id: string;
302
+ layerType: LayerType;
303
+ };
304
+ export declare const msgNaturalEUMETSAT: {
305
+ service: string;
306
+ name: string;
307
+ enabled: boolean;
308
+ id: string;
309
+ layerType: LayerType;
310
+ };