@eeacms/volto-marine-policy 2.0.32 → 2.0.33

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
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ ### [2.0.33](https://github.com/eea/volto-marine-policy/compare/2.0.32...2.0.33) - 22 October 2025
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - update demo sites map marine protected areas [laszlocseh - [`20ff428`](https://github.com/eea/volto-marine-policy/commit/20ff4280bc26593126566718993d16a0c36574cc)]
7
12
  ### [2.0.32](https://github.com/eea/volto-marine-policy/compare/2.0.31...2.0.32) - 21 October 2025
8
13
 
9
14
  #### :rocket: New Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-marine-policy",
3
- "version": "2.0.32",
3
+ "version": "2.0.33",
4
4
  "description": "@eeacms/volto-marine-policy: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -136,8 +136,8 @@ function DemoSitesMap(props) {
136
136
  }, [map, selectedCase, resetMapButtonClass, setResetMapButtonClass, ol]);
137
137
 
138
138
  const clusterStyle = React.useMemo(
139
- () => selectedClusterStyle({ selectedCase, ol }),
140
- [selectedCase, ol],
139
+ () => selectedClusterStyle({ selectedCase, ol, enableMarineMO }),
140
+ [selectedCase, ol, enableMarineMO],
141
141
  );
142
142
 
143
143
  const MapWithSelection = React.useMemo(() => Map, []);
@@ -209,7 +209,7 @@ function DemoSitesMap(props) {
209
209
  ) : null;
210
210
  }
211
211
 
212
- const selectedClusterStyle = ({ selectedFeature, ol }) => {
212
+ const selectedClusterStyle = ({ selectedFeature, ol, enableMarineMO }) => {
213
213
  function _clusterStyle(feature, selectedFeature) {
214
214
  const size = feature.get('features').length;
215
215
  let clusterStyle = styleCache[size];
@@ -237,25 +237,38 @@ const selectedClusterStyle = ({ selectedFeature, ol }) => {
237
237
  }
238
238
  // set size === 1 to enable clusterization
239
239
  if (size) {
240
- // let color = feature.values_.features[0].values_['color'];
241
- let color = '#0179cf';
242
- let width = feature.values_.features[0].values_['width'];
243
- let radius = feature.values_.features[0].values_['radius'];
244
- // console.log(color)
245
- // let color = '#0083E0'; // #0083E0 #50B0A4
246
-
247
- return new ol.style.Style({
248
- image: new ol.style.Circle({
249
- radius: radius,
250
- fill: new ol.style.Fill({
251
- color: '#fff',
240
+ if (enableMarineMO) {
241
+ return new ol.style.Style({
242
+ image: new ol.style.Icon({
243
+ anchor: [0.5, 1],
244
+ // size: [52, 52],
245
+ // offset: [52, 0],
246
+ // opacity: 1,
247
+ scale: 0.8,
248
+ src: '/marine/europe-seas/eu-mission-restore-our-oceans-and-water/icon-point.png/@@images/image/tiny',
252
249
  }),
253
- stroke: new ol.style.Stroke({
254
- color: color,
255
- width: width,
250
+ });
251
+ } else {
252
+ // let color = feature.values_.features[0].values_['color'];
253
+ let color = '#0179cf';
254
+ let width = feature.values_.features[0].values_['width'];
255
+ let radius = feature.values_.features[0].values_['radius'];
256
+ // console.log(color)
257
+ // let color = '#0083E0'; // #0083E0 #50B0A4
258
+
259
+ return new ol.style.Style({
260
+ image: new ol.style.Circle({
261
+ radius: radius,
262
+ fill: new ol.style.Fill({
263
+ color: '#fff',
264
+ }),
265
+ stroke: new ol.style.Stroke({
266
+ color: color,
267
+ width: width,
268
+ }),
256
269
  }),
257
- }),
258
- });
270
+ });
271
+ }
259
272
  } else {
260
273
  return clusterStyle;
261
274
  }