@opengeoweb/webmap-react 11.1.0 → 12.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +11028 -8179
- package/package.json +6 -5
- package/src/index.d.ts +10 -0
- package/src/lib/components/HoldShiftToZoomMessage/HoldShiftToZoomMessage.d.ts +2 -0
- package/src/lib/components/HoldShiftToZoomMessage/HoldShiftToZoomMessage.spec.d.ts +1 -0
- package/src/lib/components/MapDrawTool/useMapDrawTool.d.ts +3 -3
- package/src/lib/components/MapDrawTool/utils.d.ts +10 -0
- package/src/lib/components/MapMousePosition/MapMousePosition.d.ts +2 -0
- package/src/lib/components/MapMousePosition/MapMousePosition.spec.d.ts +1 -0
- package/src/lib/components/MapMousePosition/index.d.ts +1 -0
- package/src/lib/components/OpenLayers/OlStyles.d.ts +27 -0
- package/src/lib/components/OpenLayers/OlStyles.spec.d.ts +1 -0
- package/src/lib/components/OpenLayers/OpenLayers.BaseLayer.stories.d.ts +6 -0
- package/src/lib/components/OpenLayers/OpenLayers.ClickFeatureLayer.stories.d.ts +10 -0
- package/src/lib/components/OpenLayers/OpenLayers.ClickOnMapTool.stories.d.ts +10 -0
- package/src/lib/components/OpenLayers/OpenLayers.FeatureLayer.stories.d.ts +10 -0
- package/src/lib/components/OpenLayers/OpenLayers.GetFeatureInfo.stories.d.ts +10 -0
- package/src/lib/components/OpenLayers/OpenLayers.HoverFeatureLayer.stories.d.ts +10 -0
- package/src/lib/components/OpenLayers/OpenLayers.Prefetch.stories.d.ts +10 -0
- package/src/lib/components/OpenLayers/OpenLayersConstants.d.ts +2 -0
- package/src/lib/components/OpenLayers/OpenLayersMapView.Error.stories.d.ts +6 -0
- package/src/lib/components/OpenLayers/OpenLayersMapView.MapPin.stories.d.ts +6 -0
- package/src/lib/components/OpenLayers/OpenLayersMapView.Passive.stories.d.ts +6 -0
- package/src/lib/components/OpenLayers/OpenLayersMapView.RadarAnimation.stories.d.ts +6 -0
- package/src/lib/components/OpenLayers/OpenLayersMapView.RadarData.stories.d.ts +6 -0
- package/src/lib/components/OpenLayers/OpenLayersMapView.SetProjectionBBox.stories.d.ts +6 -0
- package/src/lib/components/OpenLayers/OpenLayersMapView.SetProjectionBBoxLocalState.stories.d.ts +6 -0
- package/src/lib/components/OpenLayers/OpenLayersMapView.ShiftToZoom.stories.d.ts +6 -0
- package/src/lib/components/OpenLayers/OpenLayersMapView.ShowLayerInfo.stories.d.ts +6 -0
- package/src/lib/components/{MapView/MapView.TiledBaseLayers.stories.d.ts → OpenLayers/OpenLayersMapView.TiledBaseLayers.stories.d.ts} +3 -3
- package/src/lib/components/OpenLayers/OpenLayersMapView.VFXData.stories.d.ts +6 -0
- package/src/lib/components/OpenLayers/component/OpenLayersMapView.d.ts +12 -0
- package/src/lib/components/OpenLayers/component/OpenLayersMapView.spec.d.ts +1 -0
- package/src/lib/components/OpenLayers/context/MapContext.d.ts +7 -0
- package/src/lib/components/OpenLayers/context/TimeContext.d.ts +7 -0
- package/src/lib/components/OpenLayers/controls/OpenLayersGetFeatureInfo.d.ts +8 -0
- package/src/lib/components/OpenLayers/controls/OpenLayersZoomControl.d.ts +7 -0
- package/src/lib/components/OpenLayers/controls/OpenLayersZoomControl.spec.d.ts +1 -0
- package/src/lib/components/OpenLayers/controls/index.d.ts +2 -0
- package/src/lib/components/OpenLayers/draw/OpenLayersMapDraw.d.ts +26 -0
- package/src/lib/components/OpenLayers/draw/OpenLayersMapDraw.stories.d.ts +9 -0
- package/src/lib/components/OpenLayers/draw/index.d.ts +1 -0
- package/src/lib/components/OpenLayers/index.d.ts +12 -0
- package/src/lib/components/OpenLayers/layers/DefaultBaseLayers.d.ts +10 -0
- package/src/lib/components/OpenLayers/layers/FeatureLayer.d.ts +13 -0
- package/src/lib/components/OpenLayers/layers/OpenLayersFeatureLayer.d.ts +13 -0
- package/src/lib/components/OpenLayers/layers/OpenLayersLayer.d.ts +19 -0
- package/src/lib/components/OpenLayers/layers/TiledWMSLayer.d.ts +11 -0
- package/src/lib/components/OpenLayers/layers/TimeawareImageSourceWMSLayer.d.ts +19 -0
- package/src/lib/components/OpenLayers/layers/TimeawareImageSourceWMSLayer.spec.d.ts +1 -0
- package/src/lib/components/OpenLayers/layers/WMSLayer.d.ts +11 -0
- package/src/lib/components/OpenLayers/layers/WMTSLayer.d.ts +11 -0
- package/src/lib/components/OpenLayers/layers/XYZLayer.d.ts +10 -0
- package/src/lib/components/OpenLayers/layers/index.d.ts +8 -0
- package/src/lib/components/OpenLayers/storyComponents/OlStoryLayout.d.ts +10 -0
- package/src/lib/components/OpenLayers/storyComponents/index.d.ts +1 -0
- package/src/lib/components/OpenLayers/styles/useIconStyle.d.ts +25 -0
- package/src/lib/components/OpenLayers/tools/ClickOnMapTool.d.ts +10 -0
- package/src/lib/components/OpenLayers/tools/index.d.ts +1 -0
- package/src/lib/components/OpenLayers/types/Timespan.d.ts +9 -0
- package/src/lib/components/OpenLayers/types/WorkerQueue.d.ts +6 -0
- package/src/lib/components/OpenLayers/useProjectionDropDown.d.ts +17 -0
- package/src/lib/components/OpenLayers/utils/ShowTimeAwareLayerInfo.d.ts +11 -0
- package/src/lib/components/OpenLayers/utils/TimeAwareImageWrapper.d.ts +42 -0
- package/src/lib/components/OpenLayers/utils/TimeawareImageSource.d.ts +50 -0
- package/src/lib/components/OpenLayers/utils/WorkerQueue.d.ts +14 -0
- package/src/lib/components/OpenLayers/utils/constants.d.ts +6 -0
- package/src/lib/components/OpenLayers/utils/makeDimValuesToPrefetch.d.ts +10 -0
- package/src/lib/components/OpenLayers/utils/makeDimValuesToPrefetch.spec.d.ts +1 -0
- package/src/lib/components/OpenLayers/utils/projections.d.ts +16 -0
- package/src/lib/components/OpenLayers/utils/setMapCenter.d.ts +2 -0
- package/src/lib/components/OpenLayers/utils/types.d.ts +15 -0
- package/src/lib/components/OpenLayers/utils/viewUtils.d.ts +11 -0
- package/src/lib/components/ReactMapView/types.d.ts +1 -0
- package/src/lib/components/WebMapMapView/MapView.VFXData.stories.d.ts +6 -0
- package/src/lib/components/{MapView/MapView.Error.stories.d.ts → WebMapMapView/WebMapMapView.Error.stories.d.ts} +3 -3
- package/src/lib/components/WebMapMapView/WebMapMapView.MapPin.stories.d.ts +6 -0
- package/src/lib/components/WebMapMapView/WebMapMapView.Passive.stories.d.ts +6 -0
- package/src/lib/components/WebMapMapView/WebMapMapView.ProfileSounding.stories.d.ts +6 -0
- package/src/lib/components/WebMapMapView/WebMapMapView.RadarAnimation.stories.d.ts +6 -0
- package/src/lib/components/WebMapMapView/WebMapMapView.RadarData.stories.d.ts +6 -0
- package/src/lib/components/WebMapMapView/WebMapMapView.SetProjectionBBox.stories.d.ts +6 -0
- package/src/lib/components/WebMapMapView/WebMapMapView.SetProjectionBBoxLocalState.stories.d.ts +6 -0
- package/src/lib/components/WebMapMapView/WebMapMapView.ShiftToZoom.stories.d.ts +6 -0
- package/src/lib/components/WebMapMapView/WebMapMapView.ShowLayerInfo.stories.d.ts +6 -0
- package/src/lib/components/WebMapMapView/WebMapMapView.TiledBaseLayers.stories.d.ts +17 -0
- package/src/lib/components/index.d.ts +1 -0
- package/src/lib/hooks/index.d.ts +4 -0
- package/src/lib/hooks/useAnimationForLayer.d.ts +3 -0
- package/src/lib/hooks/useHooksGetCapabilities.d.ts +1 -1
- package/src/lib/hooks/useSetInterValWhenVisible.d.ts +1 -0
- package/src/lib/hooks/useViewFromLayer.d.ts +7 -0
- package/src/lib/index.d.ts +1 -1
- package/src/lib/components/MapView/MapView.MapPin.stories.d.ts +0 -6
- package/src/lib/components/MapView/MapView.Passive.stories.d.ts +0 -6
- package/src/lib/components/MapView/MapView.ProfileSounding.stories.d.ts +0 -6
- package/src/lib/components/MapView/MapView.RadarAnimation.stories.d.ts +0 -6
- package/src/lib/components/MapView/MapView.RadarData.stories.d.ts +0 -6
- package/src/lib/components/MapView/MapView.SetProjectionBBox.stories.d.ts +0 -6
- package/src/lib/components/MapView/MapView.SetProjectionBBoxLocalState.stories.d.ts +0 -6
- package/src/lib/components/MapView/MapView.ShiftToZoom.stories.d.ts +0 -6
- package/src/lib/components/MapView/MapView.ShowLayerInfo.stories.d.ts +0 -6
- package/src/lib/components/MapView/MapView.VFXData.stories.d.ts +0 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ClickOnMapTool } from './ClickOnMapTool';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { EPSGCode } from '@opengeoweb/shared';
|
|
2
|
+
import { Bbox } from '@opengeoweb/webmap';
|
|
3
|
+
import { View } from 'ol';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
export interface BboxAndSrs {
|
|
6
|
+
srs: EPSGCode;
|
|
7
|
+
bbox: Bbox;
|
|
8
|
+
}
|
|
9
|
+
export interface SrsSelectComponentProps {
|
|
10
|
+
srsAndBBOX: BboxAndSrs;
|
|
11
|
+
setSrs: (value: string) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const SrsSelectComponent: React.FC<SrsSelectComponentProps>;
|
|
14
|
+
export declare const useProjectionDropDown: (initCRS?: string) => {
|
|
15
|
+
view: View;
|
|
16
|
+
selectComponent: React.ReactElement;
|
|
17
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { WMLayer } from '@opengeoweb/webmap';
|
|
3
|
+
import ImageLayer from 'ol/layer/Image';
|
|
4
|
+
import { TimeawareImageSource } from './TimeawareImageSource';
|
|
5
|
+
export interface ShowTimeAwareLayerInfoProps {
|
|
6
|
+
wmLayer: WMLayer;
|
|
7
|
+
stepsToCheck: number[];
|
|
8
|
+
layer: ImageLayer<TimeawareImageSource>;
|
|
9
|
+
visible: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const ShowTimeAwareLayerInfo: React.FC<ShowTimeAwareLayerInfoProps>;
|
|
@@ -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,10 @@
|
|
|
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 getTimeStepsToCheckMemoized: ((timespan: Timespan) => number[]) & import("lodash").MemoizedFunction;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LayerProps } from '@opengeoweb/webmap';
|
|
2
|
+
export declare const initializeOpenLayersProjections: () => void;
|
|
3
|
+
/**
|
|
4
|
+
* Returns a preferred projection to use with a particular layer. It will search the layer props for
|
|
5
|
+
* a supported srs that either matches the current view srs or an srs that geoweb has reprojection math
|
|
6
|
+
* for. The first priority is the view srs and then any of the other supported srs. If no shared SRS
|
|
7
|
+
* is found, the function will return EPSG:3857 since that is almost always supported. There may be
|
|
8
|
+
* layers for which we do not have LayerProps for (for example layers not visible in a GetCapabilities
|
|
9
|
+
* document for a service) and thus defaulting to EPSG:3857 makes sense.
|
|
10
|
+
*
|
|
11
|
+
* @param viewSrs
|
|
12
|
+
* @param layerProps
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
export declare const selectPreferredWMSProjection: (viewSrs: string, layerProps: LayerProps | null) => string;
|
|
16
|
+
export declare const useProjection: () => string | undefined;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Feature } from 'ol';
|
|
2
|
+
import { Dimension } from '@opengeoweb/webmap';
|
|
3
|
+
export interface HoverSelect {
|
|
4
|
+
onHover?: (f: Feature | undefined) => void;
|
|
5
|
+
active: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface ClickOnFeature {
|
|
8
|
+
onClick: (f: Feature[]) => void;
|
|
9
|
+
hitTolerance?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface OnInitializeLayerProps {
|
|
12
|
+
layerId: string;
|
|
13
|
+
style: string;
|
|
14
|
+
dimensions: Dimension[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Bbox } from '@opengeoweb/webmap';
|
|
2
|
+
import { FeatureCollection, Geometry, GeoJsonProperties } from 'geojson';
|
|
3
|
+
import { View } from 'ol';
|
|
4
|
+
export declare const setViewFromExtent: (view: View, bbox: Bbox) => void;
|
|
5
|
+
export declare const setViewFromFeature: (view: View, geojsonFeature: FeatureCollection<Geometry, GeoJsonProperties> | undefined) => void;
|
|
6
|
+
export declare const makeView: (projectionCode?: string) => View;
|
|
7
|
+
export declare const viewUtils: {
|
|
8
|
+
setViewFromExtent: (view: View, bbox: Bbox) => void;
|
|
9
|
+
setViewFromFeature: (view: View, geojsonFeature: FeatureCollection<Geometry, GeoJsonProperties> | undefined) => void;
|
|
10
|
+
makeView: (projectionCode?: string) => View;
|
|
11
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MapView as WebMapMapView } from '../MapView';
|
|
3
|
+
declare const meta: Meta<typeof WebMapMapView>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof WebMapMapView>;
|
|
6
|
+
export declare const MapViewVFX: Story;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { MapView } from '
|
|
3
|
-
declare const meta: Meta<typeof
|
|
2
|
+
import { MapView as WebMapMapView } from '../MapView';
|
|
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 { MapView as WebMapMapView } from '../MapView';
|
|
3
|
+
declare const meta: Meta<typeof WebMapMapView>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof WebMapMapView>;
|
|
6
|
+
export declare const SetMapPin: Story;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MapView as WebMapMapView } from '../MapView';
|
|
3
|
+
declare const meta: Meta<typeof WebMapMapView>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof WebMapMapView>;
|
|
6
|
+
export declare const PassiveMap: Story;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MapView as WebMapMapView } from '../MapView';
|
|
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 { MapView as WebMapMapView } from '../MapView';
|
|
3
|
+
declare const meta: Meta<typeof WebMapMapView>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof WebMapMapView>;
|
|
6
|
+
export declare const RadarAnimation: Story;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MapView as WebMapMapView } from '../MapView';
|
|
3
|
+
declare const meta: Meta<typeof WebMapMapView>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof WebMapMapView>;
|
|
6
|
+
export declare const MapViewRadar: Story;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MapView as WebMapMapView } from '../MapView';
|
|
3
|
+
declare const meta: Meta<typeof WebMapMapView>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof WebMapMapView>;
|
|
6
|
+
export declare const SetProjectionBBox: Story;
|
package/src/lib/components/WebMapMapView/WebMapMapView.SetProjectionBBoxLocalState.stories.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MapView as WebMapMapView } from '../MapView';
|
|
3
|
+
declare const meta: Meta<typeof WebMapMapView>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof WebMapMapView>;
|
|
6
|
+
export declare const SetProjectionBBoxLocalState: Story;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MapView as WebMapMapView } from '../MapView';
|
|
3
|
+
declare const meta: Meta<typeof WebMapMapView>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof WebMapMapView>;
|
|
6
|
+
export declare const HoldShiftToZoom: Story;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MapView as WebMapMapView } from '../MapView';
|
|
3
|
+
declare const meta: Meta<typeof WebMapMapView>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof WebMapMapView>;
|
|
6
|
+
export declare const MapWithShowLayerInfoEnabled: Story;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MapView as WebMapMapView } from '../MapView';
|
|
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,3 @@
|
|
|
1
|
+
import { Dimension } from '@opengeoweb/webmap';
|
|
2
|
+
import type { OpenLayersLayerProps } from '../components/OpenLayers/layers';
|
|
3
|
+
export declare const useAnimationForLayer: (layerProps: OpenLayersLayerProps, 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;
|
package/src/lib/index.d.ts
CHANGED