@opengeoweb/webmap-react 12.5.0 → 12.7.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.
Files changed (73) hide show
  1. package/index.esm.js +6905 -4261
  2. package/package.json +4 -6
  3. package/src/index.d.ts +2 -4
  4. package/src/lib/components/MapDimensionSelect/MapDimensionSelect.stories.d.ts +1 -1
  5. package/src/lib/components/MapDraw/index.d.ts +0 -2
  6. package/src/lib/components/MapDraw/mapDrawUtils.d.ts +0 -17
  7. package/src/lib/components/MapDraw/storyComponents/StoryLayout.d.ts +3 -3
  8. package/src/lib/components/MapDrawTool/types.d.ts +1 -1
  9. package/src/lib/components/OpenLayers/OpenLayers.FeatureLayerOpacity.stories.d.ts +10 -0
  10. package/src/lib/components/OpenLayers/controls/OpenLayersGetFeatureInfo.d.ts +1 -0
  11. package/src/lib/components/OpenLayers/draw/OpenLayersMapDraw.d.ts +1 -1
  12. package/src/lib/components/OpenLayers/draw/index.d.ts +1 -0
  13. package/src/lib/components/{MapDraw/MapDrawContainer.d.ts → OpenLayers/draw/types.d.ts} +20 -9
  14. package/src/lib/components/OpenLayers/layers/FeatureLayer.d.ts +1 -0
  15. package/src/lib/components/OpenLayers/layers/OpenLayersFeatureLayer.d.ts +1 -0
  16. package/src/lib/components/OpenLayers/layers/OpenLayersLayer.d.ts +1 -1
  17. package/src/lib/components/OpenLayers/layers/TimeAwareEDRLocationLayer.d.ts +11 -0
  18. package/src/lib/components/OpenLayers/layers/index.d.ts +1 -0
  19. package/src/lib/components/OpenLayers/storyComponents/OlStoryLayout.d.ts +1 -1
  20. package/src/lib/components/OpenLayers/utils/TimeAwareImageWrapper.d.ts +1 -0
  21. package/src/lib/components/OpenLayers/utils/coverageCollectionToFeatureCollection.d.ts +2 -0
  22. package/src/lib/components/ReactMapView/index.d.ts +0 -2
  23. package/src/lib/components/ReactMapView/types.d.ts +1 -41
  24. package/src/lib/components/ReactMapView/utils.d.ts +2 -10
  25. package/src/lib/components/TanStackDemo/EDRLayerApi.stories.d.ts +17 -0
  26. package/src/lib/components/TanStackDemo/TanStackDemo.GetCapabilitiesLiveUpdate.stories.d.ts +1 -1
  27. package/src/lib/components/TanStackDemo/storyUtils.d.ts +6 -0
  28. package/src/lib/components/index.d.ts +1 -2
  29. package/src/lib/edr-layer-api/colormaps/colormaps.d.ts +5 -0
  30. package/src/lib/edr-layer-api/colormaps/edrOlLegendUtils.d.ts +20 -0
  31. package/src/lib/edr-layer-api/colormaps/index.d.ts +2 -0
  32. package/src/lib/edr-layer-api/fakeApi.d.ts +1 -0
  33. package/src/lib/edr-layer-api/hooks.d.ts +6 -0
  34. package/src/lib/edr-layer-api/index.d.ts +3 -0
  35. package/src/lib/hooks/useHooksGetCapabilities.d.ts +2 -2
  36. package/src/lib/index.d.ts +1 -0
  37. package/src/lib/components/Axis/ProfileAxis.d.ts +0 -8
  38. package/src/lib/components/Axis/ProfileAxis.spec.d.ts +0 -1
  39. package/src/lib/components/Axis/ProfileAxis.stories.d.ts +0 -7
  40. package/src/lib/components/Axis/profileUtils.d.ts +0 -17
  41. package/src/lib/components/MapDraw/MapDraw.d.ts +0 -159
  42. package/src/lib/components/MapDraw/MapDraw.stories.d.ts +0 -13
  43. package/src/lib/components/MapDraw/storyComponents/FeatureInfo.d.ts +0 -3
  44. package/src/lib/components/MapDraw/storyComponents/FeatureInfoHTML.d.ts +0 -3
  45. package/src/lib/components/MapDraw/storyComponents/MapDrawGeoJSON.d.ts +0 -3
  46. package/src/lib/components/MapDraw/storyComponents/Synops.d.ts +0 -3
  47. package/src/lib/components/MapDrawTool/MapDrawToolIntersection.stories.d.ts +0 -7
  48. package/src/lib/components/MapView/MapView.d.ts +0 -9
  49. package/src/lib/components/MapView/MapView.spec.d.ts +0 -1
  50. package/src/lib/components/MapView/MapViewLayer.d.ts +0 -16
  51. package/src/lib/components/MapView/index.d.ts +0 -2
  52. package/src/lib/components/ReactMapView/ReactMapView.d.ts +0 -66
  53. package/src/lib/components/ReactMapView/ReactMapView.spec.d.ts +0 -2
  54. package/src/lib/components/ReactMapView/ReactMapViewLayer.d.ts +0 -8
  55. package/src/lib/components/WMSViewerDemo/WebmapReact.stories.d.ts +0 -6
  56. package/src/lib/components/WebMapMapView/MapView.VFXData.stories.d.ts +0 -6
  57. package/src/lib/components/WebMapMapView/WebMapMapView.Error.stories.d.ts +0 -8
  58. package/src/lib/components/WebMapMapView/WebMapMapView.MapPin.stories.d.ts +0 -6
  59. package/src/lib/components/WebMapMapView/WebMapMapView.Passive.stories.d.ts +0 -6
  60. package/src/lib/components/WebMapMapView/WebMapMapView.ProfileSounding.stories.d.ts +0 -6
  61. package/src/lib/components/WebMapMapView/WebMapMapView.RadarAnimation.stories.d.ts +0 -6
  62. package/src/lib/components/WebMapMapView/WebMapMapView.RadarData.stories.d.ts +0 -6
  63. package/src/lib/components/WebMapMapView/WebMapMapView.SetProjectionBBox.stories.d.ts +0 -6
  64. package/src/lib/components/WebMapMapView/WebMapMapView.SetProjectionBBoxLocalState.stories.d.ts +0 -6
  65. package/src/lib/components/WebMapMapView/WebMapMapView.ShiftToZoom.stories.d.ts +0 -6
  66. package/src/lib/components/WebMapMapView/WebMapMapView.ShowLayerInfo.stories.d.ts +0 -6
  67. package/src/lib/components/WebMapMapView/WebMapMapView.TiledBaseLayers.stories.d.ts +0 -17
  68. /package/src/lib/components/{Axis/profileUtils.spec.d.ts → OpenLayers/draw/OpenLayersMapDraw.spec.d.ts} +0 -0
  69. /package/src/lib/components/{MapDraw/MapDraw.spec.d.ts → OpenLayers/layers/OpenLayersFeatureLayer.spec.d.ts} +0 -0
  70. /package/src/lib/components/{MapDraw/MapDrawContainer.spec.d.ts → OpenLayers/layers/OpenLayersLayer.spec.d.ts} +0 -0
  71. /package/src/lib/components/{MapDraw/mapDrawUtils.spec.d.ts → OpenLayers/layers/TimeAwareEDRLocationLayer.spec.d.ts} +0 -0
  72. /package/src/lib/components/{MapDrawTool/useMapDrawTool.spec.d.ts → OpenLayers/utils/coverageCollectionToFeatureCollection.spec.d.ts} +0 -0
  73. /package/src/lib/{components/MapDrawTool/utils.spec.d.ts → edr-layer-api/colormaps/edrOlLegendUtils.spec.d.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/webmap-react",
3
- "version": "12.5.0",
3
+ "version": "12.7.0",
4
4
  "description": "GeoWeb react wrapper for webmap",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -8,16 +8,14 @@
8
8
  "url": "git@gitlab.com:opengeoweb/opengeoweb.git"
9
9
  },
