@opengeoweb/webmap-react 12.10.0 → 12.11.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 (51) hide show
  1. package/index.esm.js +3379 -858
  2. package/package.json +7 -4
  3. package/src/lib/components/LayerInfo/LayerInfoDialog.stories.d.ts +1 -1
  4. package/src/lib/components/Legend/Legend.stories.d.ts +1 -1
  5. package/src/lib/components/MapDimensionSelect/DimensionSelectDialog.stories.d.ts +1 -1
  6. package/src/lib/components/MapDimensionSelect/MapDimensionSelect.stories.d.ts +1 -1
  7. package/src/lib/components/MapDraw/storyComponents/storyUtils.d.ts +0 -1
  8. package/src/lib/components/MapDrawTool/MapDrawTool.stories.d.ts +1 -1
  9. package/src/lib/components/MapDrawTool/MapDrawToolMultipleDrawTools.stories.d.ts +1 -1
  10. package/src/lib/components/MapDrawTool/storyExamplesMapDrawToolMultipleDrawTools.d.ts +1 -1
  11. package/src/lib/components/MapDrawTool/utils.d.ts +2 -2
  12. package/src/lib/components/OpenLayers/OpenLayers.BaseLayer.stories.d.ts +1 -1
  13. package/src/lib/components/OpenLayers/OpenLayersMapView.Error.stories.d.ts +1 -1
  14. package/src/lib/components/OpenLayers/OpenLayersMapView.MapPin.stories.d.ts +1 -1
  15. package/src/lib/components/OpenLayers/OpenLayersMapView.Passive.stories.d.ts +1 -1
  16. package/src/lib/components/OpenLayers/OpenLayersMapView.RadarAnimation.stories.d.ts +1 -1
  17. package/src/lib/components/OpenLayers/OpenLayersMapView.RadarData.stories.d.ts +1 -1
  18. package/src/lib/components/OpenLayers/OpenLayersMapView.SetProjectionBBox.stories.d.ts +1 -1
  19. package/src/lib/components/OpenLayers/OpenLayersMapView.SetProjectionBBoxLocalState.stories.d.ts +1 -1
  20. package/src/lib/components/OpenLayers/OpenLayersMapView.ShiftToZoom.stories.d.ts +1 -1
  21. package/src/lib/components/OpenLayers/OpenLayersMapView.ShowLayerInfo.stories.d.ts +1 -1
  22. package/src/lib/components/OpenLayers/OpenLayersMapView.TiledBaseLayers.stories.d.ts +1 -1
  23. package/src/lib/components/OpenLayers/OpenLayersMapView.VFXData.stories.d.ts +1 -1
  24. package/src/lib/components/OpenLayers/context/MapContext.d.ts +0 -1
  25. package/src/lib/components/OpenLayers/context/TimeContext.d.ts +0 -1
  26. package/src/lib/components/OpenLayers/controls/OpenLayersGetFeatureInfo.d.ts +0 -1
  27. package/src/lib/components/OpenLayers/controls/OpenLayersZoomControl.d.ts +0 -1
  28. package/src/lib/components/OpenLayers/draw/OpenLayersMapDraw.stories.d.ts +1 -1
  29. package/src/lib/components/OpenLayers/layers/FeatureLayer.d.ts +0 -1
  30. package/src/lib/components/OpenLayers/layers/OpenLayersFeatureLayer.d.ts +1 -2
  31. package/src/lib/components/OpenLayers/layers/TiledWMSLayer.d.ts +0 -1
  32. package/src/lib/components/OpenLayers/layers/TimeAwareEDRLocationLayer.d.ts +6 -3
  33. package/src/lib/components/OpenLayers/layers/TimeawareImageSourceWMSLayer.d.ts +0 -1
  34. package/src/lib/components/OpenLayers/layers/WMSLayer.d.ts +0 -1
  35. package/src/lib/components/OpenLayers/layers/WMTSLayer.d.ts +0 -1
  36. package/src/lib/components/OpenLayers/layers/XYZLayer.d.ts +0 -1
  37. package/src/lib/components/OpenLayers/tools/ClickOnMapTool.d.ts +0 -1
  38. package/src/lib/components/OpenLayers/utils/ShowTimeAwareLayerInfo.d.ts +0 -1
  39. package/src/lib/components/OpenLayers/utils/constants.d.ts +2 -0
  40. package/src/lib/components/OpenLayers/utils/makeDimValuesToPrefetch.d.ts +9 -1
  41. package/src/lib/components/TanStackDemo/EDRLayerApi.stories.d.ts +2 -2
  42. package/src/lib/edr-layer-api/api.d.ts +4 -0
  43. package/src/lib/edr-layer-api/colormaps/colormaps.d.ts +6 -3
  44. package/src/lib/edr-layer-api/colormaps/edrOlLegendUtils.d.ts +2 -1
  45. package/src/lib/edr-layer-api/hooks.d.ts +6 -5
  46. package/src/lib/edr-layer-api/hooks.spec.d.ts +1 -0
  47. package/src/lib/edr-layer-api/index.d.ts +1 -0
  48. package/src/lib/edr-layer-api/utils/useGetEDRLayerInstance.d.ts +11 -0
  49. package/src/lib/edr-layer-api/utils/useGetEDRLayerInstance.spec.d.ts +1 -0
  50. package/src/lib/hooks/useHooksGetCapabilities.d.ts +1 -1
  51. package/src/lib/utils/i18n.d.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/webmap-react",
