@open-pioneer/geolocation 0.9.0 → 0.10.0-dev.20250324141112

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 CHANGED
@@ -1,5 +1,30 @@
1
1
  # @open-pioneer/geolocation
2
2
 
3
+ ## 0.10.0-dev.20250324141112
4
+
5
+ ### Minor Changes
6
+
7
+ - 193068a: Deprecate the `mapId` property on React components.
8
+ Use the `MapModel` directly instead to pass a reference to the map.
9
+
10
+ Example:
11
+
12
+ ```tsx
13
+ // Default map for entire component tree
14
+ <DefaultMapProvider map={mapModel}>
15
+ <Toc />
16
+ </DefaultMapProvider>
17
+
18
+ // Map for specific component
19
+ <Toc map={mapModel} />
20
+ ```
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [193068a]
25
+ - @open-pioneer/map@0.10.0-dev.20250324141112
26
+ - @open-pioneer/map-ui-components@0.10.0-dev.20250324141112
27
+
3
28
  ## 0.9.0
4
29
 
5
30
  ### Minor Changes
package/README.md CHANGED
@@ -4,10 +4,12 @@ This package provides a geolocation component based on [OpenLayers](https://open
4
4
 
5
5
  ## Usage
6
6
 
7
- To add the component to your app, insert the following snippet with a reference to a map ID:
7
+ To add the component to your app, insert the following snippet (with a reference to a map):
8
8
 
9
9
  ```jsx
10
- <Geolocation mapId="map_id" />
10
+ <Geolocation
11
+ map={map}
12
+ /> /* instead of passing the map, the `DefaultMapProvider` can alternatively be used */
11
13
  ```
12
14
 
13
15
  If the localization was successful, the map is centered on the user's position and zoomed to the accuracy of the localization.
@@ -18,13 +20,13 @@ Once a user zooms or moves the map, the map is no longer centered on new positio
18
20
  To adjust the maximum zoom level, add the optional property `maxZoom`.
19
21
 
20
22
  ```jsx
21
- <Geolocation mapId="map_id" maxZoom={20} />
23
+ <Geolocation map={map} maxZoom={20} />
22
24
  ```
23
25
 
24
26
  To configure the style of the user's position and accuracy, add the optional properties `positionFeatureStyle` or `accuracyFeatureStyle`:
25
27
 
26
28
  ```tsx
27
- <Geolocation mapId="map_id" positionFeatureStyle={...} accuracyFeatureStyle={...} />
29
+ <Geolocation map={map} positionFeatureStyle={...} accuracyFeatureStyle={...} />
28
30
  ```
29
31
 
30
32
  Both properties support arbitrary OpenLayers [`StyleLike`](https://openlayers.org/en/latest/apidoc/module-ol_style_Style.html#~StyleLike) values: you can configure either a single [Style](https://openlayers.org/en/latest/apidoc/module-ol_style_Style.html) instance, an array of them or a function computing such values.
@@ -60,7 +62,7 @@ function AppUI() {
60
62
  return (
61
63
  // ...
62
64
  <Geolocation
63
- mapId={MAP_ID}
65
+ mad={map}
64
66
  positionFeatureStyle={POSITION_STYLE}
65
67
  accuracyFeatureStyle={ACCURACY_STYLE}
66
68
  />
@@ -72,7 +74,7 @@ To use custom position options from the [Geolocation API](https://www.w3.org/TR/
72
74
 
73
75
  ```jsx
74
76
  <Geolocation
75
- mapId="map_id"
77
+ map={map}
76
78
  trackingOptions={{
77
79
  enableHighAccuracy: true,
78
80
  timeout: 60000,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@open-pioneer/geolocation",
4
- "version": "0.9.0",
4
+ "version": "0.10.0-dev.20250324141112",
5
5
  "description": "This package provides a component to locate a user's position.",
6
6
  "keywords": [
7
7
  "open-pioneer-trails"
@@ -24,8 +24,8 @@
24
24
  "ol": "^10.4.0",
25
25
  "react": "^19.0.0",
26
26
  "react-icons": "^5.3.0",
27
- "@open-pioneer/map": "^0.9.0",
28
- "@open-pioneer/map-ui-components": "^0.9.0"
27
+ "@open-pioneer/map": "^0.10.0-dev.20250324141112",
28
+ "@open-pioneer/map-ui-components": "^0.10.0-dev.20250324141112"
29
29
  },
30
30
  "exports": {
31
31
  "./package.json": "./package.json",