qwc2 2025.12.4 → 2025.12.17
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/components/IdentifyViewer.js +89 -35
- package/components/ResizeableWindow.js +8 -0
- package/components/SearchBox.js +12 -5
- package/components/SideBar.js +4 -0
- package/components/style/IdentifyViewer.css +7 -5
- package/components/widgets/EditableSelect.js +2 -1
- package/components/widgets/LayerCatalogWidget.js +25 -14
- package/components/widgets/MenuButton.js +7 -2
- package/components/widgets/NavBar.js +4 -2
- package/components/widgets/PopupMenu.js +44 -13
- package/components/widgets/SearchWidget.js +39 -50
- package/components/widgets/style/SearchWidget.css +3 -19
- package/icons/oblique.svg +53 -0
- package/package.json +3 -2
- package/plugins/Cyclomedia.js +2 -1
- package/plugins/HeightProfile.js +4 -1
- package/plugins/Identify.js +4 -0
- package/plugins/LayerTree.js +5 -1
- package/plugins/Measure.js +5 -1
- package/plugins/ObliqueView.js +410 -0
- package/plugins/Print.js +1 -1
- package/plugins/TopBar.js +2 -0
- package/plugins/map/MeasurementSupport.js +1 -0
- package/plugins/map/RedliningSupport.js +7 -5
- package/plugins/style/Map.css +4 -2
- package/plugins/style/ObliqueView.css +112 -0
- package/reducers/layers.js +18 -36
- package/reducers/measurement.js +2 -1
- package/scripts/themesConfig.js +1 -0
- package/scripts/themesConfig.py +2 -0
- package/scripts/wmts_config_generator.py +1 -1
- package/static/translations/bg-BG.json +11 -1
- package/static/translations/ca-ES.json +11 -1
- package/static/translations/cs-CZ.json +11 -1
- package/static/translations/de-CH.json +11 -1
- package/static/translations/de-DE.json +11 -1
- package/static/translations/en-US.json +11 -1
- package/static/translations/es-ES.json +11 -1
- package/static/translations/fi-FI.json +11 -1
- package/static/translations/fr-FR.json +12 -2
- package/static/translations/hu-HU.json +11 -1
- package/static/translations/it-IT.json +11 -1
- package/static/translations/ja-JP.json +11 -1
- package/static/translations/nl-NL.json +11 -1
- package/static/translations/no-NO.json +11 -1
- package/static/translations/pl-PL.json +11 -1
- package/static/translations/pt-BR.json +11 -1
- package/static/translations/pt-PT.json +11 -1
- package/static/translations/ro-RO.json +11 -1
- package/static/translations/ru-RU.json +11 -1
- package/static/translations/sv-SE.json +11 -1
- package/static/translations/tr-TR.json +11 -1
- package/static/translations/tsconfig.json +8 -0
- package/static/translations/uk-UA.json +11 -1
- package/utils/FeatureStyles.js +5 -2
- package/utils/MiscUtils.js +2 -1
- package/utils/VectorLayerUtils.js +14 -5
package/utils/FeatureStyles.js
CHANGED
|
@@ -174,6 +174,7 @@ var defaultStyle = function defaultStyle(feature, options) {
|
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
if (feature.getGeometry().getType() === "LineString" && opts.headmarker in END_MARKERS) {
|
|
177
|
+
var _opts$markerscale;
|
|
177
178
|
var _p = feature.getGeometry().getCoordinates()[0];
|
|
178
179
|
var _p2 = feature.getGeometry().getCoordinates()[1];
|
|
179
180
|
var rotation = 0.5 * Math.PI + Math.atan2(_p[0] - _p2[0], _p[1] - _p2[1]);
|
|
@@ -184,11 +185,12 @@ var defaultStyle = function defaultStyle(feature, options) {
|
|
|
184
185
|
anchorYUnits: 'fraction',
|
|
185
186
|
color: opts.strokeColor,
|
|
186
187
|
rotation: END_MARKERS[opts.headmarker].baserotation / 180 * Math.PI + rotation,
|
|
187
|
-
scale: 0.125 * (1 + opts.strokeWidth) // Also update in VectorLayerUtils.generateMarkerGeometry
|
|
188
|
+
scale: 0.125 * (1 + opts.strokeWidth) * ((_opts$markerscale = opts.markerscale) !== null && _opts$markerscale !== void 0 ? _opts$markerscale : 1) // Also update in VectorLayerUtils.generateMarkerGeometry
|
|
188
189
|
}))
|
|
189
190
|
}));
|
|
190
191
|
}
|
|
191
192
|
if (feature.getGeometry().getType() === "LineString" && opts.tailmarker in END_MARKERS) {
|
|
193
|
+
var _opts$markerscale2;
|
|
192
194
|
var l = feature.getGeometry().getCoordinates().length;
|
|
193
195
|
var _p3 = feature.getGeometry().getCoordinates()[l - 1];
|
|
194
196
|
var _p4 = feature.getGeometry().getCoordinates()[l - 2];
|
|
@@ -200,7 +202,7 @@ var defaultStyle = function defaultStyle(feature, options) {
|
|
|
200
202
|
anchorYUnits: 'fraction',
|
|
201
203
|
color: opts.strokeColor,
|
|
202
204
|
rotation: END_MARKERS[opts.tailmarker].baserotation / 180 * Math.PI + _rotation,
|
|
203
|
-
scale: 0.125 * (1 + opts.strokeWidth) // Also update in VectorLayerUtils.generateMarkerGeometry
|
|
205
|
+
scale: 0.125 * (1 + opts.strokeWidth) * ((_opts$markerscale2 = opts.markerscale) !== null && _opts$markerscale2 !== void 0 ? _opts$markerscale2 : 1) // Also update in VectorLayerUtils.generateMarkerGeometry
|
|
204
206
|
}))
|
|
205
207
|
}));
|
|
206
208
|
}
|
|
@@ -295,6 +297,7 @@ export default {
|
|
|
295
297
|
fillColor: opts.measureFillColor,
|
|
296
298
|
headmarker: opts.headmarker,
|
|
297
299
|
tailmarker: opts.tailmarker,
|
|
300
|
+
markerscale: opts.markerscale,
|
|
298
301
|
strokeDash: []
|
|
299
302
|
};
|
|
300
303
|
return defaultStyle(feature, styleOptions);
|
package/utils/MiscUtils.js
CHANGED
|
@@ -93,7 +93,8 @@ var MiscUtils = {
|
|
|
93
93
|
},
|
|
94
94
|
checkKeyActivate: function checkKeyActivate(ev) {
|
|
95
95
|
var onEsc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
96
|
-
|
|
96
|
+
var spaceActivate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
97
|
+
if (spaceActivate && ev.code === "Space" || ev.code === "Enter") {
|
|
97
98
|
MiscUtils.killEvent(ev);
|
|
98
99
|
ev.currentTarget.click();
|
|
99
100
|
} else if (ev.code === "Escape" && onEsc) {
|
|
@@ -19,6 +19,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
19
19
|
* LICENSE file in the root directory of this source tree.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
+
import cleanCords from '@turf/clean-coords';
|
|
22
23
|
import geojsonBbox from 'geojson-bounding-box';
|
|
23
24
|
import isEmpty from 'lodash.isempty';
|
|
24
25
|
import { getDefaultImageStyle } from 'ol/format/KML';
|
|
@@ -74,8 +75,14 @@ var VectorLayerUtils = {
|
|
|
74
75
|
})
|
|
75
76
|
});
|
|
76
77
|
}
|
|
77
|
-
|
|
78
|
-
|
|
78
|
+
try {
|
|
79
|
+
return VectorLayerUtils.simplifyFeature(feature);
|
|
80
|
+
} catch (e) {
|
|
81
|
+
/* eslint-disable-next-line */
|
|
82
|
+
console.warn("Skipping invalid geometry");
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
}).filter(Boolean).flat();
|
|
79
86
|
var _iterator2 = _createForOfIteratorHelper(features),
|
|
80
87
|
_step2;
|
|
81
88
|
try {
|
|
@@ -88,12 +95,14 @@ var VectorLayerUtils = {
|
|
|
88
95
|
var properties = feature.properties || {};
|
|
89
96
|
var geometry = VectorLayerUtils.reprojectGeometry(feature.geometry, feature.crs || printCrs, printCrs);
|
|
90
97
|
if (feature.geometry.type === "LineString") {
|
|
98
|
+
var _styleOptions$markers;
|
|
99
|
+
var markerScale = (_styleOptions$markers = styleOptions.markerscale) !== null && _styleOptions$markers !== void 0 ? _styleOptions$markers : 1;
|
|
91
100
|
// Generate arrow heads
|
|
92
101
|
if (styleOptions.headmarker) {
|
|
93
|
-
VectorLayerUtils.generateMarkerGeometry(params, styleOptions.headmarker, false, feature, layer, dpi, printScale, printCrs, scaleFactor);
|
|
102
|
+
VectorLayerUtils.generateMarkerGeometry(params, styleOptions.headmarker, false, feature, layer, dpi, printScale, printCrs, scaleFactor * markerScale);
|
|
94
103
|
}
|
|
95
104
|
if (styleOptions.tailmarker) {
|
|
96
|
-
VectorLayerUtils.generateMarkerGeometry(params, styleOptions.tailmarker, true, feature, layer, dpi, printScale, printCrs, scaleFactor);
|
|
105
|
+
VectorLayerUtils.generateMarkerGeometry(params, styleOptions.tailmarker, true, feature, layer, dpi, printScale, printCrs, scaleFactor * markerScale);
|
|
97
106
|
}
|
|
98
107
|
}
|
|
99
108
|
if (feature.geometry.type === "LineString" && !isEmpty(properties.segment_labels)) {
|
|
@@ -180,7 +189,7 @@ var VectorLayerUtils = {
|
|
|
180
189
|
}));
|
|
181
190
|
}).flat();
|
|
182
191
|
} else if (feature.geometry.type === "Polygon") {
|
|
183
|
-
return simplepolygon(feature).features.map(function (feat, idx, features) {
|
|
192
|
+
return simplepolygon(cleanCords(feature)).features.map(function (feat, idx, features) {
|
|
184
193
|
if (feat.properties.parent >= 0) {
|
|
185
194
|
features[feat.properties.parent].geometry.coordinates.push(feat.geometry.coordinates[0]);
|
|
186
195
|
return null;
|