3
- "version": "12.10.0",
3
+ "version": "12.11.0",
4
4
  "description": "GeoWeb react wrapper for webmap",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -8,9 +8,9 @@
8
8
  "url": "git@gitlab.com:opengeoweb/opengeoweb.git"
9
9
  },
10
10
  "dependencies": {
11
- "@opengeoweb/webmap": "12.10.0",
12
- "@opengeoweb/theme": "12.10.0",
13
- "@opengeoweb/shared": "12.10.0",
11
+ "@opengeoweb/webmap": "12.11.0",
12
+ "@opengeoweb/theme": "12.11.0",
13
+ "@opengeoweb/shared": "12.11.0",
14
14
  "lodash": "^4.17.21",
15
15
  "ol": "^10.4.0",
16
16
  "proj4": "^2.9.2",
@@ -27,6 +27,9 @@
27
27
  "@emotion/react": "*",
28
28
  "@emotion/styled": "*"
29
29
  },
30
+ "devDependencies": {
31
+ "eslint-plugin-storybook": "9.0.17"
32
+ },
30
33
  "module": "./index.esm.js",
31
34
  "type": "module",
32
35
  "main": "./index.esm.js",
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { LayerInfoDialog } from './LayerInfoDialog';
3
3
  declare const meta: Meta<typeof LayerInfoDialog>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { Legend } from './Legend';
3
3
  declare const meta: Meta<typeof Legend>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import MapDimensionSelect from './MapDimensionSelect';
3
3
  declare const meta: Meta<typeof MapDimensionSelect>;
4
4
  export default meta;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import type { StoryObj } from '@storybook/react';
2
+ import type { StoryObj } from '@storybook/react-webpack5';
3
3
  import MapDimensionSelect from './MapDimensionSelect';