10
10
  "dependencies": {
11
- "@opengeoweb/webmap": "12.5.0",
12
- "axios": "^1.7.7",
13
- "@opengeoweb/theme": "12.5.0",
14
- "@opengeoweb/shared": "12.5.0",
11
+ "@opengeoweb/webmap": "12.7.0",
12
+ "@opengeoweb/theme": "12.7.0",
13
+ "@opengeoweb/shared": "12.7.0",
15
14
  "lodash": "^4.17.21",
16
15
  "ol": "^10.4.0",
17
16
  "proj4": "^2.9.2",
18
17
  "@turf/turf": "^7.1.0",
19
18
  "immer": "^10.0.3",
20
- "react-resize-detector": "^9.1.0",
21
19
  "i18next": "^25.0.1",
22
20
  "@mui/material": "^7.0.1",
23
21
  "react-i18next": "^15.1.1",
package/src/index.d.ts CHANGED
@@ -2,14 +2,12 @@ import { WEBMAP_NAMESPACE, webmapTranslations } from '@opengeoweb/webmap';
2
2
  import webmapReactTranslations from '../locales/webmap-react.json';
3
3
  import { OpenLayersLayerProps, OpenLayersLayer } from './lib/components/OpenLayers/layers/OpenLayersLayer';
4
4
  import { DefaultBaseLayers } from './lib/components/OpenLayers/layers/DefaultBaseLayers';
5
- import { OpenLayersFeatureLayer, WMSLayer } from './lib/components/OpenLayers/layers';
5
+ import { OpenLayersFeatureLayer, TimeAwareEDRLocationLayer, WMSLayer } from './lib/components/OpenLayers/layers';
6
6
  import TimeContext from './lib/components/OpenLayers/context/TimeContext';
7
7
  import { TimeContextType } from './lib/components/OpenLayers/types/Timespan';
8
8
  import { TimeawareImageSource } from './lib/components/OpenLayers/utils/TimeawareImageSource';
9
9
  export * from './lib';
10
10
  export { webmapReactTranslations };
11
11
  export { WEBMAP_NAMESPACE, webmapTranslations };
12
- export { TimeContext, TimeawareImageSource, OpenLayersFeatureLayer, WMSLayer, DefaultBaseLayers, OpenLayersLayer, };
12
+ export { TimeContext, TimeawareImageSource, OpenLayersFeatureLayer, TimeAwareEDRLocationLayer, WMSLayer, DefaultBaseLayers, OpenLayersLayer, };
13
13
  export type { TimeContextType, OpenLayersLayerProps };
14
- export declare const setOpenLayersEnabled: (openLayersOnOrOff: boolean) => void;
15
- export declare const isOpenLayersEnabled: () => boolean;
@@ -3,7 +3,7 @@ import type { StoryObj } from '@storybook/react';
3
3
  import MapDimensionSelect from './MapDimensionSelect';
4
4
  declare const _default: {
5
5
  title: string;
6
- component: React.FC<import("../MapView").MapViewProps>;
6
+ component: React.FC<import("../OpenLayers").OpenLayersMapViewProps>;
7
7
  };
8
8
  export default _default;
9
9
  type Story = StoryObj<typeof MapDimensionSelect>;
@@ -1,5 +1,3 @@
1
- export * from './MapDrawContainer';
2
- export * from './MapDraw';
3
1
  export * from './mapDrawUtils';
4
2
  export * from './geojsonShapes';
5
3
  export * from './storyComponents';
@@ -1,26 +1,9 @@
1
1
  import proj4, { InterfaceProjection } from 'proj4';
2
- import { Position } from 'geojson';
3
2
  import { Coordinate } from './geojsonShapes';
4
- export type CheckHoverFeaturesResult = {
5
- coordinateIndexInFeature: number;
6
- featureIndex: number;
7
- feature: GeoJSON.Feature;
8
- distance: number;
9
- screenCoords: {
10
- x: number;
11
- y: number;
12
- };
13
- } | null;
14
3
  export type ProjectorCache = Record<string, InterfaceProjection>;
15
4
  export declare const Proj4js: typeof proj4;
16
5
  export declare const projectorCache: ProjectorCache;
17
6
  export declare const getProj4: (projection: string | proj4.InterfaceProjection) => InterfaceProjection;
18
- export declare const distance: (a: Coordinate, b: Coordinate) => number;
19
- export declare const isBetween: (a: Coordinate, c: Coordinate, b: Coordinate) => boolean;
20
- export declare const convertGeoCoordsToScreenCoords: (featureCoords: Position[], mapId: string) => Coordinate[];
21
- export declare const getPixelCoordFromGeoCoord: (featureCoords: Position[], mapId: string) => Coordinate[];
22
- export declare const findClosestCoords: (positions: Coordinate[], mouseX: number, mouseY: number) => number[];
23
- export declare const checkHoverFeatures: (geojson: GeoJSON.FeatureCollection, mouseX: number, mouseY: number, convertGeoCoordsToScreenCoords: (featureCoords: Position[]) => Coordinate[], ignoreCoordinateIndexInFeature?: boolean) => CheckHoverFeaturesResult;
24
7
  export interface MapDrawDrawFunctionArgs {
25
8
  context: CanvasRenderingContext2D;
26
9
  featureIndex: number;
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
- import { MapViewLayerProps } from '../../MapView';
3
- import { DrawModeExitCallback } from '../MapDraw';
2
+ import { DrawModeExitCallback } from '../../OpenLayers';
3
+ import { OpenLayersLayerProps } from '../../OpenLayers/layers';
4
4
  interface StoryLayoutProps {
5
- layers: MapViewLayerProps[];
5
+ layers: OpenLayersLayerProps[];
6
6
  children: React.ReactElement;
7
7
  onExitDrawMode: (reason: DrawModeExitCallback) => void;
8
8
  }
@@ -1,4 +1,4 @@
1
- import { DRAWMODE } from '../MapDraw/MapDraw';
1
+ import { DRAWMODE } from '../OpenLayers/draw/types';
2
2
  export type DrawModeValue = DRAWMODE | 'DELETE' | '';
3
3
  type DefaultSelectionTypes = 'poly' | 'point' | 'box' | 'linestring';
4
4
  export type SelectionType = DefaultSelectionTypes | string;
@@ -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 FeatureLayerOpacity: {
8
+ (): React.ReactNode;
9
+ storyName: string;
10
+ };
@@ -2,6 +2,7 @@
2
2
  import { MapLocation } from '../../ReactMapView';
3
3
  export interface OpenLayersGetFeatureInfoProps {
4
4
  displayMapPin?: boolean;
5
+ disableMapPin?: boolean;
5
6
  mapPinLocation?: MapLocation;
6
7
  selectLocation: (location: MapLocation) => void;
7
8
  }
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { StyleLike } from 'ol/style/Style';
3
- import { DrawModeExitCallback } from '../../MapDraw';
4
3
  import { DrawModeValue } from '../../MapDrawTool';
4
+ import { DrawModeExitCallback } from './types';
5
5
  export interface OpenLayersMapDrawProps {
6
6
  geojson: GeoJSON.FeatureCollection;
7
7
  drawMode?: DrawModeValue;
@@ -1 +1,2 @@
1
1
  export * from './OpenLayersMapDraw';
2
+ export * from './types';
@@ -1,6 +1,23 @@
1
- import * as React from 'react';
2
1
  import { GeometryObject } from 'geojson';
3
- import { DrawModeExitCallback, FeatureEvent } from './MapDraw';
2
+ export declare enum DRAWMODE {
3
+ POLYGON = "POLYGON",
4
+ BOX = "BOX",
5
+ MULTIPOINT = "MULTIPOINT",
6
+ POINT = "POINT",
7
+ LINESTRING = "LINESTRING"
8
+ }
9
+ export interface FeatureEvent {
10
+ coordinateIndexInFeature: number;
11
+ featureIndex: number;
12
+ screenCoords: {
13
+ x: number;
14
+ y: number;
15
+ };
16
+ mouseX: number;
17
+ mouseY: number;
18
+ isInEditMode: boolean;
19
+ feature: GeoJSON.Feature;
20
+ }
4
21
  export interface FeatureLayer {
5
22
  id: string;
6
23
  type: string;
@@ -15,10 +32,4 @@ export interface FeatureLayer {
15
32
  exitDrawModeCallback?: (reason: DrawModeExitCallback, newGeoJSON?: GeoJSON.FeatureCollection) => void;
16
33
  selectedFeatureIndex?: string;
17
34
  }
18
- interface MapDrawContainerProps {
19
- featureLayers: FeatureLayer[];
20
- linkedFeatures?: GeoJSON.FeatureCollection;
21
- mapId: string;
22
- }
23
- export declare const MapDrawContainer: React.FC<MapDrawContainerProps>;
24
- export {};
35
+ export type DrawModeExitCallback = 'escaped' | 'doubleClicked' | 'shiftClick';
@@ -9,5 +9,6 @@ export interface FeatureLayerProps {
9
9
  hoverSelect?: HoverSelect;
10
10
  clickOnFeature?: ClickOnFeature;
11
11
  testId?: string;
12
+ opacity?: number;
12
13
  }
13
14
  export declare const FeatureLayer: React.FC<FeatureLayerProps>;
@@ -9,5 +9,6 @@ export interface OpenLayersFeatureLayerProps {
9
9
  hoverSelect?: HoverSelect;
10
10
  clickOnFeature?: ClickOnFeature;
11
11
  testId?: string;
12
+ opacity?: number;
12
13
  }
13
14
  export declare const OpenLayersFeatureLayer: React.FC<OpenLayersFeatureLayerProps>;
@@ -1,6 +1,6 @@
1
1
  import { LayerFoundation, TileServerSettings } from '@opengeoweb/webmap';
2
2
  import type { OnInitializeLayerProps } from '../utils/types';
3
- import { DrawModeExitCallback, FeatureEvent } from '../../MapDraw';
3
+ import { DrawModeExitCallback, FeatureEvent } from '../draw/types';
4
4
  export interface OpenLayersLayerProps extends LayerFoundation {
5
5
  zIndex?: number;
6
6
  onInitializeLayer?: (payload: OnInitializeLayerProps) => void;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { OpenLayersFeatureLayerProps } from './OpenLayersFeatureLayer';
3
+ interface TimeAwareEDRLocationLayerProps extends OpenLayersFeatureLayerProps {
4
+ currentTime: string | undefined;
5
+ timestep: number;
6
+ edrBaseUrl: string;
7
+ collectionId: string;
8
+ parameter: string;
9
+ }
10
+ export declare const TimeAwareEDRLocationLayer: React.FC<TimeAwareEDRLocationLayerProps>;
11
+ export {};
@@ -6,3 +6,4 @@ export * from './DefaultBaseLayers';
6
6
  export * from './OpenLayersLayer';
7
7
  export * from './FeatureLayer';
8
8
  export * from './OpenLayersFeatureLayer';
9
+ export * from './TimeAwareEDRLocationLayer';
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { DrawModeExitCallback } from '../../MapDraw';
3
2
  import { OpenLayersLayerProps } from '../layers';
3
+ import { DrawModeExitCallback } from '../draw';
4
4
  interface OlStoryLayoutProps {
5
5
  layers: OpenLayersLayerProps[];
6
6
  children: React.ReactElement;
@@ -3,6 +3,7 @@ import ImageWrapper from 'ol/Image';
3
3
  import { Projection } from 'ol/proj';
4
4
  import { WMImageStore } from '@opengeoweb/webmap';
5
5
  export declare const openLayersGetMapImageStore: WMImageStore;
6
+ export declare const clearImageCacheForAllMaps: () => void;
6
7
  interface TimeAwareGeoreferencedImageSrc {
7
8
  src: string;
8
9
  extent: Extent;
@@ -0,0 +1,2 @@
1
+ import { CoverageCollection } from '@opengeoweb/shared';
2
+ export declare const coverageCollectionToFeatureCollection: (cov: CoverageCollection | undefined, parameterName: string) => GeoJSON.FeatureCollection;
@@ -1,5 +1,3 @@
1
1
  import RadarGetCapabilities from './radarGetCapabilities.spec.json';
2
- export * from './ReactMapViewLayer';
3
- export * from './ReactMapView';
4
2
  export * from './types';
5
3
  export { RadarGetCapabilities };
@@ -1,44 +1,4 @@
1
- /// <reference types="react" />
2
- import { Bbox, Dimension, IWMJSMap, TileServerSettings } from '@opengeoweb/webmap';
3
- import { TFunction } from 'i18next';
4
- export interface ReactMapViewProps {
5
- listeners?: {
6
- name?: string;
7
- data: string;
8
- keep: boolean;
9
- callbackfunction: (webMap: IWMJSMap, value: string) => void;
10
- }[];
11
- isTimeScrollingEnabled?: boolean;
12
- srs?: string;
13
- bbox?: Bbox;
14
- children?: React.ReactNode;
15
- mapId: string;
16
- activeLayerId?: string;
17
- showScaleBar?: boolean;
18
- showLegend?: boolean;
19
- tileServerSettings?: TileServerSettings;
20
- passiveMap?: boolean;
21
- displayTimeInMap?: boolean;
22
- animationDelay?: number;
23
- timestep?: number;
24
- dimensions?: Dimension[];
25
- onClick?: () => void;
26
- displayMapPin?: boolean;
27
- mapPinLocation?: MapLocation;
28
- shouldAutoFetch?: number | boolean;
29
- showLayerInfo?: boolean;
30
- disableMapPin?: boolean;
31
- holdShiftToScroll?: boolean;
32
- shouldDisablePrefetching?: boolean;
33
- t?: TFunction;
34
- linkedFeatures?: GeoJSON.FeatureCollection;
35
- onWMJSMount?: (mapId: string) => void;
36
- onWMJSUnMount?: (mapId: string) => void;
37
- onMapChangeDimension?: (payload: SetMapDimensionPayload) => void;
38
- onMapZoomEnd?: (payload: SetBboxPayload) => void;
39
- onMapPinChangeLocation?: (payload: MapPinLocationPayload) => void;
40
- onUpdateLayerInformation?: (payload: UpdateLayerInfoPayload) => void;
41
- }
1
+ import { Bbox, Dimension } from '@opengeoweb/webmap';
42
2
  export interface MapLocation {
43
3
  lat: number;
44
4
  lon: number;
@@ -1,8 +1,6 @@
1
- import { Dimension, LayerFoundation, IWMJSMap, WMLayer } from '@opengeoweb/webmap';
1
+ import { Dimension, LayerFoundation } from '@opengeoweb/webmap';
2
2
  import React from 'react';
3
- import { FeatureLayer } from '../MapDraw';
4
- import type { MapViewLayerProps, MapViewProps } from '../MapView';
5
- import { ReactMapViewProps, UpdateLayerInfoPayload } from './types';
3
+ import { FeatureLayer } from '../OpenLayers/draw/types';
6
4
  /** Returns filtered list of props with geoJson
7
5
  * @param children React.ReactNode, layers with geoJson
8
6
  */
@@ -18,9 +16,3 @@ export declare const isAMapLayer: (layer: LayerFoundation) => boolean;
18
16
  */
19
17
  export declare const isAGeoJSONLayer: (layer: LayerFoundation) => boolean;
20
18
  export declare function getIsInsideAcceptanceTime(acceptanceTimeInMinutes: number | undefined, mapDimensions: Dimension[] | undefined, layerDimensions: Dimension[] | undefined): boolean;
21
- export declare const makeLayerPropListFromChildren: (children: React.ReactNode, mapId: string) => MapViewLayerProps[];
22
- export declare const parseWMJSLayer: (wmLayer: WMLayer, forceReload: boolean) => Promise<WMLayer>;
23
- export declare const setWMLayerPropsBasedOnChildProps: (child: MapViewLayerProps, wmLayer: WMLayer, mapViewProps: ReactMapViewProps) => boolean;
24
- export declare const addWMLayerPropsBasedOnChildProps: (child: MapViewLayerProps, mapId: string, props: MapViewProps, onUpdateLayerInformation?: (payload: UpdateLayerInfoPayload) => void) => void;
25
- export declare const removeWMLayerFromMap: (wmLayer: WMLayer, mapId: string, onUpdateLayerInformation?: (payload: UpdateLayerInfoPayload) => void) => void;
26
- export declare const orderLayers: (wmjsMap: IWMJSMap, _reactMapViewLayers: MapViewLayerProps[]) => boolean;
@@ -0,0 +1,17 @@
1
+ import * as React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const EdrLayerAPICollection: {
7
+ (): React.ReactElement;
8
+ storyName: string;
9
+ };
10
+ export declare const EdrLayerAPILocations: {
11
+ (): React.ReactElement;
12
+ storyName: string;
13
+ };
14
+ export declare const EdrLayerAPICubeOnObs: {
15
+ (): React.ReactElement;
16
+ storyName: string;
17
+ };
@@ -3,7 +3,7 @@ declare const _default: {
3
3
  title: string;
4
4
  };
5
5
  export default _default;
6
- export declare const MapViewRadar: {
6
+ export declare const TanStackDemoGetCapLiveUpdate: {
7
7
  (): React.ReactElement;
8
8
  storyName: string;
9
9
  };
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ interface StoryWrapperProps {
3
+ children: [] | React.ReactElement;
4
+ }
5
+ export declare const StoryWrapper: ({ children, }: StoryWrapperProps) => React.ReactElement;
6
+ export {};
@@ -2,9 +2,8 @@ export * from './Legend';
2
2
  export * from './MapDraw';
3
3
  export * from './MapDrawTool';
4
4
  export * from './ReactMapView';
5
- export * from './ReactMapView/utils';
6
5
  export * from './ReactMapView/ReactMapViewParseLayer';
7
- export * from './MapView';
6
+ export * from './ReactMapView/utils';
8
7
  export * from './MapTime';
9
8
  export * from './MapControls';
10
9
  export * from './MapWarning';
@@ -0,0 +1,5 @@
1
+ import { ColorMap } from './edrOlLegendUtils';
2
+ export declare const wowTemperatureLegendColors: ColorMap;
3
+ export declare const colorMaps: {
4
+ wowTemperatureLegendColors: ColorMap;
5
+ };
@@ -0,0 +1,20 @@
1
+ import { FeatureLike } from 'ol/Feature';
2
+ import { Circle, Style } from 'ol/style';
3
+ export type ColorMap = string[];
4
+ export interface EdrMapLegendEntry {
5
+ min: number;
6
+ max: number;
7
+ color: string;
8
+ image: Circle;
9
+ }
10
+ export interface EdrOlColorLegend {
11
+ legend: EdrMapLegendEntry[];
12
+ }
13
+ export declare const makeLegendFromColorMap: (props: {
14
+ colors: ColorMap;
15
+ min: number;
16
+ max: number;
17
+ }) => EdrOlColorLegend;
18
+ export declare const getLegendClass: (edrColorLegend: EdrOlColorLegend, value: number, clip?: boolean) => EdrMapLegendEntry | undefined;
19
+ export declare const makeFeatureStyleDisc: (feature: FeatureLike, legend: EdrOlColorLegend) => Style;
20
+ export declare const makeFeatureStyleLoading: (feature: FeatureLike) => Style;
@@ -0,0 +1,2 @@
1
+ export * from './colormaps';
2
+ export * from './edrOlLegendUtils';
@@ -0,0 +1 @@
1
+ export declare const fakeEdrLayerApiHandlers: import("msw").HttpHandler[];
@@ -0,0 +1,6 @@
1
+ import { EDRInstance, CoverageCollection } from '@opengeoweb/shared';
2
+ import { UseQueryResult } from '@tanstack/react-query';
3
+ import { FeatureCollection } from 'geojson';
4
+ export declare const useEDRCollection: (edrBaseUrl: string, collectionId: string, instanceId?: string) => UseQueryResult<EDRInstance, Error>;
5
+ export declare const useEDRCollectionLocation: (edrBaseUrl: string, collectionId: string, instanceId?: string) => UseQueryResult<FeatureCollection, Error>;
6
+ export declare const useEDRCollectionCube: (edrBaseUrl: string, collectionId: string, parameterName: string, datetime?: string, instanceId?: string, bbox?: string) => UseQueryResult<CoverageCollection, Error>;
@@ -0,0 +1,3 @@
1
+ export * from './hooks';
2
+ export * from './colormaps';
3
+ export { fakeEdrLayerApiHandlers } from './fakeApi';
@@ -55,6 +55,6 @@ export declare const useGetWMLayerInstance: (serviceUrl: string, name: string, i
55
55
  /**
56
56
  * Used for querying WMTS GetCapabilities documents
57
57
  * @param serviceUrl
58
- * @returns
58
+ * @returns {UseQueryResult<string>}
59
59
  */
60
- export declare const useQueryWMTSGetCapabilities: (serviceUrl: string) => UseQueryResult<GetCapabilitiesJson>;
60
+ export declare const useQueryWMTSGetCapabilities: (serviceUrl: string) => UseQueryResult<string>;
@@ -1,4 +1,5 @@
1
1
  export * from './components';
2
2
  export * from './layers';
3
3
  export * from './hooks';
4
+ export * from './edr-layer-api';
4
5
  export { WEBMAP_REACT_NAMESPACE } from './utils/i18n';
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- export interface ProfileAxisProps {
3
- mapId: string;
4
- }
5
- /**
6
- * This component registers to a webmap instance and draws axis for height and time in the map using the Map Canvas.
7
- */
8
- export declare const ProfileAxis: React.FC<ProfileAxisProps>;
@@ -1 +0,0 @@
1
- import 'jest-canvas-mock';
@@ -1,7 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { ProfileAxis } from './ProfileAxis';
3
- declare const meta: Meta<typeof ProfileAxis>;
4
- export default meta;
5
- type Story = StoryObj<typeof ProfileAxis>;
6
- export declare const Component: Story;
7
- export declare const ProfileAxisStory: Story;
@@ -1,17 +0,0 @@
1
- export type GFIResult = [{
2
- data: {
3
- '0': number;
4
- };
5
- }];
6
- export declare const CEILONETSTATIONLAYERNAME = "hasceilometerWMONAME";
7
- export declare const CEILONETPROFILELAYERPREFIX = "ceilonet_";
8
- /**
9
- * Connects a Map with a WMS layer with ceilometer stations to a Map withj profile layers.
10
- * Clicking on the station map causes the layer in the profile map to be changed accordingly.
11
- * The layername comes from a GetFeatureInfo request on the stations layer.
12
- *
13
- * @param mapIdWithProfileViewer
14
- * @param mapIdWithCeilometerStations
15
- * @returns
16
- */
17
- export declare const connectProfileMapViewToProfileStationsMapById: (mapIdWithProfileViewer: string, mapIdWithCeilometerStations: string) => void;
@@ -1,159 +0,0 @@
1
- import * as React from 'react';
2
- import { FeatureCollection, GeoJsonProperties, GeometryObject, Position } from 'geojson';
3
- import { GeoFeatureStyle, Coordinate } from './geojsonShapes';
4
- interface DrawStyle {
5
- x: number;
6
- y: number;
7
- nr: number;
8
- }
9
- interface InputEvent {
10
- leftButton: boolean;
11
- mouseDown: boolean;
12
- mouseX: number;
13
- mouseY: number;
14
- rightButton: boolean;
15
- }
16
- export interface FeatureEvent {
17
- coordinateIndexInFeature: number;
18
- featureIndex: number;
19
- screenCoords: {
20
- x: number;
21
- y: number;
22
- };
23
- mouseX: number;
24
- mouseY: number;
25
- isInEditMode: boolean;
26
- feature: GeoJSON.Feature;
27
- }
28
- export interface MapDrawProps {
29
- mapId: string;
30
- geojson: GeoJSON.FeatureCollection;
31
- linkedFeatures?: GeoJSON.FeatureCollection;
32
- drawMode: string;
33
- deletePolygonCallback?: string;
34
- exitDrawModeCallback: (reason: DrawModeExitCallback, newGeoJSON?: GeoJSON.FeatureCollection) => void;
35
- isInEditMode: boolean;
36
- isInDeleteMode: boolean;
37
- selectedFeatureIndex: number;
38
- onHoverFeature?: (event: FeatureEvent) => void;
39
- onClickFeature?: (event: FeatureEvent) => void;
40
- updateGeojson: (geoJson: GeometryObject, text: string) => void;
41
- }
42
- export declare enum EDITMODE {
43
- EMPTY = "EMPTY",
44
- DELETE_FEATURES = "DELETE_FEATURES",
45
- ADD_FEATURE = "ADD_FEATURE"
46
- }
47
- export declare enum DRAWMODE {
48
- POLYGON = "POLYGON",
49
- BOX = "BOX",
50
- MULTIPOINT = "MULTIPOINT",
51
- POINT = "POINT",
52
- LINESTRING = "LINESTRING"
53
- }
54
- declare enum VERTEX {
55
- NONE = "NONE",
56
- MIDDLE_POINT_OF_FEATURE = "MIDDLE_POINT_OF_FEATURE"
57
- }
58
- declare enum EDGE {
59
- NONE = "NONE"
60
- }
61
- declare enum SNAPPEDFEATURE {
62
- NONE = "NONE"
63
- }
64
- export type DrawModeExitCallback = 'escaped' | 'doubleClicked';
65
- export default class MapDraw extends React.PureComponent<MapDrawProps> {
66
- myEditMode: EDITMODE;
67
- myDrawMode: DRAWMODE;
68
- textPositions: {
69
- x: number;
70
- y: number;
71
- text: string;
72
- }[];
73
- mouseOverPolygonCoordinates: Coordinate[] | number;
74
- defaultPolyProps: GeoFeatureStyle;
75
- defaultLineStringProps: GeoFeatureStyle;
76
- defaultIconProps: {
77
- imageWidth: number;
78
- imageHeight: number;
79
- };
80
- somethingWasDragged: string;
81
- mouseIsOverVertexNr: SNAPPEDFEATURE | VERTEX | number;
82
- selectedEdge: EDGE;
83
- geojson: FeatureCollection;
84
- listenersInitialized: boolean;
85
- mouseGeoCoord: Coordinate;
86
- snappedGeoCoords: Coordinate;
87
- doubleClickTimer: {
88
- isRunning?: boolean;
89
- timer?: number;
90
- mouseX?: number;
91
- mouseY?: number;
92
- };
93
- mouseStoppedTimer: number;
94
- snappedPolygonIndex: SNAPPEDFEATURE | number;
95
- mouseX: number;
96
- mouseY: number;
97
- mouseOverPolygonFeatureIndex: number;
98
- drawMode: string;
99
- disabled: boolean;
100
- static defaultProps: {
101
- isInEditMode: boolean;
102
- isInDeleteMode: boolean;
103
- webmapjs: undefined;
104
- selectedFeatureIndex: number;
105
- };
106
- featureEvent: FeatureEvent;
107
- constructor(props: MapDrawProps);
108
- componentDidMount(): void;
109
- componentDidUpdate(prevProps: MapDrawProps): void;
110
- componentWillUnmount(): void;
111
- handleKeyDown(event: KeyboardEvent): void;
112
- handleNewFeatureIndex(): void;
113
- handleDrawMode(_drawMode: string): void;
114
- handleGeoJSONUpdate: (newGeoJSON: GeoJSON.FeatureCollection) => void;
115
- handleExitDrawMode: (reason?: DrawModeExitCallback) => void;
116
- getSelectedFeature: () => GeoJSON.Feature;
117
- hoverVertex(feature: GeoJSON.Feature, mouseX: number, mouseY: number): void;
118
- mouseMove(event: InputEvent): boolean;
119
- triggerMouseDownTimer(event: InputEvent): void | boolean;
120
- mouseDoubleClick(): void;
121
- insertVertexInEdge(event: InputEvent): boolean;
122
- /**
123
- * This creates a new feature in the geojson features array at the selectedFeatureIndex location
124
- * @param event
125
- * @returns if a new feature is made
126
- */
127
- createNewFeature(event: InputEvent): boolean;
128
- addPointToMultiPointFeature(event: InputEvent): boolean;
129
- addVerticesToPolygonFeature(event: InputEvent): boolean;
130
- addPointToLineStringFeature(event: InputEvent): boolean;
131
- mouseDown(event: InputEvent): void | boolean;
132
- deletePolygon(index: number | SNAPPEDFEATURE): void;
133
- deleteFeature(): void;
134
- mouseUp(event: InputEvent): void | boolean;
135
- cancelEdit(cancelLastPoint: boolean): void;
136
- moveVertex(feature: GeoJSON.Feature, mouseDown: boolean): boolean;
137
- transposePolygon(featureCoords: Position[]): void;
138
- transposeVertex(featureCoords: Position[]): void;
139
- componentCleanup(): void;
140
- initializeFeature(feature: GeoJSON.Feature): void;
141
- validatePolys(fixPolys: boolean): void;
142
- beforeDraw(ctx: CanvasRenderingContext2D): void;
143
- checkDist(coord: Coordinate, polygonIndex: SNAPPEDFEATURE | number, mouseX: number, mouseY: number): boolean;
144
- hoverEdge(geometry: GeoJSON.Geometry, mouseX: number, mouseY: number): {
145
- selectedEdge: EDGE | number;
146
- snappedPolygonIndex: SNAPPEDFEATURE | number;
147
- };
148
- drawVertice(ctx: CanvasRenderingContext2D, _coord: Coordinate, selected: boolean, middle: boolean, isInEditMode: boolean): void;
149
- drawPoint(ctx: CanvasRenderingContext2D, _coord: Coordinate, selected: boolean, middle: boolean, isInEditMode: boolean, feature: GeoJSON.Feature, featureIndex: number): void;
150
- drawIcon(ctx: CanvasRenderingContext2D, _coord: Coordinate, featureProperties: GeoJsonProperties): DrawStyle;
151
- drawMarker(ctx: CanvasRenderingContext2D, _coord: Coordinate, selected: boolean, middle: boolean, isInEditMode: boolean, featureProperties: GeoFeatureStyle): void | DrawStyle;
152
- drawLine(ctx: CanvasRenderingContext2D, XYCoords: Coordinate[], featureIndex: number, lineStringIndex: number): void | DrawStyle;
153
- drawPolygon(ctx: CanvasRenderingContext2D, XYCoords: Coordinate[], featureIndex: number, polygonIndex: number): void | DrawStyle;
154
- initializeFeatureCoordinates(feature: GeoJSON.Feature, type: string): GeoJSON.Feature;
155
- checkIfFeatureIsBox(feature: GeoJSON.Feature): boolean;
156
- featureHasChanged(text: string): void;
157
- render(): React.ReactElement;
158
- }
159
- export {};