@opengeoweb/webmap-react 12.8.0 → 12.9.1

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.
Files changed (2) hide show
  1. package/index.esm.js +6 -0
  2. package/package.json +4 -4
package/index.esm.js CHANGED
@@ -3142,6 +3142,8 @@ var FeatureLayer = function FeatureLayer(_ref) {
3142
3142
  setSource(source);
3143
3143
  map.addLayer(layer);
3144
3144
  return function () {
3145
+ setSource(undefined);
3146
+ source.clear();
3145
3147
  map.removeLayer(layer);
3146
3148
  };
3147
3149
  // NOTE: style should not be part of this effect, as it changes always, causing the layer to be add/removed continuousely.
@@ -3251,6 +3253,10 @@ var OpenLayersFeatureLayer = function OpenLayersFeatureLayer(_ref) {
3251
3253
  features.current = formatter.readFeatures(featureCollection);
3252
3254
  }
3253
3255
  }
3256
+ // If no featureCollection is given, e.g. in edit mode of a polygon, the feature should not be displayed.
3257
+ if (!featureCollection) {
3258
+ return null;
3259
+ }
3254
3260
  return jsx(FeatureLayer, {
3255
3261
  features: features.current,
3256
3262
  style: style,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/webmap-react",
3
- "version": "12.8.0",
3
+ "version": "12.9.1",
4
4
  "description": "GeoWeb react wrapper for webmap",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -8,9 +8,9 @@
8
8
  "url": "git@gitlab.com:opengeoweb/opengeoweb.git"
9
9
  },
10
10
  "dependencies": {
11
- "@opengeoweb/webmap": "12.8.0",
12
- "@opengeoweb/theme": "12.8.0",
13
- "@opengeoweb/shared": "12.8.0",
11
+ "@opengeoweb/webmap": "12.9.1",
12
+ "@opengeoweb/theme": "12.9.1",
13
+ "@opengeoweb/shared": "12.9.1",
14
14
  "lodash": "^4.17.21",
15
15
  "ol": "^10.4.0",
16
16
  "proj4": "^2.9.2",