@open-pioneer/measurement 1.5.0-dev.20260917081843 → 1.5.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/CHANGELOG.md +38 -36
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
# @open-pioneer/measurement
|
|
2
2
|
|
|
3
|
-
## 1.5.0
|
|
3
|
+
## 1.5.0
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
7
|
- f790fda: Update to Chakra 3.37.0
|
|
8
8
|
- a9c1213: Rework the tooltips rendered on the map: help tooltips now look like chakra's tooltips, and the measurement tooltips (active and finished measurements) are also derived from chakra's tooltip styles.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
The built-in styles of these tooltips are no longer shipped as plain css, chakra style props are used instead.
|
|
11
|
+
The existing css classes (`editing-tooltip`, `measurement-tooltip`, `measurement-active-tooltip`, `measurement-finished-tooltip`, `selection-tooltip`) remain on the overlay's element.
|
|
12
|
+
|
|
13
|
+
- a186f5d: Update core packages to 4.8.0.
|
|
12
14
|
|
|
13
15
|
### Patch Changes
|
|
14
16
|
|
|
@@ -85,17 +87,17 @@
|
|
|
85
87
|
- 193068a: Deprecate the `mapId` property on React components.
|
|
86
88
|
Use the `MapModel` directly instead to pass a reference to the map.
|
|
87
89
|
|
|
88
|
-
|
|
90
|
+
Example:
|
|
89
91
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
```tsx
|
|
93
|
+
// Default map for entire component tree
|
|
94
|
+
<DefaultMapProvider map={mapModel}>
|
|
95
|
+
<Toc />
|
|
96
|
+
</DefaultMapProvider>
|
|
95
97
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
// Map for specific component
|
|
99
|
+
<Toc map={mapModel} />
|
|
100
|
+
```
|
|
99
101
|
|
|
100
102
|
### Patch Changes
|
|
101
103
|
|
|
@@ -115,9 +117,9 @@
|
|
|
115
117
|
|
|
116
118
|
- b717121: Update from OL 9 to OL 10.
|
|
117
119
|
- 2fa8020: Update trails core package dependencies.
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
120
|
+
- Also updates Chakra UI to the latest 2.x version and Chakra React Select to version 5.
|
|
121
|
+
- Removes any obsolete references to `@chakra-ui/system`.
|
|
122
|
+
This dependency seems to be no longer required and may lead to duplicate packages in your dependency tree.
|
|
121
123
|
|
|
122
124
|
### Patch Changes
|
|
123
125
|
|
|
@@ -135,7 +137,7 @@
|
|
|
135
137
|
- 583f1d6: The `mapId` or `map` properties are now optional on individual components.
|
|
136
138
|
You can use the `DefaultMapProvider` to configure an implicit default value.
|
|
137
139
|
|
|
138
|
-
|
|
140
|
+
Note that configuring _neither_ a default _nor_ an explicit `map` or `mapId` will trigger a runtime error.
|
|
139
141
|
|
|
140
142
|
- 583f1d6: All UI components in this project now accept the `mapId` (a `string`) _or_ the `map` (a `MapModel`) directly.
|
|
141
143
|
- a8b3449: Switch to a new versioning strategy.
|
|
@@ -149,26 +151,26 @@
|
|
|
149
151
|
- b152428: Update trails dependencies
|
|
150
152
|
- 23b48ad: Add two new optional properties:
|
|
151
153
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
154
|
+
- `predefinedMeasurements`: an array of measurements that will be added to the map (without user interaction)
|
|
155
|
+
- `onMeasurementsChange`: an event listener that will be called when measurements are added or removed
|
|
156
|
+
|
|
157
|
+
```tsx
|
|
158
|
+
const predefinedMeasurements = useMemo(
|
|
159
|
+
() => [
|
|
160
|
+
new LineString([
|
|
161
|
+
[398657.97, 5755696.26],
|
|
162
|
+
[402570.98, 5757547.78]
|
|
163
|
+
])
|
|
164
|
+
],
|
|
165
|
+
[]
|
|
166
|
+
);
|
|
167
|
+
|
|
168
|
+
<Measurement
|
|
169
|
+
mapId={MAP_ID}
|
|
170
|
+
onMeasurementsChange={(e) => console.log(e.kind, e.geometry)}
|
|
171
|
+
predefinedMeasurements={predefinedMeasurements}
|
|
172
|
+
/>;
|
|
173
|
+
```
|
|
172
174
|
|
|
173
175
|
## 0.4.3
|
|
174
176
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@open-pioneer/measurement",
|
|
4
|
-
"version": "1.5.0
|
|
4
|
+
"version": "1.5.0",
|
|
5
5
|
"description": "This package provides a UI component that allows the user to perform area and distance measurements on the map.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"open-pioneer-trails"
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@chakra-ui/react": "^3.37.0",
|
|
18
|
-
"@open-pioneer/chakra-snippets": "4.8.0
|
|
19
|
-
"@open-pioneer/core": "4.8.0
|
|
20
|
-
"@open-pioneer/map": "1.5.0
|
|
21
|
-
"@open-pioneer/map-ui-components": "1.5.0
|
|
22
|
-
"@open-pioneer/react-utils": "4.8.0
|
|
23
|
-
"@open-pioneer/runtime": "4.8.0
|
|
18
|
+
"@open-pioneer/chakra-snippets": "^4.8.0",
|
|
19
|
+
"@open-pioneer/core": "^4.8.0",
|
|
20
|
+
"@open-pioneer/map": "1.5.0",
|
|
21
|
+
"@open-pioneer/map-ui-components": "1.5.0",
|
|
22
|
+
"@open-pioneer/react-utils": "^4.8.0",
|
|
23
|
+
"@open-pioneer/runtime": "^4.8.0",
|
|
24
24
|
"ol": "^10.10.0",
|
|
25
25
|
"react": "^19.3.0"
|
|
26
26
|
},
|