@opengeoweb/webmap-react 19.6.1-nightly-20260913 → 19.6.1-nightly-20260915

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.
@@ -6,6 +6,7 @@ export declare const getProj4: (projection: string | Converter) => Converter;
6
6
  export declare const NEW_LINESTRING_CREATED = "new point in LineString created";
7
7
  export declare const NEW_FEATURE_CREATED = "new feature created";
8
8
  export declare const NEW_POINT_CREATED = "new point created";
9
+ export declare const COORDINATE_DECIMALS = 5;
9
10
  export declare const roundCoordinates: <T extends Position | Position[] | Position[][] | Position[][][]>(coords: T) => T;
10
11
  export declare const roundFeatureCoordinates: <T extends Feature>(feature: T) => T;
11
12
  export declare const splitPolygon: (polygonFeature: Feature<GeoJSON.Polygon>, splitFeature: Feature<GeoJSON.Polygon>) => FeatureCollection<GeoJSON.Polygon> | null;
@@ -6,4 +6,5 @@ export declare const strokeWidthOptions: string[];
6
6
  export declare const getToolIcon: (selectionType: SelectionType) => React.ReactElement;
7
7
  export declare const basicExampleDrawOptions: MapDrawToolOptions;
8
8
  export declare const basicExampleMultipleShapeDrawOptions: MapDrawToolOptions;
9
+ export declare const basicExampleSharedVertexDrawOptions: MapDrawToolOptions;
9
10
  export declare const basicExampleMultipleShapeWithValuesDrawOptions: MapDrawToolOptions;
