@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
|
@@ -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
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
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
|
-
|
|
254
|
-
|
|
255
|
-
|
|
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
|
}
|