@opengeoweb/webmap-react 8.4.0 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +1098 -146
- package/package.json +1 -1
- package/src/lib/components/MapDraw/storyComponents/index.d.ts +1 -0
- package/src/lib/components/MapDrawTool/{MapDrawToolDoubleControls.stories.d.ts → MapDrawToolMultipleDrawTools.stories.d.ts} +1 -1
- package/src/lib/components/MapDrawTool/index.d.ts +3 -1
- package/src/lib/components/MapDrawTool/storyExamplesMapDrawTool.d.ts +8 -0
- package/src/lib/components/MapDrawTool/storyExamplesMapDrawToolIntersection.d.ts +9 -0
- package/src/lib/components/MapDrawTool/storyExamplesMapDrawToolMultipleDrawTools.d.ts +11 -0
- package/src/lib/components/MapDrawTool/useMapDrawTool.d.ts +4 -1
- package/src/lib/components/MapDrawTool/utils.d.ts +3 -0
- package/src/lib/components/MapView/MapViewLayer.d.ts +1 -1
- package/src/lib/components/ReactMapView/types.d.ts +1 -0
- package/src/lib/components/Search/SearchDialog.d.ts +6 -0
- package/src/lib/components/Search/index.d.ts +1 -0
- package/src/lib/components/index.d.ts +1 -0
- package/src/lib/components/MapDrawTool/storyUtils.d.ts +0 -3
package/package.json
CHANGED
|
@@ -2,4 +2,6 @@ export * from './types';
|
|
|
2
2
|
export { useMapDrawTool, defaultPoint, defaultDelete, defaultPolygon, defaultBox, defaultIntersectionStyleProperties, getIcon, currentlySupportedDrawModes, defaultModes, } from './useMapDrawTool';
|
|
3
3
|
export type { MapDrawToolOptions } from './useMapDrawTool';
|
|
4
4
|
export * from './utils';
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './storyExamplesMapDrawTool';
|
|
6
|
+
export * from './storyExamplesMapDrawToolIntersection';
|
|
7
|
+
export * from './storyExamplesMapDrawToolMultipleDrawTools';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MapDrawToolOptions } from './useMapDrawTool';
|
|
3
|
+
export declare const opacityOptions: number[];
|
|
4
|
+
export declare const fillOptions: any[];
|
|
5
|
+
export declare const strokeWidthOptions: number[];
|
|
6
|
+
export declare const getToolIcon: (id: string) => React.ReactElement;
|
|
7
|
+
export declare const basicExampleDrawOptions: MapDrawToolOptions;
|
|
8
|
+
export declare const basicExampleMultipleShapeDrawOptions: MapDrawToolOptions;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MapDrawToolOptions } from './useMapDrawTool';
|
|
3
|
+
export declare const getIntersectionToolIcon: (id: string) => React.ReactElement;
|
|
4
|
+
export declare const exampleIntersections: {
|
|
5
|
+
title: string;
|
|
6
|
+
geojson: import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>;
|
|
7
|
+
}[];
|
|
8
|
+
export declare const exampleIntersectionOptions: MapDrawToolOptions;
|
|
9
|
+
export declare const exampleIntersectionWithShapeOptions: MapDrawToolOptions;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DrawMode } from './types';
|
|
3
|
+
import { MapDrawToolOptions } from './useMapDrawTool';
|
|
4
|
+
export declare const exampleIntersectionsMultiDrawTool: {
|
|
5
|
+
title: string;
|
|
6
|
+
geojson: import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>;
|
|
7
|
+
}[];
|
|
8
|
+
export declare const getDoubleControlToolIcon: (drawMode: DrawMode) => React.ReactElement;
|
|
9
|
+
export declare const updateEditModeButtonsWithFir: (drawModes: DrawMode[], newFirGeoJSON: GeoJSON.FeatureCollection) => DrawMode[];
|
|
10
|
+
export declare const startToolExampleConfig: MapDrawToolOptions;
|
|
11
|
+
export declare const endToolExampleConfig: MapDrawToolOptions;
|
|
@@ -38,6 +38,9 @@ export interface MapDrawToolOptions {
|
|
|
38
38
|
defaultGeoJSONIntersection?: GeoJSON.FeatureCollection;
|
|
39
39
|
defaultGeoJSONIntersectionBounds?: GeoJSON.FeatureCollection;
|
|
40
40
|
defaultGeoJSONIntersectionProperties?: GeoJSON.GeoJsonProperties;
|
|
41
|
+
geoJSONLayerId?: string;
|
|
42
|
+
geoJSONIntersectionLayerId?: string;
|
|
43
|
+
geoJSONIntersectionBoundsLayerId?: string;
|
|
41
44
|
}
|
|
42
45
|
export declare const getIcon: (drawModeId: string) => React.ReactElement | null;
|
|
43
46
|
export declare const defaultPoint: {
|
|
@@ -101,5 +104,5 @@ export declare const currentlySupportedDrawModes: ({
|
|
|
101
104
|
shape: import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>;
|
|
102
105
|
isSelectable: boolean;
|
|
103
106
|
})[];
|
|
104
|
-
export declare const useMapDrawTool: ({ defaultDrawModes, shouldAllowMultipleShapes, defaultGeoJSON, defaultGeoJSONIntersection, defaultGeoJSONIntersectionBounds, defaultGeoJSONIntersectionProperties, }: MapDrawToolOptions) => MapDrawToolProps;
|
|
107
|
+
export declare const useMapDrawTool: ({ defaultDrawModes, shouldAllowMultipleShapes, defaultGeoJSON, defaultGeoJSONIntersection, defaultGeoJSONIntersectionBounds, defaultGeoJSONIntersectionProperties, geoJSONLayerId, geoJSONIntersectionLayerId, geoJSONIntersectionBoundsLayerId, }: MapDrawToolOptions) => MapDrawToolProps;
|
|
105
108
|
export {};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Feature } from '@turf/turf';
|
|
2
|
+
import { FeatureCollection } from 'geojson';
|
|
1
3
|
import { DrawMode } from './types';
|
|
2
4
|
/**
|
|
3
5
|
* Adds properties to the first geojson feature based on the given property object.
|
|
@@ -39,3 +41,4 @@ export declare const createInterSections: (geojson: GeoJSON.FeatureCollection, o
|
|
|
39
41
|
export declare const getGeoJson: (geojson: GeoJSON.FeatureCollection, shouldAllowMultipleShapes: boolean) => GeoJSON.FeatureCollection;
|
|
40
42
|
export declare const getFeatureCollection: (geoJSONFeature: GeoJSON.Feature | GeoJSON.FeatureCollection, shouldAllowMultipleShapes: boolean, geoJSONFeatureCollection?: GeoJSON.FeatureCollection) => GeoJSON.FeatureCollection;
|
|
41
43
|
export declare const isGeoJSONFeatureCreatedByTool: (existingJSON: GeoJSON.FeatureCollection, newGeoJSON: GeoJSON.Feature | GeoJSON.FeatureCollection) => boolean;
|
|
44
|
+
export declare const rewindGeometry: (geoJSON: FeatureCollection) => FeatureCollection;
|
|
@@ -10,7 +10,7 @@ export interface MapViewLayerProps extends LayerFoundation {
|
|
|
10
10
|
updateGeojson?: (geoJson: GeoJSON.FeatureCollection, reason: string) => void;
|
|
11
11
|
exitDrawModeCallback?: (reason: DrawModeExitCallback) => void;
|
|
12
12
|
selectedFeatureIndex?: number;
|
|
13
|
-
onClickFeature?: (event
|
|
13
|
+
onClickFeature?: (event?: FeatureEvent) => void;
|
|
14
14
|
onHoverFeature?: (event: FeatureEvent) => void;
|
|
15
15
|
}
|
|
16
16
|
export declare const MapViewLayer: React.FC<MapViewLayerProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SearchDialog';
|