4
4
  declare const _default: {
5
5
  title: string;
@@ -1,4 +1,3 @@
1
- import { FeatureCollection } from 'geojson';
2
1
  export declare const drawPolyStoryStyles: {
3
2
  MapDrawGeoJSONContainer: {
4
3
  display: string;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { useMapDrawTool } from './useMapDrawTool';
3
3
  declare const meta: Meta<typeof useMapDrawTool>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { useMapDrawTool } from './useMapDrawTool';
3
3
  declare const meta: Meta<typeof useMapDrawTool>;
4
4
  export default meta;
@@ -4,7 +4,7 @@ import { MapDrawToolOptions } from './useMapDrawTool';
4
4
  export declare const firSelectionType = "fir";
5
5
  export declare const exampleIntersectionsMultiDrawTool: {
6
6
  title: string;
7
- geojson: import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>;
7
+ geojson: GeoJSON.FeatureCollection;
8
8
  }[];
9
9
  export declare const getDoubleControlToolIcon: (drawMode: DrawMode) => React.ReactElement;
10
10
  export declare const getFirTitle: (isNL: boolean) => string;
@@ -1,4 +1,4 @@
1
- import { Feature, FeatureCollection, GeoJsonProperties, Point } from 'geojson';
1
+ import { FeatureCollection, GeoJsonProperties, Point } from 'geojson';
2
2
  import { Bbox } from '@opengeoweb/webmap';
3
3
  import { DrawMode, SelectionType } from './types';
4
4
  /**
@@ -55,7 +55,7 @@ export declare const intersectPolygonGeoJSONS: (intersectA: GeoJSON.FeatureColle
55
55
  fill: string;
56
56
  'fill-opacity': number;
57
57
  }) => GeoJSON.FeatureCollection;
58
- export declare const isPointFeatureCollection: (geojson: GeoJSON.FeatureCollection) => geojson is FeatureCollection<Point, GeoJsonProperties>;
58
+ export declare const isPointFeatureCollection: (geojson: GeoJSON.FeatureCollection) => geojson is GeoJSON.FeatureCollection<Point>;
59
59
  /**
60
60
  * Adds the intersectionStart and intersectionEnd properties to the GeoJSONS structure
61
61
  * @param geoJSONs
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { OpenLayersMapView } from '.';
3
3
  declare const meta: Meta<typeof OpenLayersMapView>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { OpenLayersMapView } from '.';
3
3
  declare const meta: Meta<typeof OpenLayersMapView>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { OpenLayersMapView } from '.';
3
3
  declare const meta: Meta<typeof OpenLayersMapView>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { OpenLayersMapView } from '.';
3
3
  declare const meta: Meta<typeof OpenLayersMapView>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { OpenLayersMapView } from '.';
3
3
  declare const meta: Meta<typeof OpenLayersMapView>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { OpenLayersMapView } from '.';
3
3
  declare const meta: Meta<typeof OpenLayersMapView>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { OpenLayersMapView } from '.';
3
3
  declare const meta: Meta<typeof OpenLayersMapView>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { OpenLayersMapView } from '.';
3
3
  declare const meta: Meta<typeof OpenLayersMapView>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { OpenLayersMapView } from '.';
3
3
  declare const meta: Meta<typeof OpenLayersMapView>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { OpenLayersMapView } from '.';
3
3
  declare const meta: Meta<typeof OpenLayersMapView>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { OpenLayersMapView } from '.';
3
3
  declare const meta: Meta<typeof OpenLayersMapView>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { OpenLayersMapView } from './component/OpenLayersMapView';
3
3
  declare const meta: Meta<typeof OpenLayersMapView>;
4
4
  export default meta;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Map } from 'ol';
3
2
  export interface MapContextType {
4
3
  map: Map | null;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { TimeContextType } from '../types/Timespan';
3
2
  export type ChangeRelevantTimestepsFn = (layerId: string, dimensionValues: string[]) => void;
4
3
  export type ResetPrefetchFn = (layerId: string) => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { MapLocation } from '../../../types/types';
3
2
  export interface OpenLayersGetFeatureInfoProps {
4
3
  displayMapPin?: boolean;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Extent } from 'ol/extent';
3
2
  interface OpenLayersZoomControlProps {
4
3
  homeExtent?: Extent;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { useMapDrawTool } from '../../MapDrawTool';
3
3
  declare const meta: Meta<typeof useMapDrawTool>;
4
4
  export default meta;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Feature } from 'ol';
3
2
  import { StyleLike } from 'ol/style/Style';
4
3
  import { ClickOnFeature, HoverSelect } from '../utils/types';
@@ -1,10 +1,9 @@
1
- /// <reference types="react" />
2
1
  import { StyleLike } from 'ol/style/Style';
3
2
  import { FeatureCollection } from 'geojson';
4
3
  import { ClickOnFeature, HoverSelect } from '../utils/types';
5
4
  export interface OpenLayersFeatureLayerProps {
6
5
  featureCollection?: FeatureCollection;
7
- style: StyleLike;
6
+ style?: StyleLike;
8
7
  zIndex?: number;
9
8
  hoverSelect?: HoverSelect;
10
9
  clickOnFeature?: ClickOnFeature;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import ImageLayer from 'ol/layer/Image';
3
2
  import { LayerFoundation } from '@opengeoweb/webmap';
4
3
  export interface TiledWMSLayerProps {
@@ -1,11 +1,14 @@
1
1
  import React from 'react';
2
+ import { Dimension } from '@opengeoweb/webmap';
2
3
  import { OpenLayersFeatureLayerProps } from './OpenLayersFeatureLayer';
4
+ import { OnInitializeLayerProps } from '../utils/types';
3
5
  interface TimeAwareEDRLocationLayerProps extends OpenLayersFeatureLayerProps {
4
- currentTime: string | undefined;
5
- timestep: number;
6
+ layerId?: string;
6
7
  edrBaseUrl: string;
7
- collectionId: string;
8
8
  parameter: string;
9
+ dimensions?: Dimension[];
10
+ onInitializeLayer?: (payload: OnInitializeLayerProps) => void;
11
+ opacity?: number;
9
12
  }
10
13
  export declare const TimeAwareEDRLocationLayer: React.FC<TimeAwareEDRLocationLayerProps>;
11
14
  export {};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import ImageLayer from 'ol/layer/Image';
3
2
  import { Dimension } from '@opengeoweb/webmap';
4
3
  import type { OnInitializeLayerProps } from '../utils/types';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import ImageLayer from 'ol/layer/Image';
3
2
  import { LayerFoundation } from '@opengeoweb/webmap';
4
3
  export interface WMSLayerProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import TileLayer from 'ol/layer/Tile';
3
2
  import { LayerFoundation } from '@opengeoweb/webmap';
4
3
  export interface WMTSLayerProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import TileLayer from 'ol/layer/Tile';
3
2
  import { LayerFoundation } from '@opengeoweb/webmap';
4
3
  export interface XYZLayerProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { StyleLike } from 'ol/style/Style';
3
2
  export interface ClickOnMapToolProps {
4
3
  isActive: boolean;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { WMLayer } from '@opengeoweb/webmap';
3
2
  import ImageLayer from 'ol/layer/Image';
4
3
  import { TimeawareImageSource } from './TimeawareImageSource';
@@ -1,6 +1,8 @@
1
1
  export declare const MAX_NUMBER_TO_PREFETCH = 200;
2
2
  export declare const MAX_NUMBER_STEPS_IN_TIMESLIDER_TO_PREFETCH = 10000;
3
3
  export declare const NUMBER_PREFETCH_WORKERS = 4;
4
+ export declare const ENABLE_PREFETCH = true;
5
+ export declare const ADD_SHOW_DIMS_OPTION = false;
4
6
  export declare const NUM_IMAGES_TO_CACHE = 10000;
5
7
  export declare const WMS_EXTENT_RATIO_TO_VIEWPORT = 1.2;
6
8
  export declare const TIMEAWAREIMAGEWRAPPER_IMAGEDIDNOTLOADSUCCESFULLY = "Image did not load succesfully";
@@ -1,7 +1,15 @@
1
1
  import { WMJSDimension, Dimension, WMLayer } from '@opengeoweb/webmap';
2
2
  import { Timespan } from '../types/Timespan';
3
3
  export declare const makeDimValuesToPrefetch: (wmTimeDim: WMJSDimension, stepsToCheck: number[], isAnimating: boolean) => string[];
4
- export declare const getDimensionParamsForWMS: (dimensions: Dimension[] | undefined, wmLayer: WMLayer | null) => Record<string, string>;
4
+ /**
5
+ * We use the WMLayer dimension logic to obtain the dimension value to use in the WMS GetMap request. The input is the dimensions array which is typically the properties set for the layer component.
6
+ * The input time is descretized to the closest value which is available in the WMS layer.
7
+ *
8
+ * @param dimensions Array of dimension key/values to use as input
9
+ * @param wmLayer The layer for which we would like to do the request
10
+ * @returns A map which returns a key/value to use
11
+ */
12
+ export declare const getDimensionParamsForWMS: (dimensions: Dimension[] | undefined, wmLayer: WMLayer | null) => Record<string, string> | undefined;
5
13
  /**
6
14
  * Calculates number of timesteps for given timespan
7
15
  * @param timespan Object of Timespan, with start/stop/end in milliseconds
@@ -7,11 +7,11 @@ export declare const EdrLayerAPICollection: {
7
7
  (): React.ReactElement;
8
8
  storyName: string;
9
9
  };
10
- export declare const EdrLayerAPILocations: {
10
+ export declare const EdrLayerAPICubeOnObs: {
11
11
  (): React.ReactElement;
12
12
  storyName: string;
13
13
  };
14
- export declare const EdrLayerAPICubeOnObs: {
14
+ export declare const EdrLayerAPIGetParameters: {
15
15
  (): React.ReactElement;
16
16
  storyName: string;
17
17
  };
@@ -0,0 +1,4 @@
1
+ import { CoverageCollection, EDRInstance } from '@opengeoweb/shared';
2
+ export declare const joinUrlParams: (params: string[]) => string;
3
+ export declare const fetchEDRLayerCollection: (edrBaseUrlWithCollection: string, instanceId?: string) => Promise<EDRInstance>;
4
+ export declare const fetchEDRLayerCollectionCube: (edrBaseUrlWithCollection: string, parameterName: string, datetime?: string, instanceId?: string, bbox?: string) => Promise<CoverageCollection>;
@@ -1,5 +1,8 @@
1
- import { ColorMap } from './edrOlLegendUtils';
2
- export declare const wowTemperatureLegendColors: ColorMap;
1
+ export type ColorMap = string[];
2
+ export declare const temperatureLegendColorsWoW: ColorMap;
3
+ export declare const precipitationMMLegendColorsWoW: ColorMap;
4
+ export declare const temperatureLegendColorsCWK: ColorMap;
3
5
  export declare const colorMaps: {
4
- wowTemperatureLegendColors: ColorMap;
6
+ temperatureLegendColorsWoW: ColorMap;
7
+ temperatureLegendColorsCWK: ColorMap;
5
8
  };
@@ -1,6 +1,6 @@
1
1
  import { FeatureLike } from 'ol/Feature';
2
2
  import { Circle, Style } from 'ol/style';
3
- export type ColorMap = string[];
3
+ import { ColorMap } from './colormaps';
4
4
  export interface EdrMapLegendEntry {
5
5
  min: number;
6
6
  max: number;
@@ -18,3 +18,4 @@ export declare const makeLegendFromColorMap: (props: {
18
18
  export declare const getLegendClass: (edrColorLegend: EdrOlColorLegend, value: number, clip?: boolean) => EdrMapLegendEntry | undefined;
19
19
  export declare const makeFeatureStyleDisc: (feature: FeatureLike, legend: EdrOlColorLegend) => Style;
20
20
  export declare const makeFeatureStyleLoading: (feature: FeatureLike) => Style;
21
+ export declare const styleNameToStyleLike: ((styleName: string) => ((feature: FeatureLike) => Style)) & import("lodash").MemoizedFunction;
@@ -1,6 +1,7 @@
1
- import { EDRInstance, CoverageCollection } from '@opengeoweb/shared';
1
+ import { EDRInstance, CoverageCollection, EdrParameters } from '@opengeoweb/shared';
2
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>;
3
+ export interface EdrLayerInstance extends EDRInstance {
4
+ parameter_names?: EdrParameters;
5
+ }
6
+ export declare const useEDRLayerCollection: (edrBaseUrlWithCollection: string, instanceId?: string) => UseQueryResult<EdrLayerInstance, Error>;
7
+ export declare const useEDRLayerCollectionCube: (edrBaseUrlWithCollection: string, parameterName: string, datetime?: string, instanceId?: string, bbox?: string) => UseQueryResult<CoverageCollection, Error>;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,3 +1,4 @@
1
1
  export * from './hooks';
2
2
  export * from './colormaps';
3
+ export { useGetEDRLayerInstance } from './utils/useGetEDRLayerInstance';
3
4
  export { fakeEdrLayerApiHandlers } from './fakeApi';
@@ -0,0 +1,11 @@
1
+ import { WMLayer } from '@opengeoweb/webmap';
2
+ import { OnInitializeLayerProps } from '../../components/OpenLayers/utils/types';
3
+ /**
4
+ * Returns WMLayer instance in EDR mode. The layer will contains parsed dimensions and styles and keeps a state for these properties.
5
+ *
6
+ * @param {string} serviceUrl
7
+ * @param {string} name
8
+ * @returns {(WMLayer | null)}
9
+ */
10
+ export declare const useGetEDRWMLayerInstance: (serviceUrl: string, name: string, id?: string, onLayerError?: (layerId: string, message: string) => void) => WMLayer | null;
11
+ export declare const useGetEDRLayerInstance: (edrBaseUrl: string, parameter: string, layerId?: string, onInitializeLayer?: (payload: OnInitializeLayerProps) => void) => WMLayer | null;
@@ -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 {UseQueryResult<string>}
58
+ * @returns
59
59
  */
60
60
  export declare const useQueryWMTSGetCapabilities: (serviceUrl: string) => UseQueryResult<string>;
@@ -3,5 +3,5 @@ import { UseTranslationResponse } from 'react-i18next';
3
3
  export declare const WEBMAP_REACT_NAMESPACE = "webmapreact";
4
4
  export declare const initWebmapReactTestI18n: () => void;
5
5
  export declare const translateKeyOutsideComponents: (key: string, params?: Record<string, string | number> | undefined, ns?: string) => string;
6
- export declare const useWebmapReactTranslation: (ns?: Namespace) => UseTranslationResponse<Namespace, import("i18next").i18n>;
6
+ export declare const useWebmapReactTranslation: (ns?: Namespace) => UseTranslationResponse<typeof ns, typeof i18n>;
7
7
  export { i18n };