qwc2 2025.12.15 → 2025.12.18

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 (87) hide show
  1. package/components/AttributeForm.js +8 -8
  2. package/components/AttributeTableWidget.js +3 -3
  3. package/components/EditComboField.js +1 -1
  4. package/components/EditUploadField.js +1 -1
  5. package/components/IdentifyViewer.js +91 -38
  6. package/components/LinkFeatureForm.js +21 -4
  7. package/components/MeasureSwitcher.js +115 -0
  8. package/components/PluginsContainer.js +3 -2
  9. package/components/QtDesignerForm.js +2 -2
  10. package/components/ResizeableWindow.js +9 -1
  11. package/components/SearchBox.js +19 -12
  12. package/components/SideBar.js +4 -0
  13. package/components/map3d/drawtool/EditTool3D.js +1 -1
  14. package/components/style/IdentifyViewer.css +8 -6
  15. package/components/style/LocationRecorder.css +1 -6
  16. package/components/style/PluginsContainer.css +11 -6
  17. package/components/timeline/FixedTimeline.js +2 -2
  18. package/components/timeline/InfiniteTimeline.js +2 -2
  19. package/components/timeline/TimelineFeaturesSlider.js +1 -1
  20. package/components/widgets/EditableSelect.js +2 -1
  21. package/components/widgets/LayerCatalogWidget.js +26 -15
  22. package/components/widgets/MenuButton.js +7 -2
  23. package/components/widgets/NavBar.js +4 -2
  24. package/components/widgets/PopupMenu.js +44 -13
  25. package/components/widgets/SearchWidget.js +39 -50
  26. package/components/widgets/style/SearchWidget.css +3 -19
  27. package/package.json +1 -1
  28. package/plugins/Editing.js +20 -5
  29. package/plugins/FeatureForm.js +1 -1
  30. package/plugins/FeatureSearch.js +3 -3
  31. package/plugins/GeometryDigitizer.js +32 -18
  32. package/plugins/HeightProfile.js +4 -1
  33. package/plugins/Identify.js +5 -4
  34. package/plugins/LayerTree.js +5 -1
  35. package/plugins/MapExport.js +4 -4
  36. package/plugins/MapFilter.js +10 -10
  37. package/plugins/Measure.js +5 -1
  38. package/plugins/NewsPopup.js +1 -1
  39. package/plugins/ObliqueView.js +88 -17
  40. package/plugins/Print.js +8 -8
  41. package/plugins/Redlining.js +25 -73
  42. package/plugins/Reports.js +3 -3
  43. package/plugins/Routing.js +4 -4
  44. package/plugins/TopBar.js +2 -0
  45. package/plugins/ValueTool.js +1 -1
  46. package/plugins/View3D.js +2 -2
  47. package/plugins/ZoomButtons.js +1 -1
  48. package/plugins/map/EditingSupport.js +50 -20
  49. package/plugins/map/MeasurementSupport.js +1 -0
  50. package/plugins/map/RedliningSupport.js +9 -7
  51. package/plugins/map/SnapSupport.js +12 -10
  52. package/plugins/map/style/SnappingSupport.css +1 -8
  53. package/plugins/map3d/Draw3D.js +2 -2
  54. package/plugins/map3d/ExportObjects3D.js +2 -2
  55. package/plugins/map3d/MapExport3D.js +4 -4
  56. package/reducers/editing.js +6 -1
  57. package/reducers/layers.js +18 -36
  58. package/reducers/measurement.js +2 -1
  59. package/scripts/wmts_config_generator.py +1 -1
  60. package/static/translations/bg-BG.json +45 -75
  61. package/static/translations/ca-ES.json +45 -75
  62. package/static/translations/cs-CZ.json +45 -75
  63. package/static/translations/de-CH.json +45 -75
  64. package/static/translations/de-DE.json +45 -75
  65. package/static/translations/en-US.json +45 -75
  66. package/static/translations/es-ES.json +45 -75
  67. package/static/translations/fi-FI.json +45 -75
  68. package/static/translations/fr-FR.json +46 -76
  69. package/static/translations/hu-HU.json +45 -75
  70. package/static/translations/it-IT.json +45 -75
  71. package/static/translations/ja-JP.json +45 -75
  72. package/static/translations/nl-NL.json +45 -75
  73. package/static/translations/no-NO.json +45 -75
  74. package/static/translations/pl-PL.json +45 -75
  75. package/static/translations/pt-BR.json +45 -75
  76. package/static/translations/pt-PT.json +45 -75
  77. package/static/translations/ro-RO.json +45 -75
  78. package/static/translations/ru-RU.json +45 -75
  79. package/static/translations/sv-SE.json +45 -75
  80. package/static/translations/tr-TR.json +45 -75
  81. package/static/translations/tsconfig.json +35 -67
  82. package/static/translations/uk-UA.json +45 -75
  83. package/utils/FeatureStyles.js +18 -20
  84. package/utils/IdentifyUtils.js +14 -11
  85. package/utils/MiscUtils.js +2 -1
  86. package/utils/SearchProviders.js +1 -1
  87. package/utils/VectorLayerUtils.js +4 -2