@@ -73,6 +73,15 @@ export declare const isPointFeatureCollection: (geojson: GeoJSON.FeatureCollecti
73
73
  * @returns GeoJSONS extend with intersections
74
74
  */
75
75
  export declare const createInterSections: (geojson: GeoJSON.FeatureCollection, otherGeoJSON: GeoJSON.FeatureCollection, geoJSONproperties?: GeoJSON.GeoJsonProperties, proj?: string) => GeoJSON.FeatureCollection;
76
+ export declare const TRANSIENT_FEATURE_PROPERTIES: readonly ["isSelected", "highlightSelectedFeature", "highlightNearbyFeature", "hover", "boxSelectPreview", "isReadonly"];
77
+ /**
78
+ * Removes the passed properties from the features of a feature collection
79
+ * @param geoJSON feature collection
80
+ * @param propertiesToRemove names of the properties to remove
81
+ * @returns feature collection without the passed feature properties
82
+ */
83
+ export declare const removeFeatureProperties: (geoJSON: GeoJSON.FeatureCollection, propertiesToRemove: readonly string[]) => GeoJSON.FeatureCollection;
84
+ export declare const removeTransientFeatureProperties: (geoJSON: GeoJSON.FeatureCollection) => GeoJSON.FeatureCollection;
76
85
  /**
77
86
  * Turns a feature which originates from another feature into a new feature: the
78
87
  * id and the properties identifying the original feature are removed
@@ -2,6 +2,7 @@ export { default as MapContext } from './context/MapContext';
2
2
  export * from './component/OpenLayersMapView';
3
3
  export * from './utils/TimeAwareImageWrapper';
4
4
  export type * from './utils/types';
5
+ export * from './utils/modifyFeatures';
5
6
  export * from './utils/moveFeatures';
6
7
  export * from './utils/projections';
7
8
  export * from './utils/setMapCenter';
@@ -1,7 +1,7 @@
1
1
  import type { Feature } from 'ol';
2
2
  import type { StyleLike } from 'ol/style/Style';
3
3
  import React from 'react';
4
- import type { BoxSelect, ClickOnFeature, HoverSelect, MoveFeatures } from '../utils/types';
4
+ import type { BoxSelect, ClickOnFeature, HoverSelect, ModifyFeatures, MoveFeatures } from '../utils/types';
5
5
  export interface FeatureLayerProps {
6
6
  features: Feature[];
7
7
  style: StyleLike;
@@ -10,6 +10,7 @@ export interface FeatureLayerProps {
10
10
  clickOnFeature?: ClickOnFeature;
11
11
  boxSelect?: BoxSelect;
12
12
  moveFeatures?: MoveFeatures;
13
+ modifyFeatures?: ModifyFeatures;
13
14
  layerId?: string;
14
15
  testId?: string;
15
16
  opacity?: number;
@@ -1,6 +1,6 @@
1
1
  import type { FeatureCollection } from 'geojson';
2
2
  import type { StyleLike } from 'ol/style/Style';
3
- import type { BoxSelect, ClickOnFeature, HoverSelect, MoveFeaturesGeoJSON } from '../utils/types';
3
+ import type { BoxSelect, ClickOnFeature, HoverSelect, ModifyFeaturesGeoJSON, MoveFeaturesGeoJSON } from '../utils/types';
4
4
  export interface OpenLayersFeatureLayerProps {
5
5
  featureCollection?: FeatureCollection;
6
6
  style?: StyleLike;
@@ -9,6 +9,7 @@ export interface OpenLayersFeatureLayerProps {
9
9
  clickOnFeature?: ClickOnFeature;
10
10
  boxSelect?: BoxSelect;
11
11
  moveFeatures?: MoveFeaturesGeoJSON;
12
+ modifyFeatures?: ModifyFeaturesGeoJSON;
12
13
  layerId?: string;
13
14
  testId?: string;
14
15
  opacity?: number;
@@ -0,0 +1,30 @@
1
+ import type { Feature, Map } from 'ol';
2
+ import Modify from 'ol/interaction/Modify';
3
+ import type { ProjectionLike } from 'ol/proj';
4
+ import Style from 'ol/style/Style';
5
+ export declare const CONSTRAINED_SELECTION_TYPES: ReadonlySet<string>;
6
+ export declare const hasEditableVertices: (feature: Feature) => boolean;
7
+ export declare const isDefaultModifiable: (feature: Feature) => boolean;
8
+ export declare const connectSharedVertices: (features: Feature[], projection: ProjectionLike) => void;
9
+ export declare const modifyHandleStyle: Style;
10
+ export interface CreateModifyFeaturesOptions {
11
+ features: Feature[];
12
+ isModifiable: (feature: Feature) => boolean;
13
+ projection: ProjectionLike;
14
+ onModifyEnd: (features: Feature[]) => void;
15
+ onModifyStart?: () => void;
16
+ }
17
+ export interface ModifyFeaturesInteraction {
18
+ modify: Modify;
19
+ dispose: () => void;
20
+ }
21
+ export declare const createModifyFeatures: ({ features, isModifiable, projection, onModifyEnd, onModifyStart, }: CreateModifyFeaturesOptions) => ModifyFeaturesInteraction | undefined;
22
+ export interface UseModifyFeaturesOptions {
23
+ map?: Map | null;
24
+ features: Feature[];
25
+ active: boolean;
26
+ isModifiable?: (feature: Feature) => boolean;
27
+ onModifyEnd?: (features: Feature[]) => void;
28
+ onModifyStart?: () => void;
29
+ }
30
+ export declare const useModifyFeatures: ({ map, features, active, isModifiable, onModifyEnd, onModifyStart, }: UseModifyFeaturesOptions) => void;
@@ -1,7 +1,10 @@
1
1
  import type { Feature, Map } from 'ol';
2
+ import type { Geometry } from 'ol/geom';
2
3
  import Translate from 'ol/interaction/Translate';
4
+ import type { MovedFeature } from './types';
3
5
  export declare const getOlFeatureKey: (feature?: Feature) => string | undefined;
4
6
  export declare const isDefaultMovable: (feature: Feature) => boolean;
7
+ export declare const toMovedFeatures: (olFeatures: Feature<Geometry>[], projection: string) => MovedFeature[];
5
8
  export interface CreateMoveFeaturesOptions {
6
9
  features: Feature[];
7
10
  isMovable: (feature: Feature) => boolean;
@@ -26,6 +26,15 @@ export interface MoveFeaturesGeoJSON {
26
26
  onMoveEnd: (movedFeatures: MovedFeature[]) => void;
27
27
  active: boolean;
28
28
  }
29
+ export interface ModifyFeatures {
30
+ onModifyEnd: (features: Feature[]) => void;
31
+ isModifiable?: (feature: Feature) => boolean;
32
+ active: boolean;
33
+ }
34
+ export interface ModifyFeaturesGeoJSON {
35
+ onModifyEnd: (modifiedFeatures: MovedFeature[]) => void;
36
+ active: boolean;
37
+ }
29
38
  export interface OnInitializeLayerProps {
30
39
  layerId: string;
31
40
  style: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/webmap-react",
3
- "version": "19.6.1-nightly-20260913",
3
+ "version": "19.6.1-nightly-20260915",
4
4
  "description": "GeoWeb react wrapper for webmap",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -20,9 +20,9 @@
20
20
  }
21
21
  },
22
22
  "dependencies": {
23
- "@opengeoweb/webmap": "19.6.1-nightly-20260913",
24
- "@opengeoweb/theme": "19.6.1-nightly-20260913",
25
- "@opengeoweb/shared": "19.6.1-nightly-20260913",
23
+ "@opengeoweb/webmap": "19.6.1-nightly-20260915",
24
+ "@opengeoweb/theme": "19.6.1-nightly-20260915",
25
+ "@opengeoweb/shared": "19.6.1-nightly-20260915",
26
26
  "lodash": "^4.18.1",
27
27
  "ol": "^10.4.0",
28
28
  "proj4": "^2.9.2",