@opengeoweb/webmap-react 10.2.0 → 10.2.1-spike-ol.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/README.md +4 -0
- package/index.esm.js +10743 -8202
- package/package.json +3 -2
- 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 +9 -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 +24 -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.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/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 +9 -0
- package/src/lib/components/OpenLayers/layers/DefaultBaseLayers.d.ts +10 -0
- package/src/lib/components/OpenLayers/layers/FeatureLayer.d.ts +11 -0
- package/src/lib/components/OpenLayers/layers/GeoJSONLayer.d.ts +11 -0
- package/src/lib/components/OpenLayers/layers/MapViewLayerToOpenLayer.d.ts +22 -0
- package/src/lib/components/OpenLayers/layers/TiledWMSLayer.d.ts +12 -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 +9 -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 +21 -0
- package/src/lib/components/OpenLayers/tools/ClickOnMapTool.d.ts +10 -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/utils/ShowTimeAwareLayerInfo.d.ts +12 -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 +16 -0
- package/src/lib/components/OpenLayers/utils/makeDimValuesToPrefetch.spec.d.ts +1 -0
- package/src/lib/components/OpenLayers/utils/projections.d.ts +1 -0
- package/src/lib/components/OpenLayers/utils/setMapCenter.d.ts +2 -0
- package/src/lib/components/OpenLayers/utils/types.d.ts +11 -0
- package/src/lib/components/ReactMapView/types.d.ts +1 -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/{MapView/MapView.SetProjectionBBoxLocalState.stories.d.ts → WebMapMapView/WebMapMapView.SetProjectionBBoxLocalState.stories.d.ts} +3 -3
- package/src/lib/components/WebMapMapView/WebMapMapView.ShiftToZoom.stories.d.ts +6 -0
- package/src/lib/components/{MapView/MapView.ShowLayerInfo.stories.d.ts → WebMapMapView/WebMapMapView.ShowLayerInfo.stories.d.ts} +3 -3
- package/src/lib/components/WebMapMapView/WebMapMapView.TiledBaseLayers.stories.d.ts +17 -0
- package/src/lib/components/WebMapMapView/WebMapMapView.d.ts +9 -0
- package/src/lib/components/WebMapMapView/WebMapMapView.spec.d.ts +1 -0
- package/src/lib/components/WebMapMapView/WebMapMapViewLayer.d.ts +16 -0
- package/src/lib/components/WebMapMapView/index.d.ts +2 -0
- package/src/lib/components/index.d.ts +1 -0
- package/src/lib/hooks/index.d.ts +2 -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/useViewFromLayerById.d.ts +7 -0
- package/src/lib/index.d.ts +1 -1
- package/src/lib/layers/publicLayers.d.ts +1 -0
- 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.ShiftToZoom.stories.d.ts +0 -6
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Extent } from 'ol/extent';
|
|
2
|
+
import ImageWrapper from 'ol/Image';
|
|
3
|
+
import { Projection } from 'ol/proj';
|
|
4
|
+
import { WMImageStore } from '@opengeoweb/webmap';
|
|
5
|
+
export declare const openLayersGetMapImageStore: WMImageStore;
|
|
6
|
+
interface TimeAwareGeoreferencedImageSrc {
|
|
7
|
+
src: string;
|
|
8
|
+
extent: Extent;
|
|
9
|
+
resolution: number;
|
|
10
|
+
}
|
|
11
|
+
interface TimeAwareGeoreferencedImage {
|
|
12
|
+
el: HTMLImageElement;
|
|
13
|
+
extent: Extent;
|
|
14
|
+
resolution: number;
|
|
15
|
+
isLoaded: boolean;
|
|
16
|
+
hasError: boolean;
|
|
17
|
+
isLoadedWithoutErrors: boolean;
|
|
18
|
+
isLoading: boolean;
|
|
19
|
+
}
|
|
20
|
+
declare class TimeAwareImageWrapper extends ImageWrapper {
|
|
21
|
+
private _extentToLoad;
|
|
22
|
+
private _resolutionToLoad;
|
|
23
|
+
private _pixelRatioToLoad;
|
|
24
|
+
private _paramsToLoad;
|
|
25
|
+
private _dimPropsToLoad;
|
|
26
|
+
private _getMapUrl;
|
|
27
|
+
private projection;
|
|
28
|
+
private _resolvers;
|
|
29
|
+
private _styleName;
|
|
30
|
+
private _layerName;
|
|
31
|
+
constructor(extent: Extent, resolution: number, pixelRatio: number);
|
|
32
|
+
getWMSGetMapRequestURL(extentToLoad: Extent, resolutionToLoad: number, __pixelRatio: number, projection: Projection | null, getMapUrl: string | null, params: Record<string, string>, layerName: string | null, styleName: string, dimProps: Record<string, string>): TimeAwareGeoreferencedImageSrc;
|
|
33
|
+
getAlternativeImage(extent: Extent, resolution: number, pixelRatio: number, projection: Projection, getMapUrl: string, params: Record<string, string>, layerName: string, styleName: string, dimsProps: Record<string, string>): TimeAwareGeoreferencedImage | false;
|
|
34
|
+
hasImage(extent: Extent, resolution: number, pixelRatio: number, projection: Projection, getMapUrl: string, params: Record<string, string>, layerName: string, styleName: string, dimsProps: Record<string, string>): TimeAwareGeoreferencedImage | false;
|
|
35
|
+
setGeoReferencedImage(image: TimeAwareGeoreferencedImage): void;
|
|
36
|
+
load(): void;
|
|
37
|
+
setState(state: number): void;
|
|
38
|
+
private _rejectAll;
|
|
39
|
+
private _resolveAll;
|
|
40
|
+
loadAndResolve(extentToLoad: Extent, resolutionToLoad: number, pixelRatio: number, projection: Projection, getMapUrl: string, params: Record<string, string>, layerName: string, styleName: string, dimProps: Record<string, string>): Promise<void>;
|
|
41
|
+
}
|
|
42
|
+
export default TimeAwareImageWrapper;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Extent } from 'ol/extent';
|
|
2
|
+
import ImageWrapper from 'ol/Image';
|
|
3
|
+
import { Projection } from 'ol/proj';
|
|
4
|
+
import ImageSource from 'ol/source/Image';
|
|
5
|
+
import TimeAwareImageWrapper from './TimeAwareImageWrapper';
|
|
6
|
+
export declare const initImageWrapper: () => TimeAwareImageWrapper;
|
|
7
|
+
interface TimeawareImageSourceOptions {
|
|
8
|
+
wmsUrl: string;
|
|
9
|
+
params?: Record<string, string>;
|
|
10
|
+
layerName: string;
|
|
11
|
+
dimProps?: Record<string, string>;
|
|
12
|
+
styleName?: string | undefined;
|
|
13
|
+
timeStampsToPrefetch?: string[];
|
|
14
|
+
visible?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare class TimeawareImageSource extends ImageSource {
|
|
17
|
+
private _wmsUrl;
|
|
18
|
+
private _extraWMSParams;
|
|
19
|
+
private _timeStampsToPrefetch;
|
|
20
|
+
private _prefetchWorkers;
|
|
21
|
+
private _wantedExtent;
|
|
22
|
+
private _wantedResolution;
|
|
23
|
+
private _previousPrefetchExtent;
|
|
24
|
+
private _dimProperties;
|
|
25
|
+
private _imWrapperEmptyButLoading;
|
|
26
|
+
private _imWrapperForOlSource;
|
|
27
|
+
private _imWrapperForAltImage;
|
|
28
|
+
private _styleName;
|
|
29
|
+
private _layerName;
|
|
30
|
+
private debouncedPrefetch;
|
|
31
|
+
private _wantedPixelRatio;
|
|
32
|
+
private _wantedProjection;
|
|
33
|
+
private _imWrapperForPrefetch;
|
|
34
|
+
constructor({ wmsUrl, timeStampsToPrefetch, layerName, styleName, dimProps, params, visible, }: TimeawareImageSourceOptions);
|
|
35
|
+
private prefetch;
|
|
36
|
+
triggerPrefetch(extent: Extent, resolution: number, pixelRatio: number, projection: Projection): void;
|
|
37
|
+
getImage(extent: Extent, resolution: number, pixelRatio: number, projection: Projection): ImageWrapper;
|
|
38
|
+
setDimProps(params: Record<string, string>): void;
|
|
39
|
+
/**
|
|
40
|
+
* Check if an image is available and loaded for requested date.
|
|
41
|
+
* @param timeStampsToPrefetch
|
|
42
|
+
* @returns
|
|
43
|
+
*/
|
|
44
|
+
hasImageForTimeValue(timeStampsToPrefetch: string): boolean;
|
|
45
|
+
loadImageForTimeValue(timeStampsToPrefetch: string): void;
|
|
46
|
+
setStyle(styleName: string): void;
|
|
47
|
+
setLayerName(layerName: string): void;
|
|
48
|
+
setTimeValuesValuesToPrefetch(timeStampsToPrefetch: string[]): void;
|
|
49
|
+
}
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { WorkerQueueJob } from '../types/WorkerQueue';
|
|
2
|
+
export declare class WorkerQueue {
|
|
3
|
+
maxConcurrency: number;
|
|
4
|
+
tasksInProcess: WorkerQueueJob[];
|
|
5
|
+
taskQueue: WorkerQueueJob[];
|
|
6
|
+
private disposed;
|
|
7
|
+
constructor(concurrency: number);
|
|
8
|
+
dispose(): void;
|
|
9
|
+
ensureWork(): void;
|
|
10
|
+
clearJobs(): void;
|
|
11
|
+
addJobs(work: WorkerQueueJob[]): void;
|
|
12
|
+
addJobsWithoutReorder(work: WorkerQueueJob[]): void;
|
|
13
|
+
private _startJob;
|
|
14
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const MAX_NUMBER_TO_PREFETCH = 200;
|
|
2
|
+
export declare const MAX_NUMBER_STEPS_IN_TIMESLIDER_TO_PREFETCH = 10000;
|
|
3
|
+
export declare const NUMBER_PREFETCH_WORKERS = 4;
|
|
4
|
+
export declare const NUM_IMAGES_TO_CACHE = 10000;
|
|
5
|
+
export declare const WMS_EXTENT_RATIO_TO_VIEWPORT = 1.2;
|
|
6
|
+
export declare const TIMEAWAREIMAGEWRAPPER_IMAGEDIDNOTLOADSUCCESFULLY = "Image did not load succesfully";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { WMJSDimension, Dimension, WMLayer } from '@opengeoweb/webmap';
|
|
2
|
+
import { Timespan } from '../types/Timespan';
|
|
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>;
|
|
5
|
+
/**
|
|
6
|
+
* Calculates number of timesteps for given timespan
|
|
7
|
+
* @param timespan Object of Timespan, with start/stop/end in milliseconds
|
|
8
|
+
* @returns Timestams array in milliseconds
|
|
9
|
+
*/
|
|
10
|
+
export declare const getTimeStepsToCheck: (timespan: Timespan) => number[];
|
|
11
|
+
/**
|
|
12
|
+
* React Hook for calculating the number of timesteps for given timespan
|
|
13
|
+
* @param timespan Object of Timespan, with start/stop/end in milliseconds
|
|
14
|
+
* @returns Timestams array in milliseconds
|
|
15
|
+
*/
|
|
16
|
+
export declare const useGetTimeStepsToCheck: (timespan: Timespan) => number[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const initializeOpenlayersProjections: () => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Feature } from 'ol';
|
|
2
|
+
import { Dimension } from '@opengeoweb/webmap';
|
|
3
|
+
export interface HoverSelect {
|
|
4
|
+
active: boolean;
|
|
5
|
+
onHover?: (f: Feature | undefined) => void;
|
|
6
|
+
}
|
|
7
|
+
export interface OnInitializeLayerProps {
|
|
8
|
+
layerId: string;
|
|
9
|
+
style: string;
|
|
10
|
+
dimensions: Dimension[];
|
|
11
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import {
|
|
3
|
-
declare const meta: Meta<typeof
|
|
2
|
+
import { WebMapMapView } from '.';
|
|
3
|
+
declare const meta: Meta<typeof WebMapMapView>;
|
|
4
4
|
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof
|
|
5
|
+
type Story = StoryObj<typeof WebMapMapView>;
|
|
6
6
|
export declare const Component: Story;
|
|
7
7
|
export declare const MapError: Story;
|
|
8
8
|
export declare const MapWithDuplicateLayerIdsError: Story;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { WebMapMapView } from './WebMapMapView';
|
|
3
|
+
declare const meta: Meta<typeof WebMapMapView>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof WebMapMapView>;
|
|
6
|
+
export declare const MapViewProfile: Story;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { WebMapMapView } from './WebMapMapView';
|
|
3
|
+
declare const meta: Meta<typeof WebMapMapView>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof WebMapMapView>;
|
|
6
|
+
export declare const MapViewRadar: Story;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import {
|
|
3
|
-
declare const meta: Meta<typeof
|
|
2
|
+
import { WebMapMapView } from '.';
|
|
3
|
+
declare const meta: Meta<typeof WebMapMapView>;
|
|
4
4
|
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof
|
|
5
|
+
type Story = StoryObj<typeof WebMapMapView>;
|
|
6
6
|
export declare const SetProjectionBBoxLocalState: Story;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import {
|
|
3
|
-
declare const meta: Meta<typeof
|
|
2
|
+
import { WebMapMapView } from '.';
|
|
3
|
+
declare const meta: Meta<typeof WebMapMapView>;
|
|
4
4
|
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof
|
|
5
|
+
type Story = StoryObj<typeof WebMapMapView>;
|
|
6
6
|
export declare const MapWithShowLayerInfoEnabled: Story;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { WebMapMapView } from './WebMapMapView';
|
|
3
|
+
declare const meta: Meta<typeof WebMapMapView>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof WebMapMapView>;
|
|
6
|
+
export interface MapDropDownItem {
|
|
7
|
+
name: string;
|
|
8
|
+
title: string;
|
|
9
|
+
}
|
|
10
|
+
export interface MapDropDownProps {
|
|
11
|
+
value: string;
|
|
12
|
+
change: (updatedValue: string) => void;
|
|
13
|
+
options: MapDropDownItem[];
|
|
14
|
+
top?: number;
|
|
15
|
+
left?: number;
|
|
16
|
+
}
|
|
17
|
+
export declare const MapViewTiledBaseLayers: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReactMapViewProps } from '../ReactMapView';
|
|
3
|
+
export interface MapViewProps extends ReactMapViewProps {
|
|
4
|
+
controls?: {
|
|
5
|
+
zoomControls?: boolean;
|
|
6
|
+
};
|
|
7
|
+
isTimeScrollingEnabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const WebMapMapView: React.FC<MapViewProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { LayerFoundation, IWMJSMap, WMLayer } from '@opengeoweb/webmap';
|
|
3
|
+
import { DrawModeExitCallback, FeatureEvent } from '../MapDraw';
|
|
4
|
+
export interface MapViewLayerProps extends LayerFoundation {
|
|
5
|
+
id: string;
|
|
6
|
+
onLayerReady?: (layer: WMLayer, webmap?: IWMJSMap) => void;
|
|
7
|
+
onLayerError?: (layer: WMLayer, error?: Error) => void;
|
|
8
|
+
isInEditMode?: boolean;
|
|
9
|
+
drawMode?: string;
|
|
10
|
+
updateGeojson?: (geoJson: GeoJSON.FeatureCollection, reason: string) => void;
|
|
11
|
+
exitDrawModeCallback?: (reason: DrawModeExitCallback, newGeoJSON?: GeoJSON.FeatureCollection) => void;
|
|
12
|
+
selectedFeatureIndex?: number;
|
|
13
|
+
onClickFeature?: (event?: FeatureEvent) => void;
|
|
14
|
+
onHoverFeature?: (event: FeatureEvent) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const WebMapMapViewLayer: React.FC<MapViewLayerProps>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Dimension } from '@opengeoweb/webmap';
|
|
2
|
+
import { MapViewLayerToOpenLayerProps } from '../components/OpenLayers/layers';
|
|
3
|
+
export declare const useAnimationForLayer: (layerProps: MapViewLayerToOpenLayerProps, intervalInMs: number, numStepsTillLatest?: number, checkForUpdatesMs?: number) => Dimension[];
|
|
@@ -51,7 +51,7 @@ export declare const useGetWMSLayerStyleList: (serviceUrl: string, name: string)
|
|
|
51
51
|
* @param {string} name
|
|
52
52
|
* @returns {(WMLayer | null)}
|
|
53
53
|
*/
|
|
54
|
-
export declare const useGetWMLayerInstance: (serviceUrl: string, name: string, id?: string) => WMLayer | null;
|
|
54
|
+
export declare const useGetWMLayerInstance: (serviceUrl: string, name: string, id?: string, onLayerError?: (layerId: string, message: string) => void) => WMLayer | null;
|
|
55
55
|
/**
|
|
56
56
|
* Used for querying WMTS GetCapabilities documents
|
|
57
57
|
* @param serviceUrl
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useSetIntervalWhenVisible: (autoUpdate: () => void, refetchInterval: number, shouldAutoFetch?: boolean) => void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { View } from 'ol';
|
|
2
|
+
import { MapViewLayerToOpenLayerProps } from '../components/OpenLayers/layers';
|
|
3
|
+
export declare const useViewFromLayer: (layerProps: MapViewLayerToOpenLayerProps, baseView?: {
|
|
4
|
+
projection: string;
|
|
5
|
+
zoom: number;
|
|
6
|
+
center: number[];
|
|
7
|
+
}) => View;
|
package/src/lib/index.d.ts
CHANGED