package/plugins/View3D.js CHANGED
@@ -68,11 +68,11 @@ var View3D = /*#__PURE__*/function (_React$Component) {
68
68
  var extraControls = [{
69
69
  icon: "sync",
70
70
  callback: _this.sync2DExtent,
71
- title: LocaleUtils.tr("map3d.syncview")
71
+ title: LocaleUtils.tr("common.sync2dview")
72
72
  }, {
73
73
  icon: "lock",
74
74
  callback: _this.setLockViews,
75
- title: LocaleUtils.tr("map3d.lockview"),
75
+ title: LocaleUtils.tr("common.lock2dview"),
76
76
  active: _this.state.viewsLocked
77
77
  }];
78
78
  if (!_this.state.windowDetached) {
@@ -96,7 +96,7 @@ var ZoomButton = /*#__PURE__*/function (_React$Component) {
96
96
  }
97
97
  var defaultPosition = this.props.direction > 0 ? 4 : 3;
98
98
  var position = this.props.position >= 0 ? this.props.position : defaultPosition;
99
- var tooltip = this.props.direction > 0 ? LocaleUtils.tr("tooltip.zoomin") : LocaleUtils.tr("tooltip.zoomout");
99
+ var tooltip = this.props.direction > 0 ? LocaleUtils.tr("common.zoomin") : LocaleUtils.tr("common.zoomout");
100
100
  var active = this.props.enableZoomByBoxSelection && this.props.currentTask === this.task;
101
101
  return [/*#__PURE__*/React.createElement(MapButton, {
102
102
  active: active,
@@ -35,6 +35,7 @@ import PropTypes from 'prop-types';
35
35
  import { setEditContext } from '../../actions/editing';
36
36
  import LocationRecorder from '../../components/LocationRecorder';
37
37
  import FeatureStyles from "../../utils/FeatureStyles";
38
+ import MeasureUtils from '../../utils/MeasureUtils';
38
39
 
39
40
  /**
40
41
  * Editing support for the map component.
@@ -47,33 +48,33 @@ var EditingSupport = /*#__PURE__*/function (_React$Component) {
47
48
  _defineProperty(_this, "state", {
48
49
  showRecordLocation: false
49
50
  });
50
- _defineProperty(_this, "editStyle", function () {
51
- var geometryFunction = function geometryFunction(feature) {
52
- if (feature.getGeometry().getType() === "Point") {
53
- return new ol.geom.MultiPoint([feature.getGeometry().getCoordinates()]);
54
- } else if (feature.getGeometry().getType() === "LineString") {
55
- return new ol.geom.MultiPoint(feature.getGeometry().getCoordinates());
56
- } else if (feature.getGeometry().getType() === "Polygon") {
57
- return new ol.geom.MultiPoint(feature.getGeometry().getCoordinates()[0]);
58
- } else if (feature.getGeometry().getType() === "MultiPoint") {
59
- return feature.getGeometry();
60
- } else if (feature.getGeometry().getType() === "MultiLineString") {
61
- return new ol.geom.MultiPoint(feature.getGeometry().getCoordinates()[0]);
62
- } else if (feature.getGeometry().getType() === "MultiPolygon") {
63
- return new ol.geom.MultiPoint(feature.getGeometry().getCoordinates()[0][0]);
51
+ _defineProperty(_this, "editStyle", function (feature) {
52
+ var geometryFunction = function geometryFunction(f) {
53
+ if (f.getGeometry().getType() === "Point") {
54
+ return new ol.geom.MultiPoint([f.getGeometry().getCoordinates()]);
55
+ } else if (f.getGeometry().getType() === "LineString") {
56
+ return new ol.geom.MultiPoint(f.getGeometry().getCoordinates());
57
+ } else if (f.getGeometry().getType() === "Polygon") {
58
+ return new ol.geom.MultiPoint(f.getGeometry().getCoordinates()[0]);
59
+ } else if (f.getGeometry().getType() === "MultiPoint") {
60
+ return f.getGeometry();
61
+ } else if (f.getGeometry().getType() === "MultiLineString") {
62
+ return new ol.geom.MultiPoint(f.getGeometry().getCoordinates()[0]);
63
+ } else if (f.getGeometry().getType() === "MultiPolygon") {
64
+ return new ol.geom.MultiPoint(f.getGeometry().getCoordinates()[0][0]);
64
65
  }
65
- return feature.getGeometry();
66
+ return f.getGeometry();
66
67
  };
67
- return [FeatureStyles.interaction(_this.props.editContext.geometryStyle), FeatureStyles.interactionVertex(_objectSpread({
68
+ return [FeatureStyles.interaction(feature, _this.props.editContext.geometryStyle), FeatureStyles.interactionVertex(_objectSpread({
68
69
  geometryFunction: geometryFunction
69
- }, _this.props.editContext.vertexStyle))];
70
+ }, _this.props.editContext.vertexStyle))].flat();
70
71
  });
71
72
  _defineProperty(_this, "createLayer", function () {
72
73
  var source = new ol.source.Vector();
73
74
  _this.layer = new ol.layer.Vector({
74
75
  source: source,
75
76
  zIndex: 1000000,
76
- style: _this.editStyle()
77
+ style: _this.editStyle
77
78
  });
78
79
  _this.props.map.addLayer(_this.layer);
79
80
  });
@@ -88,10 +89,11 @@ var EditingSupport = /*#__PURE__*/function (_React$Component) {
88
89
  condition: function condition(event) {
89
90
  return event.originalEvent.buttons === 1;
90
91
  },
91
- style: _this.editStyle()
92
+ style: _this.editStyle
92
93
  });
93
94
  drawInteraction.on('drawstart', function (evt) {
94
95
  _this.currentFeature = evt.feature;
96
+ _this.currentFeature.on('change', _this.updateMeasurements);
95
97
  }, _this);
96
98
  drawInteraction.on('drawend', function () {
97
99
  _this.setState({
@@ -112,6 +114,8 @@ var EditingSupport = /*#__PURE__*/function (_React$Component) {
112
114
  _this.createLayer();
113
115
  var format = new ol.format.GeoJSON();
114
116
  _this.currentFeature = format.readFeature(_this.props.editContext.feature);
117
+ _this.currentFeature.on('change', _this.updateMeasurements);
118
+ _this.updateMeasurements();
115
119
  _this.layer.getSource().addFeature(_this.currentFeature);
116
120
  var modifyInteraction = new ol.interaction.Modify({
117
121
  features: new ol.Collection([_this.currentFeature]),
@@ -134,6 +138,23 @@ var EditingSupport = /*#__PURE__*/function (_React$Component) {
134
138
  _this.props.map.addInteraction(modifyInteraction);
135
139
  _this.interaction = modifyInteraction;
136
140
  });
141
+ _defineProperty(_this, "updateMeasurements", function () {
142
+ var _this$props$editConte;
143
+ if (!_this.currentFeature) {
144
+ return;
145
+ } else if (!((_this$props$editConte = _this.props.editContext.measurements) !== null && _this$props$editConte !== void 0 && _this$props$editConte.showmeasurements)) {
146
+ _this.currentFeature.set('measurements', undefined);
147
+ _this.currentFeature.set('segment_labels', undefined);
148
+ _this.currentFeature.set('label', undefined);
149
+ } else {
150
+ var settings = {
151
+ displayCrs: _this.props.displayCrs,
152
+ lenUnit: _this.props.editContext.measurements.lenUnit,
153
+ areaUnit: _this.props.editContext.measurements.areaUnit
154
+ };
155
+ MeasureUtils.updateFeatureMeasurements(_this.currentFeature, _this.props.editContext.geomType, _this.props.mapCrs, settings);
156
+ }
157
+ });
137
158
  _defineProperty(_this, "commitCurrentFeature", function () {
138
159
  if (!_this.currentFeature) {
139
160
  return;
@@ -161,6 +182,9 @@ var EditingSupport = /*#__PURE__*/function (_React$Component) {
161
182
  _this.props.map.removeInteraction(_this.interaction);
162
183
  }
163
184
  _this.interaction = null;
185
+ if (_this.currentFeature) {
186
+ _this.currentFeature.un('change', _this.updateMeasurements);
187
+ }
164
188
  _this.currentFeature = null;
165
189
  if (_this.layer) {
166
190
  _this.props.map.removeLayer(_this.layer);
@@ -178,6 +202,8 @@ var EditingSupport = /*#__PURE__*/function (_React$Component) {
178
202
  value: function componentDidUpdate(prevProps) {
179
203
  if (this.props.editContext === prevProps.editContext) {
180
204
  // pass
205
+ } else if (this.props.editContext.measurements !== prevProps.editContext.measurements) {
206
+ this.updateMeasurements();
181
207
  } else if (this.props.editContext.action === 'Pick' && this.props.editContext.feature) {
182
208
  // If a feature without geometry was picked, enter draw mode, otherwise enter edit mode
183
209
  if (!this.props.editContext.feature.geometry && this.props.editContext.geomType) {
@@ -213,13 +239,17 @@ var EditingSupport = /*#__PURE__*/function (_React$Component) {
213
239
  }]);
214
240
  }(React.Component);
215
241
  _defineProperty(EditingSupport, "propTypes", {
242
+ displayCrs: PropTypes.string,
216
243
  editContext: PropTypes.object,
217
244
  map: PropTypes.object,
245
+ mapCrs: PropTypes.string,
218
246
  setEditContext: PropTypes.func
219
247
  });
220
248
  export default connect(function (state) {
221
249
  return {
222
- editContext: state.editing.contexts[state.editing.currentContext] || {}
250
+ editContext: state.editing.contexts[state.editing.currentContext] || {},
251
+ displayCrs: state.map.displayCrs,
252
+ mapCrs: state.map.projection
223
253
  };
224
254
  }, {
225
255
  setEditContext: setEditContext
@@ -179,6 +179,7 @@ var MeasurementSupport = /*#__PURE__*/function (_React$Component) {
179
179
  opts.headmarker = _this.props.measurement.bearingHeadMarker;
180
180
  opts.tailmarker = _this.props.measurement.bearingTailMarker;
181
181
  }
182
+ opts.markerscale = _this.props.measurement.markerScale;
182
183
  return [].concat(_toConsumableArray(FeatureStyles.measureInteraction(feature, opts)), [FeatureStyles.measureInteractionVertex({
183
184
  geometryFunction: geometryFunction
184
185
  })]);
@@ -181,7 +181,7 @@ var RedliningSupport = /*#__PURE__*/function (_React$Component) {
181
181
  var isText = feature.get("shape") === "Text";
182
182
  var styleName = isText ? "text" : "default";
183
183
  var opts = _this.styleOptions(styleProps, isText);
184
- if (!feature.get('measurements')) {
184
+ if (!feature.get('measurements') && _this.selectedFeatures.length <= 1 && !(isText && !styleProps.text)) {
185
185
  feature.set('label', styleProps.text);
186
186
  }
187
187
  feature.set('styleName', styleName);
@@ -189,7 +189,7 @@ var RedliningSupport = /*#__PURE__*/function (_React$Component) {
189
189
  _this.blockOnChange = false;
190
190
  });
191
191
  _defineProperty(_this, "toggleFeatureMeasurements", function (feature) {
192
- if (_this.props.redlining.measurements) {
192
+ if (_this.props.redlining.showmeasurements) {
193
193
  var settings = {
194
194
  displayCrs: _this.props.displayCrs,
195
195
  lenUnit: _this.props.redlining.lenUnit,
@@ -559,7 +559,6 @@ var RedliningSupport = /*#__PURE__*/function (_React$Component) {
559
559
  cloneIds.push(featureObj.id);
560
560
  return featureObj;
561
561
  });
562
- _this.updateRedliningState(true);
563
562
  var layer = {
564
563
  id: _this.props.redlining.layer,
565
564
  title: _this.props.redlining.layerTitle,
@@ -570,7 +569,7 @@ var RedliningSupport = /*#__PURE__*/function (_React$Component) {
570
569
  var features = cloneIds.map(function (id) {
571
570
  return l.getSource().getFeatureById(id);
572
571
  });
573
- _this.selectFeatures(features);
572
+ _this.selectFeatures(features, false);
574
573
  while (_this.interactions.length > 0) {
575
574
  _this.props.map.removeInteraction(_this.interactions.shift());
576
575
  }
@@ -606,13 +605,16 @@ var RedliningSupport = /*#__PURE__*/function (_React$Component) {
606
605
  }
607
606
  });
608
607
  _defineProperty(_this, "selectFeatures", function (features) {
608
+ var updateState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
609
609
  var firstSelection = isEmpty(_this.selectedFeatures);
610
610
  features.forEach(function (feature) {
611
611
  feature.setStyle(_this.styleFunction);
612
612
  feature.on('change', _this.updateMeasurements);
613
613
  _this.selectedFeatures.push(feature);
614
614
  });
615
- _this.updateRedliningState(firstSelection);
615
+ if (updateState) {
616
+ _this.updateRedliningState(firstSelection);
617
+ }
616
618
  });
617
619
  _defineProperty(_this, "deselectFeature", function (feature, updateState) {
618
620
  var styleName = feature.get("shape") === "Text" ? "text" : "default";
@@ -655,7 +657,7 @@ var RedliningSupport = /*#__PURE__*/function (_React$Component) {
655
657
  return featureObj;
656
658
  }).filter(Boolean);
657
659
  if (isEmpty(featureObjects)) {
658
- return null;
660
+ return [];
659
661
  }
660
662
  var layer = {
661
663
  id: redliningProps.layer,
@@ -852,7 +854,7 @@ var RedliningSupport = /*#__PURE__*/function (_React$Component) {
852
854
  this.selectedFeatures.forEach(this.updateFeatureStyle);
853
855
  }
854
856
  // Update current feature measurements
855
- if (this.props.redlining.measurements !== prevProps.redlining.measurements) {
857
+ if (this.props.redlining.showmeasurements !== prevProps.redlining.showmeasurements) {
856
858
  this.selectedFeatures.forEach(this.toggleFeatureMeasurements);
857
859
  } else if (this.props.map.displayCrs !== prevProps.map.displayCrs || this.props.redlining.lenUnit !== prevProps.redlining.lenUnit || this.props.redlining.areaUnit !== prevProps.redlining.areaUnit) {
858
860
  this.selectedFeatures.forEach(function (feature) {
@@ -74,13 +74,13 @@ var SnapSupport = /*#__PURE__*/function (_React$Component) {
74
74
  });
75
75
  _defineProperty(_this, "getFeature", function () {
76
76
  _this.timeoutId = null;
77
- var layers = _this.props.layers.find(function (layer) {
78
- return layer.role === LayerRole.THEME;
77
+ var layer = _this.props.layers.find(function (l) {
78
+ return l.role === LayerRole.THEME;
79
79
  });
80
- var queryLayers = _this.props.layers.reduce(function (accum, layer) {
81
- return layer.role === LayerRole.THEME ? accum.concat(layer.queryLayers) : accum;
80
+ var queryLayers = _this.props.layers.reduce(function (accum, l) {
81
+ return l.role === LayerRole.THEME ? accum.concat(l.queryLayers) : accum;
82
82
  }, []).join(",");
83
- if (!layers || !queryLayers) {
83
+ if (!layer || !queryLayers) {
84
84
  return;
85
85
  }
86
86
  var options = {
@@ -90,11 +90,11 @@ var SnapSupport = /*#__PURE__*/function (_React$Component) {
90
90
  FI_LINE_TOLERANCE: 8,
91
91
  FI_POLYGON_TOLERANCE: 4
92
92
  };
93
- var request = IdentifyUtils.buildRequest(layers, queryLayers, _this.state.mousePos.coordinate, _this.props.mapObj, options);
93
+ var request = IdentifyUtils.buildRequest(layer, queryLayers, _this.state.mousePos.coordinate, _this.props.mapObj, options);
94
94
  axios.get(request.url, {
95
95
  params: request.params
96
96
  }).then(function (response) {
97
- var results = IdentifyUtils.parseXmlResponse(response.data, _this.props.mapObj.projection, layers);
97
+ var results = IdentifyUtils.parseXmlResponse(response.data, _this.props.mapObj.projection, layer);
98
98
  var features = [];
99
99
  results.forEach(function (result) {
100
100
  var _iterator2 = _createForOfIteratorHelper(result),
@@ -159,9 +159,11 @@ var SnapSupport = /*#__PURE__*/function (_React$Component) {
159
159
  _this.snapLayer = new ol.layer.Vector({
160
160
  source: _this.snapSource,
161
161
  zIndex: 1000000,
162
- style: [FeatureStyles.interaction({}, true), FeatureStyles.interactionVertex({
163
- geometryFunction: geometryFunction
164
- }, true)]
162
+ style: function style(feature) {
163
+ return [FeatureStyles.interaction(feature, {}, true), FeatureStyles.interactionVertex({
164
+ geometryFunction: geometryFunction
165
+ }, true)].flat();
166
+ }
165
167
  });
166
168
  _this.props.map.addLayer(_this.snapLayer);
167
169
  _this.curPos = null;
@@ -1,13 +1,6 @@
1
1
  div.snapping-toolbar {
2
- display: inline-flex;
2
+ display: flex;
3
3
  align-items: center;
4
- line-height: 1.5em;
5
- position: relative;
6
- padding: 0.25em 0.5em;
7
- order: 0;
8
- background-color: var(--container-bg-color);
9
- box-shadow: 0px -2px 4px rgba(136, 136, 136, 0.5);
10
- border-bottom: 1px solid rgba(136, 136, 136, 0.5);
11
4
  }
12
5
 
13
6
  div.snapping-toolbar-container div.spinner {
@@ -174,7 +174,7 @@ var Draw3D = /*#__PURE__*/function (_React$Component) {
174
174
  }]];
175
175
  var editButtons = [{
176
176
  key: "Pick",
177
- tooltip: LocaleUtils.tr("draw3d.pick"),
177
+ tooltip: LocaleUtils.tr("common.pick"),
178
178
  icon: "nodetool",
179
179
  data: {
180
180
  action: "Pick",
@@ -182,7 +182,7 @@ var Draw3D = /*#__PURE__*/function (_React$Component) {
182
182
  }
183
183
  }, {
184
184
  key: "Delete",
185
- tooltip: LocaleUtils.tr("draw3d.delete"),
185
+ tooltip: LocaleUtils.tr("common.delete"),
186
186
  icon: "trash",
187
187
  data: {
188
188
  action: "Delete",
@@ -107,7 +107,7 @@ var ExportObjects3D = /*#__PURE__*/function (_React$Component) {
107
107
  onSubmit: _this.exportArea
108
108
  }, /*#__PURE__*/React.createElement("table", {
109
109
  className: "options-table"
110
- }, /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, LocaleUtils.tr("mapexport.format")), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("select", {
110
+ }, /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, LocaleUtils.tr("common.format")), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("select", {
111
111
  name: "FORMAT",
112
112
  onChange: _this.formatChanged,
113
113
  value: _this.state.selectedFormat
@@ -127,7 +127,7 @@ var ExportObjects3D = /*#__PURE__*/function (_React$Component) {
127
127
  type: "submit"
128
128
  }, _this.state.exporting ? /*#__PURE__*/React.createElement("span", {
129
129
  className: "mapexport-wait"
130
- }, /*#__PURE__*/React.createElement(Spinner, null), " ", LocaleUtils.tr("mapexport.wait")) : LocaleUtils.tr("mapexport.submit")))));
130
+ }, /*#__PURE__*/React.createElement(Spinner, null), " ", LocaleUtils.tr("common.wait")) : LocaleUtils.tr("common.export")))));
131
131
  });
132
132
  _defineProperty(_this, "restart", function () {
133
133
  if (_this.abortController) {
@@ -191,7 +191,7 @@ var MapExport3D = /*#__PURE__*/function (_React$Component) {
191
191
  onSubmit: _this["export"]
192
192
  }, /*#__PURE__*/React.createElement("table", {
193
193
  className: "options-table"
194
- }, /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, LocaleUtils.tr("mapexport.format")), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("select", {
194
+ }, /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, LocaleUtils.tr("common.format")), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("select", {
195
195
  name: "FORMAT",
196
196
  onChange: _this.formatChanged,
197
197
  value: _this.state.selectedFormat
@@ -211,7 +211,7 @@ var MapExport3D = /*#__PURE__*/function (_React$Component) {
211
211
  key: item.name,
212
212
  value: item.name
213
213
  }, item.name.split('/').pop());
214
- })))) : null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, LocaleUtils.tr("mapexport.resolution")), /*#__PURE__*/React.createElement("td", null, resolutionChooser)), _this.state.selectedFormat === 'application/pdf' ? (((_this$state$layout2 = _this.state.layout) === null || _this$state$layout2 === void 0 ? void 0 : _this$state$layout2.labels) || []).map(function (label) {
214
+ })))) : null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, LocaleUtils.tr("common.resolution")), /*#__PURE__*/React.createElement("td", null, resolutionChooser)), _this.state.selectedFormat === 'application/pdf' ? (((_this$state$layout2 = _this.state.layout) === null || _this$state$layout2 === void 0 ? void 0 : _this$state$layout2.labels) || []).map(function (label) {
215
215
  var _this$props$theme$pri4;
216
216
  // Omit labels which start with __
217
217
  if (label.startsWith("__")) {
@@ -278,7 +278,7 @@ var MapExport3D = /*#__PURE__*/function (_React$Component) {
278
278
  type: "submit"
279
279
  }, _this.state.exporting ? /*#__PURE__*/React.createElement("span", {
280
280
  className: "mapexport-wait"
281
- }, /*#__PURE__*/React.createElement(Spinner, null), " ", LocaleUtils.tr("mapexport.wait")) : LocaleUtils.tr("mapexport.submit")))));
281
+ }, /*#__PURE__*/React.createElement(Spinner, null), " ", LocaleUtils.tr("common.wait")) : LocaleUtils.tr("common.export")))));
282
282
  });
283
283
  _defineProperty(_this, "onFrameChanged", function (frame) {
284
284
  var x = frame.x,
@@ -450,7 +450,7 @@ var MapExport3D = /*#__PURE__*/function (_React$Component) {
450
450
  key: "render",
451
451
  value: function render() {
452
452
  var _this2 = this;
453
- var minMaxTooltip = this.state.minimized ? LocaleUtils.tr("print.maximize") : LocaleUtils.tr("print.minimize");
453
+ var minMaxTooltip = this.state.minimized ? LocaleUtils.tr("window.maximize") : LocaleUtils.tr("window.minimize");
454
454
  var minMaxIcon = this.state.minimized ? 'chevron-down' : 'chevron-up';
455
455
  var extraTitlebarContent = /*#__PURE__*/React.createElement(Icon, {
456
456
  className: "mapexport-minimize-maximize",
@@ -52,7 +52,12 @@ export default function editing() {
52
52
  feature: null,
53
53
  changed: false,
54
54
  mapPrefix: null,
55
- editConfig: null
55
+ editConfig: null,
56
+ measurements: {
57
+ showmeasurements: false,
58
+ lenUnit: 'metric',
59
+ areaUnit: 'metric'
60
+ }
56
61
  }, state.contexts[action.contextId]), action.editContext), {}, {
57
62
  geomNonZeroZ: checkNonZeroZ(state.contexts[action.contextId], action.editContext),
58
63
  geomReadOnly: checkGeomReadOnly(editConfig),
@@ -1,10 +1,9 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
2
  function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
3
3
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
4
5
  function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
5
6
  function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
6
- function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
7
- function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
8
7
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
9
8
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
10
9
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -175,20 +174,12 @@ export default function layers() {
175
174
  // Compress layers if possible
176
175
  _newLayers2 = LayerUtils.implodeLayers(LayerUtils.explodeLayers(_newLayers2));
177
176
  }
178
- var _iterator = _createForOfIteratorHelper(_newLayers2),
179
- _step;
180
- try {
181
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
182
- var lyr = _step.value;
183
- if (lyr.type === "wms") {
184
- Object.assign(lyr, LayerUtils.buildWMSLayerParams(lyr, state.filter));
185
- }
177
+ _newLayers2 = _newLayers2.map(function (layer) {
178
+ if (layer.type === "wms") {
179
+ return _objectSpread(_objectSpread({}, layer), LayerUtils.buildWMSLayerParams(layer, state.filter));
186
180
  }
187
- } catch (err) {
188
- _iterator.e(err);
189
- } finally {
190
- _iterator.f();
191
- }
181
+ return layer;
182
+ });
192
183
  UrlParams.updateParams({
193
184
  l: LayerUtils.buildWMSLayerUrlParam(_newLayers2)
194
185
  });
@@ -208,21 +199,12 @@ export default function layers() {
208
199
  }
209
200
  case ADD_LAYER_SEPARATOR:
210
201
  {
211
- var _newLayers3 = LayerUtils.insertSeparator(state.flat, action.title, action.afterLayerId, action.afterSublayerPath);
212
- var _iterator2 = _createForOfIteratorHelper(_newLayers3),
213
- _step2;
214
- try {
215
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
216
- var layer = _step2.value;
217
- if (layer.type === "wms") {
218
- Object.assign(layer, LayerUtils.buildWMSLayerParams(layer, state.filter));
219
- }
202
+ var _newLayers3 = LayerUtils.insertSeparator(state.flat, action.title, action.afterLayerId, action.afterSublayerPath).map(function (layer) {
203
+ if (layer.type === "wms") {
204
+ return _objectSpread(_objectSpread({}, layer), LayerUtils.buildWMSLayerParams(layer, state.filter));
220
205
  }
221
- } catch (err) {
222
- _iterator2.e(err);
223
- } finally {
224
- _iterator2.f();
225
- }
206
+ return layer;
207
+ });
226
208
  UrlParams.updateParams({
227
209
  l: LayerUtils.buildWMSLayerUrlParam(_newLayers3)
228
210
  });
@@ -232,30 +214,30 @@ export default function layers() {
232
214
  }
233
215
  case REMOVE_LAYER:
234
216
  {
235
- var _layer = state.flat.find(function (l) {
217
+ var layer = state.flat.find(function (l) {
236
218
  return l.id === action.layerId;
237
219
  });
238
- if (!_layer) {
220
+ if (!layer) {
239
221
  return state;
240
222
  }
241
223
  var _newLayers4 = state.flat;
242
224
  var _newEditConfigs = state.editConfigs;
243
- if (_layer.role === LayerRole.BACKGROUND || isEmpty(action.sublayerpath)) {
225
+ if (layer.role === LayerRole.BACKGROUND || isEmpty(action.sublayerpath)) {
244
226
  var position = state.flat.findIndex(function (l) {
245
227
  return l.id === action.layerId;
246
228
  });
247
229
  _newLayers4 = _toConsumableArray(_newLayers4);
248
230
  _newLayers4.splice(position, 1);
249
- if (position > 0 && position < _newLayers4.length && _newLayers4[position - 1].id === _newLayers4[position].id) {
231
+ if (position > 0 && position < _newLayers4.length && _newLayers4[position - 1].url && _newLayers4[position - 1].url === _newLayers4[position].url) {
250
232
  // Compress layers
251
233
  _newLayers4 = LayerUtils.implodeLayers(LayerUtils.explodeLayers(_newLayers4));
252
234
  }
253
- if (_newEditConfigs[_layer.wms_name]) {
235
+ if (_newEditConfigs[layer.wms_name]) {
254
236
  _newEditConfigs = _objectSpread({}, _newEditConfigs);
255
- delete _newEditConfigs[_layer.wms_name];
237
+ delete _newEditConfigs[layer.wms_name];
256
238
  }
257
239
  } else {
258
- _newLayers4 = LayerUtils.removeLayer(state.flat, _layer, action.sublayerpath).map(function (l) {
240
+ _newLayers4 = LayerUtils.removeLayer(state.flat, layer, action.sublayerpath).map(function (l) {
259
241
  if (l.type === "wms") {
260
242
  return _objectSpread(_objectSpread({}, l), LayerUtils.buildWMSLayerParams(l, state.filter));
261
243
  } else {
@@ -39,7 +39,8 @@ export default function measurement() {
39
39
  bearingHeadMarker: state.bearingHeadMarker,
40
40
  bearingTailMarker: state.bearingTailMarker,
41
41
  lineHeadMarker: state.lineHeadMarker,
42
- lineTailMarker: state.lineTailMarker
42
+ lineTailMarker: state.lineTailMarker,
43
+ markerScale: state.markerScale
43
44
  }, action.data);
44
45
  }
45
46
  default:
@@ -126,7 +126,7 @@ if not styleIdentifier:
126
126
  break
127
127
 
128
128
  # Resource URL
129
- tileUrl = None
129
+ tileUrl = capabilitiesUrl.split("?")[0]
130
130
  for resourceURL in targetLayer.getElementsByTagName("ResourceURL"):
131
131
  if resourceURL.getAttribute("resourceType") == "tile":
132
132
  tileUrl = resourceURL.getAttribute("template")