qwc2 2026.8.28 → 2026.8.31
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/AttributeTableWidget.js +10 -13
- package/components/IdentifyViewer.js +46 -38
- package/components/SearchBox.js +2 -1
- package/package.json +1 -1
- package/plugins/MapFilter.js +3 -6
- package/utils/FeatureStyles.js +27 -12
|
@@ -216,7 +216,7 @@ var AttributeTableWidget = /*#__PURE__*/function (_React$Component) {
|
|
|
216
216
|
var forceReload = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
217
217
|
var stateChange = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
218
218
|
_this.setState(function (state) {
|
|
219
|
-
var _this$props$filter$fi, _newState$curEditConf, _fieldMap$newState$fi, _fieldMap$newState$so, _newState$sortField;
|
|
219
|
+
var _this$props$layers$fi, _this$props$layers$fi2, _this$props$filter$fi, _newState$curEditConf, _fieldMap$newState$fi, _fieldMap$newState$so, _newState$sortField;
|
|
220
220
|
selectedLayer = selectedLayer || state.selectedLayer;
|
|
221
221
|
var _selectedLayer$split = selectedLayer.split("#"),
|
|
222
222
|
_selectedLayer$split2 = _slicedToArray(_selectedLayer$split, 2),
|
|
@@ -224,27 +224,27 @@ var AttributeTableWidget = /*#__PURE__*/function (_React$Component) {
|
|
|
224
224
|
layerName = _selectedLayer$split2[1];
|
|
225
225
|
var newState = _objectSpread(_objectSpread({}, state), stateChange);
|
|
226
226
|
var editConfig = _this.props.editConfigs[wmsName][layerName];
|
|
227
|
+
var fieldTranslations = (_this$props$layers$fi = (_this$props$layers$fi2 = _this.props.layers.find(function (layer) {
|
|
228
|
+
return layer.wms_name === wmsName;
|
|
229
|
+
})) === null || _this$props$layers$fi2 === void 0 || (_this$props$layers$fi2 = _this$props$layers$fi2.translations) === null || _this$props$layers$fi2 === void 0 || (_this$props$layers$fi2 = _this$props$layers$fi2.layers) === null || _this$props$layers$fi2 === void 0 || (_this$props$layers$fi2 = _this$props$layers$fi2[layerName]) === null || _this$props$layers$fi2 === void 0 ? void 0 : _this$props$layers$fi2.fields) !== null && _this$props$layers$fi !== void 0 ? _this$props$layers$fi : {};
|
|
227
230
|
var fields = (_this.props.showDisplayFieldOnly ? editConfig.fields.filter(function (field) {
|
|
228
231
|
return field.name === editConfig.displayField;
|
|
229
232
|
}) : editConfig.fields.filter(function (field) {
|
|
230
233
|
var _field$constraints;
|
|
231
234
|
return _this.props.showHiddenFields || ((_field$constraints = field.constraints) === null || _field$constraints === void 0 ? void 0 : _field$constraints.hidden) !== true;
|
|
232
235
|
})).map(function (field) {
|
|
236
|
+
var _fieldTranslations$fi;
|
|
233
237
|
return _objectSpread(_objectSpread({}, field), {}, {
|
|
234
|
-
name:
|
|
238
|
+
name: (_fieldTranslations$fi = fieldTranslations === null || fieldTranslations === void 0 ? void 0 : fieldTranslations[field.name]) !== null && _fieldTranslations$fi !== void 0 ? _fieldTranslations$fi : field.name
|
|
235
239
|
});
|
|
236
240
|
});
|
|
237
241
|
if (selectedLayer !== state.loadedLayer) {
|
|
238
|
-
var _this$props$layers$fi, _this$props$layers$fi2;
|
|
239
242
|
KeyValCache.clear();
|
|
240
243
|
FeatureCache.clear();
|
|
241
244
|
Object.assign(newState, AttributeTableWidget.defaultState);
|
|
242
245
|
newState.limitToExtent = state.limitToExtent;
|
|
243
246
|
newState.curEditConfig = editConfig;
|
|
244
247
|
newState.curFields = fields;
|
|
245
|
-
newState.fieldTranslations = (_this$props$layers$fi = (_this$props$layers$fi2 = _this.props.layers.find(function (layer) {
|
|
246
|
-
return layer.wms_name === wmsName;
|
|
247
|
-
})) === null || _this$props$layers$fi2 === void 0 || (_this$props$layers$fi2 = _this$props$layers$fi2.translations) === null || _this$props$layers$fi2 === void 0 || (_this$props$layers$fi2 = _this$props$layers$fi2.layers) === null || _this$props$layers$fi2 === void 0 || (_this$props$layers$fi2 = _this$props$layers$fi2[layerName]) === null || _this$props$layers$fi2 === void 0 ? void 0 : _this$props$layers$fi2.fields) !== null && _this$props$layers$fi !== void 0 ? _this$props$layers$fi : {};
|
|
248
248
|
}
|
|
249
249
|
newState.selectedLayer = selectedLayer;
|
|
250
250
|
newState.selectedFeatures = {};
|
|
@@ -707,10 +707,6 @@ var AttributeTableWidget = /*#__PURE__*/function (_React$Component) {
|
|
|
707
707
|
}, options);
|
|
708
708
|
}
|
|
709
709
|
});
|
|
710
|
-
_defineProperty(_this, "translateFieldName", function (fieldName) {
|
|
711
|
-
var _this$state$fieldTran, _this$state$fieldTran2;
|
|
712
|
-
return (_this$state$fieldTran = (_this$state$fieldTran2 = _this.state.fieldTranslations) === null || _this$state$fieldTran2 === void 0 ? void 0 : _this$state$fieldTran2[fieldName]) !== null && _this$state$fieldTran !== void 0 ? _this$state$fieldTran : fieldName;
|
|
713
|
-
});
|
|
714
710
|
_this.changedFiles = {};
|
|
715
711
|
_this.state = AttributeTableWidget.defaultState;
|
|
716
712
|
_this.table = null;
|
|
@@ -886,12 +882,14 @@ var AttributeTableWidget = /*#__PURE__*/function (_React$Component) {
|
|
|
886
882
|
value: ""
|
|
887
883
|
}, LocaleUtils.tr("common.select")), showIdColumn ? /*#__PURE__*/React.createElement("div", {
|
|
888
884
|
value: "<id>"
|
|
889
|
-
}, this.
|
|
885
|
+
}, this.state.curFields.find(function (field) {
|
|
886
|
+
return field.id === primaryKey;
|
|
887
|
+
}).name) : null, this.state.curFields.map(function (field) {
|
|
890
888
|
if (field.id !== primaryKey) {
|
|
891
889
|
return /*#__PURE__*/React.createElement("option", {
|
|
892
890
|
key: field.id,
|
|
893
891
|
value: field.id
|
|
894
|
-
},
|
|
892
|
+
}, field.name);
|
|
895
893
|
}
|
|
896
894
|
return null;
|
|
897
895
|
})), /*#__PURE__*/React.createElement(ComboBox, {
|
|
@@ -1129,7 +1127,6 @@ _defineProperty(AttributeTableWidget, "defaultState", {
|
|
|
1129
1127
|
loadedLayer: "",
|
|
1130
1128
|
curEditConfig: null,
|
|
1131
1129
|
curFields: null,
|
|
1132
|
-
fieldTranslations: null,
|
|
1133
1130
|
features: [],
|
|
1134
1131
|
allFeatures: null,
|
|
1135
1132
|
totFeatureCount: 0,
|
|
@@ -45,6 +45,7 @@ import { LayerRole, addLayerFeatures, removeLayer, changeLayerProperty } from '.
|
|
|
45
45
|
import { zoomToPoint, zoomToExtent } from '../actions/map';
|
|
46
46
|
import { openExternalUrl } from '../actions/windows';
|
|
47
47
|
import ConfigUtils from '../utils/ConfigUtils';
|
|
48
|
+
import { defaultHighlightStyle } from '../utils/FeatureStyles';
|
|
48
49
|
import { IdentifyExporters } from '../utils/IdentifyExporters';
|
|
49
50
|
import LayerUtils from '../utils/LayerUtils';
|
|
50
51
|
import LocaleUtils from '../utils/LocaleUtils';
|
|
@@ -136,15 +137,10 @@ var IdentifyViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
136
137
|
});
|
|
137
138
|
});
|
|
138
139
|
_defineProperty(_this, "setHighlightedFeatures", function (features) {
|
|
139
|
-
if (isEmpty(features)) {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}).flat();
|
|
144
|
-
} else if (_this.props.highlightAllResults) {
|
|
145
|
-
var resultTree = _this.state.selectedLayer !== '' ? _defineProperty({}, _this.state.selectedLayer, _this.state.resultTree[_this.state.selectedLayer]) : _this.state.resultTree;
|
|
146
|
-
features = Object.values(resultTree).flat();
|
|
147
|
-
}
|
|
140
|
+
if (isEmpty(features) && !isEmpty(_this.state.tableSelection)) {
|
|
141
|
+
features = Object.values(_this.state.tableSelection).map(function (sel) {
|
|
142
|
+
return Object.values(sel);
|
|
143
|
+
}).flat();
|
|
148
144
|
}
|
|
149
145
|
if (!isEmpty(features)) {
|
|
150
146
|
features = features.filter(function (f) {
|
|
@@ -156,12 +152,13 @@ var IdentifyViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
156
152
|
};
|
|
157
153
|
});
|
|
158
154
|
var layer = {
|
|
159
|
-
id: "
|
|
160
|
-
role: LayerRole.SELECTION
|
|
155
|
+
id: "__identifyhighlight",
|
|
156
|
+
role: LayerRole.SELECTION,
|
|
157
|
+
styleOptions: defaultHighlightStyle()
|
|
161
158
|
};
|
|
162
159
|
_this.props.addLayerFeatures(layer, features, true);
|
|
163
160
|
} else {
|
|
164
|
-
_this.props.removeLayer("
|
|
161
|
+
_this.props.removeLayer("__identifyhighlight");
|
|
165
162
|
}
|
|
166
163
|
});
|
|
167
164
|
_defineProperty(_this, "removeResultLayer", function (layerid) {
|
|
@@ -205,10 +202,10 @@ var IdentifyViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
205
202
|
var clipboard = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
206
203
|
var filteredResults = {};
|
|
207
204
|
if (!isEmpty(_this.state.tableSelection)) {
|
|
208
|
-
filteredResults = Object.fromEntries(Object.entries(_this.state.tableSelection).map(function (
|
|
209
|
-
var
|
|
210
|
-
layerid =
|
|
211
|
-
entries =
|
|
205
|
+
filteredResults = Object.fromEntries(Object.entries(_this.state.tableSelection).map(function (_ref3) {
|
|
206
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
207
|
+
layerid = _ref4[0],
|
|
208
|
+
entries = _ref4[1];
|
|
212
209
|
return [layerid, Object.values(entries)];
|
|
213
210
|
}));
|
|
214
211
|
} else if (_this.state.selectedResults.size() > 0) {
|
|
@@ -246,10 +243,10 @@ var IdentifyViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
246
243
|
});
|
|
247
244
|
if (exporter) {
|
|
248
245
|
if (!_this.props.exportGeometry) {
|
|
249
|
-
json = Object.entries(json).reduce(function (res,
|
|
250
|
-
var
|
|
251
|
-
layerId =
|
|
252
|
-
features =
|
|
246
|
+
json = Object.entries(json).reduce(function (res, _ref6) {
|
|
247
|
+
var _ref7 = _slicedToArray(_ref6, 2),
|
|
248
|
+
layerId = _ref7[0],
|
|
249
|
+
features = _ref7[1];
|
|
253
250
|
return _objectSpread(_objectSpread({}, res), {}, _defineProperty({}, layerId, features.map(function (feature) {
|
|
254
251
|
return MiscUtils.objectOmit(feature, ['geometry']);
|
|
255
252
|
})));
|
|
@@ -277,10 +274,10 @@ var IdentifyViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
277
274
|
style: {
|
|
278
275
|
maxHeight: _this.state.currentResult ? '10em' : 'initial'
|
|
279
276
|
}
|
|
280
|
-
}, Object.entries(_this.state.resultTree).map(function (
|
|
281
|
-
var
|
|
282
|
-
layerid =
|
|
283
|
-
features =
|
|
277
|
+
}, Object.entries(_this.state.resultTree).map(function (_ref8) {
|
|
278
|
+
var _ref9 = _slicedToArray(_ref8, 2),
|
|
279
|
+
layerid = _ref9[0],
|
|
280
|
+
features = _ref9[1];
|
|
284
281
|
if (features.length === 0) {
|
|
285
282
|
return null;
|
|
286
283
|
}
|
|
@@ -561,19 +558,19 @@ var IdentifyViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
561
558
|
_defineProperty(_this, "renderResultsTable", function () {
|
|
562
559
|
return /*#__PURE__*/React.createElement("div", {
|
|
563
560
|
className: "identify-results-tables"
|
|
564
|
-
}, Object.entries(_this.state.resultTree).map(function (
|
|
565
|
-
var
|
|
566
|
-
layerid =
|
|
567
|
-
features =
|
|
561
|
+
}, Object.entries(_this.state.resultTree).map(function (_ref0) {
|
|
562
|
+
var _ref1 = _slicedToArray(_ref0, 2),
|
|
563
|
+
layerid = _ref1[0],
|
|
564
|
+
features = _ref1[1];
|
|
568
565
|
if (features.length === 0 || _this.state.selectedLayer && layerid !== _this.state.selectedLayer) {
|
|
569
566
|
return null;
|
|
570
567
|
}
|
|
571
568
|
var fields = {};
|
|
572
569
|
features.map(function (feature) {
|
|
573
|
-
Object.entries(feature.properties).map(function (
|
|
574
|
-
var
|
|
575
|
-
attr =
|
|
576
|
-
value =
|
|
570
|
+
Object.entries(feature.properties).map(function (_ref10) {
|
|
571
|
+
var _ref11 = _slicedToArray(_ref10, 2),
|
|
572
|
+
attr = _ref11[0],
|
|
573
|
+
value = _ref11[1];
|
|
577
574
|
if (!(attr in fields) && !['htmlContent', 'htmlContentInline'].includes(attr)) {
|
|
578
575
|
fields[attr] = {
|
|
579
576
|
id: attr,
|
|
@@ -843,10 +840,10 @@ var IdentifyViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
843
840
|
}, /*#__PURE__*/React.createElement("option", {
|
|
844
841
|
disabled: true,
|
|
845
842
|
value: ""
|
|
846
|
-
}, LocaleUtils.tr("identify.selectreport")), Object.entries(_this.state.reports).map(function (
|
|
847
|
-
var
|
|
848
|
-
layername =
|
|
849
|
-
reports =
|
|
843
|
+
}, LocaleUtils.tr("identify.selectreport")), Object.entries(_this.state.reports).map(function (_ref13) {
|
|
844
|
+
var _ref14 = _slicedToArray(_ref13, 2),
|
|
845
|
+
layername = _ref14[0],
|
|
846
|
+
reports = _ref14[1];
|
|
850
847
|
return reports.map(function (report, idx) {
|
|
851
848
|
return /*#__PURE__*/React.createElement("option", {
|
|
852
849
|
key: layername + "::" + idx,
|
|
@@ -1127,14 +1124,23 @@ var IdentifyViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
1127
1124
|
this.scrollIntoView = false;
|
|
1128
1125
|
this.currentResultElRef = null;
|
|
1129
1126
|
}
|
|
1130
|
-
// Ensure currentPage is in range
|
|
1131
1127
|
if (this.state.resultTree !== prevState.resultTree || this.state.selectedLayer !== prevState.selectedLayer) {
|
|
1128
|
+
// Ensure currentPage is in range
|
|
1132
1129
|
var count = Object.values(this.state.selectedLayer !== '' ? _defineProperty({}, this.state.selectedLayer, this.state.resultTree[this.state.selectedLayer]) : this.state.resultTree).flat().length;
|
|
1133
1130
|
this.setState(function (state) {
|
|
1134
1131
|
return {
|
|
1135
1132
|
currentPage: Math.max(0, Math.min(state.currentPage, count - 1))
|
|
1136
1133
|
};
|
|
1137
1134
|
});
|
|
1135
|
+
// Highlight features
|
|
1136
|
+
if (this.props.highlightAllResults) {
|
|
1137
|
+
var resultTree = this.state.selectedLayer !== '' ? _defineProperty({}, this.state.selectedLayer, this.state.resultTree[this.state.selectedLayer]) : this.state.resultTree;
|
|
1138
|
+
var layer = {
|
|
1139
|
+
id: "__identifyselection",
|
|
1140
|
+
role: LayerRole.SELECTION
|
|
1141
|
+
};
|
|
1142
|
+
this.props.addLayerFeatures(layer, Object.values(resultTree).flat(), true);
|
|
1143
|
+
}
|
|
1138
1144
|
}
|
|
1139
1145
|
if (this.state.multiViewEnabled !== prevState.multiViewEnabled) {
|
|
1140
1146
|
this.computePageSize(this.bodyEl.getBoundingClientRect());
|
|
@@ -1144,7 +1150,8 @@ var IdentifyViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
1144
1150
|
key: "componentWillUnmount",
|
|
1145
1151
|
value: function componentWillUnmount() {
|
|
1146
1152
|
this.props.innerRef(null);
|
|
1147
|
-
this.props.removeLayer("
|
|
1153
|
+
this.props.removeLayer("__identifyselection");
|
|
1154
|
+
this.props.removeLayer("__identifyhighlight");
|
|
1148
1155
|
unregisterPermalinkDataStoreHook("identifyresultstate");
|
|
1149
1156
|
}
|
|
1150
1157
|
}, {
|
|
@@ -1267,6 +1274,7 @@ _defineProperty(IdentifyViewer, "defaultProps", {
|
|
|
1267
1274
|
return value;
|
|
1268
1275
|
},
|
|
1269
1276
|
enableAggregatedReports: true,
|
|
1277
|
+
innerRef: function innerRef() {},
|
|
1270
1278
|
resultDisplayMode: 'flat',
|
|
1271
1279
|
resultGridSize: 200,
|
|
1272
1280
|
resultMultiDisplay: false,
|
package/components/SearchBox.js
CHANGED
|
@@ -52,6 +52,7 @@ import { openExternalUrl, showNotification } from '../actions/windows';
|
|
|
52
52
|
import searchProvidersSelector from '../selectors/searchproviders';
|
|
53
53
|
import ConfigUtils from '../utils/ConfigUtils';
|
|
54
54
|
import CoordinatesUtils from '../utils/CoordinatesUtils';
|
|
55
|
+
import { defaultHighlightStyle } from '../utils/FeatureStyles';
|
|
55
56
|
import LayerUtils from '../utils/LayerUtils';
|
|
56
57
|
import LocaleUtils from '../utils/LocaleUtils';
|
|
57
58
|
import MapUtils from '../utils/MapUtils';
|
|
@@ -1083,7 +1084,7 @@ var SearchBox = /*#__PURE__*/function (_React$Component) {
|
|
|
1083
1084
|
label: label
|
|
1084
1085
|
}),
|
|
1085
1086
|
styleName: 'default',
|
|
1086
|
-
styleOptions: _this.props.searchOptions.highlightStyle
|
|
1087
|
+
styleOptions: _objectSpread(_objectSpread({}, defaultHighlightStyle()), _this.props.searchOptions.highlightStyle)
|
|
1087
1088
|
}));
|
|
1088
1089
|
}
|
|
1089
1090
|
if (showMarkers) {
|
package/package.json
CHANGED
package/plugins/MapFilter.js
CHANGED
|
@@ -54,6 +54,7 @@ import TextInput from '../components/widgets/TextInput';
|
|
|
54
54
|
import ToggleSwitch from '../components/widgets/ToggleSwitch';
|
|
55
55
|
import ConfigUtils from '../utils/ConfigUtils';
|
|
56
56
|
import DataServiceExprUtils from '../utils/DataServiceExprUtils';
|
|
57
|
+
import { defaultHighlightStyle } from '../utils/FeatureStyles';
|
|
57
58
|
import LayerUtils from '../utils/LayerUtils';
|
|
58
59
|
import LocaleUtils from '../utils/LocaleUtils';
|
|
59
60
|
import MiscUtils from '../utils/MiscUtils';
|
|
@@ -800,7 +801,7 @@ var MapFilter = /*#__PURE__*/function (_React$Component) {
|
|
|
800
801
|
});
|
|
801
802
|
},
|
|
802
803
|
featurePicked: this.filterGeomPicked,
|
|
803
|
-
highlightStyle: this.props.highlightStyle,
|
|
804
|
+
highlightStyle: _objectSpread(_objectSpread({}, defaultHighlightStyle()), this.props.highlightStyle),
|
|
804
805
|
key: "FeaturePicker"
|
|
805
806
|
}) : null, /*#__PURE__*/React.createElement(MapSelection, {
|
|
806
807
|
active: taskActive && !!selGeomType,
|
|
@@ -847,11 +848,7 @@ _defineProperty(MapFilter, "propTypes", {
|
|
|
847
848
|
_defineProperty(MapFilter, "defaultProps", {
|
|
848
849
|
allowFilterByTime: true,
|
|
849
850
|
position: 5,
|
|
850
|
-
predefinedFilters: []
|
|
851
|
-
highlightStyle: {
|
|
852
|
-
strokeColor: [0, 0, 0],
|
|
853
|
-
fillColor: [255, 255, 0, 0.25]
|
|
854
|
-
}
|
|
851
|
+
predefinedFilters: []
|
|
855
852
|
});
|
|
856
853
|
export default connect(function (state) {
|
|
857
854
|
return {
|
package/utils/FeatureStyles.js
CHANGED
|
@@ -36,6 +36,12 @@ var DEFAULT_FEATURE_STYLE = {
|
|
|
36
36
|
textStroke: "white",
|
|
37
37
|
textFont: "11pt sans-serif"
|
|
38
38
|
};
|
|
39
|
+
var DEFAULT_HIGHLIGHT_STYLE = _objectSpread(_objectSpread({}, DEFAULT_FEATURE_STYLE), {}, {
|
|
40
|
+
strokeColor: [255, 255, 0, 1],
|
|
41
|
+
strokeWidth: 2,
|
|
42
|
+
strokeDash: [],
|
|
43
|
+
fillColor: [255, 255, 0, 0.25]
|
|
44
|
+
});
|
|
39
45
|
var DEFAULT_MARKER_STYLE = {
|
|
40
46
|
iconAnchor: [0.5, 1],
|
|
41
47
|
opacity: 1,
|
|
@@ -92,11 +98,20 @@ export var END_MARKERS = {
|
|
|
92
98
|
baserotation: 0
|
|
93
99
|
}
|
|
94
100
|
};
|
|
101
|
+
export function defaultFeatureStyle() {
|
|
102
|
+
return _objectSpread(_objectSpread({}, DEFAULT_FEATURE_STYLE), ConfigUtils.getConfigProp("defaultFeatureStyle"));
|
|
103
|
+
}
|
|
104
|
+
export function defaultHighlightStyle() {
|
|
105
|
+
return _objectSpread(_objectSpread({}, DEFAULT_HIGHLIGHT_STYLE), ConfigUtils.getConfigProp("defaultHighlightStyle"));
|
|
106
|
+
}
|
|
107
|
+
export function defaultInteractionStyle() {
|
|
108
|
+
return _objectSpread(_objectSpread({}, DEFAULT_INTERACTION_STYLE), ConfigUtils.getConfigProp("defaultInteractionStyle"));
|
|
109
|
+
}
|
|
95
110
|
export function computeFeatureStyle(layer, feature) {
|
|
96
|
-
return _objectSpread(_objectSpread(_objectSpread(
|
|
111
|
+
return _objectSpread(_objectSpread(_objectSpread({}, defaultFeatureStyle()), layer.styleOptions), feature.styleOptions);
|
|
97
112
|
}
|
|
98
113
|
export function computeMeasureFeatureStyle(markerOpts) {
|
|
99
|
-
var opts = _objectSpread(_objectSpread(
|
|
114
|
+
var opts = _objectSpread(_objectSpread({}, defaultInteractionStyle()), markerOpts);
|
|
100
115
|
return {
|
|
101
116
|
circleRadius: opts.measurePointRadius,
|
|
102
117
|
strokeColor: opts.measureStrokeColor,
|
|
@@ -111,7 +126,7 @@ export function computeMeasureFeatureStyle(markerOpts) {
|
|
|
111
126
|
};
|
|
112
127
|
}
|
|
113
128
|
var defaultStyle = function defaultStyle(feature, options) {
|
|
114
|
-
var opts = _objectSpread(_objectSpread(
|
|
129
|
+
var opts = _objectSpread(_objectSpread({}, defaultFeatureStyle()), options);
|
|
115
130
|
var styles = [];
|
|
116
131
|
styles.push(new ol.style.Style({
|
|
117
132
|
fill: new ol.style.Fill({
|
|
@@ -285,7 +300,7 @@ export default {
|
|
|
285
300
|
})];
|
|
286
301
|
},
|
|
287
302
|
interaction: function interaction(feature, options, isSnap) {
|
|
288
|
-
var opts = _objectSpread(_objectSpread(
|
|
303
|
+
var opts = _objectSpread(_objectSpread({}, defaultInteractionStyle()), options);
|
|
289
304
|
var styleOptions = isSnap ? {
|
|
290
305
|
strokeColor: opts.snapStrokeColor,
|
|
291
306
|
strokeWidth: opts.snapStrokeWidth,
|
|
@@ -300,7 +315,7 @@ export default {
|
|
|
300
315
|
return defaultStyle(feature, styleOptions);
|
|
301
316
|
},
|
|
302
317
|
interactionVertex: function interactionVertex(options, isSnap) {
|
|
303
|
-
var opts = _objectSpread(_objectSpread(
|
|
318
|
+
var opts = _objectSpread(_objectSpread({}, defaultInteractionStyle()), options);
|
|
304
319
|
var strokeWidth = opts.strokeWidth;
|
|
305
320
|
var vertexFill = opts.vertexFillColor;
|
|
306
321
|
var vertexStroke = opts.vertexStrokeColor;
|
|
@@ -332,7 +347,7 @@ export default {
|
|
|
332
347
|
});
|
|
333
348
|
},
|
|
334
349
|
measureInteractionVertex: function measureInteractionVertex(options) {
|
|
335
|
-
var opts = _objectSpread(_objectSpread(
|
|
350
|
+
var opts = _objectSpread(_objectSpread({}, defaultInteractionStyle()), options);
|
|
336
351
|
return new ol.style.Style({
|
|
337
352
|
image: new ol.style.Circle({
|
|
338
353
|
radius: opts.measurePointRadius,
|
|
@@ -348,7 +363,7 @@ export default {
|
|
|
348
363
|
});
|
|
349
364
|
},
|
|
350
365
|
sketchInteraction: function sketchInteraction(options) {
|
|
351
|
-
var opts = _objectSpread(_objectSpread(
|
|
366
|
+
var opts = _objectSpread(_objectSpread({}, defaultInteractionStyle()), options);
|
|
352
367
|
return new ol.style.Style({
|
|
353
368
|
image: new ol.style.Circle({
|
|
354
369
|
fill: new ol.style.Fill({
|
|
@@ -363,7 +378,7 @@ export default {
|
|
|
363
378
|
});
|
|
364
379
|
},
|
|
365
380
|
printInteraction: function printInteraction(options) {
|
|
366
|
-
var opts = _objectSpread(_objectSpread(
|
|
381
|
+
var opts = _objectSpread(_objectSpread({}, defaultInteractionStyle()), options);
|
|
367
382
|
return new ol.style.Style({
|
|
368
383
|
geometry: opts.geometryFunction,
|
|
369
384
|
fill: new ol.style.Fill({
|
|
@@ -376,7 +391,7 @@ export default {
|
|
|
376
391
|
});
|
|
377
392
|
},
|
|
378
393
|
printInteractionVertex: function printInteractionVertex(options) {
|
|
379
|
-
var opts = _objectSpread(_objectSpread(
|
|
394
|
+
var opts = _objectSpread(_objectSpread({}, defaultInteractionStyle()), options);
|
|
380
395
|
return new ol.style.Style({
|
|
381
396
|
geometry: opts.geometryFunction,
|
|
382
397
|
image: new ol.style.Circle({
|
|
@@ -392,7 +407,7 @@ export default {
|
|
|
392
407
|
});
|
|
393
408
|
},
|
|
394
409
|
printInteractionBackground: function printInteractionBackground(options) {
|
|
395
|
-
var opts = _objectSpread(_objectSpread(
|
|
410
|
+
var opts = _objectSpread(_objectSpread({}, defaultInteractionStyle()), options);
|
|
396
411
|
return new ol.style.Style({
|
|
397
412
|
geometry: opts.geometryFunction,
|
|
398
413
|
fill: new ol.style.Fill({
|
|
@@ -401,7 +416,7 @@ export default {
|
|
|
401
416
|
});
|
|
402
417
|
},
|
|
403
418
|
printInteractionSeries: function printInteractionSeries(options) {
|
|
404
|
-
var opts = _objectSpread(_objectSpread(
|
|
419
|
+
var opts = _objectSpread(_objectSpread({}, defaultInteractionStyle()), options);
|
|
405
420
|
return new ol.style.Style({
|
|
406
421
|
geometry: opts.geometryFunction,
|
|
407
422
|
stroke: new ol.style.Stroke({
|
|
@@ -411,7 +426,7 @@ export default {
|
|
|
411
426
|
});
|
|
412
427
|
},
|
|
413
428
|
printInteractionSeriesIcon: function printInteractionSeriesIcon(options) {
|
|
414
|
-
var opts = _objectSpread(_objectSpread(
|
|
429
|
+
var opts = _objectSpread(_objectSpread({}, defaultInteractionStyle()), options);
|
|
415
430
|
return [new ol.style.Style({
|
|
416
431
|
geometry: opts.geometryFunction,
|
|
417
432
|
image: new ol.style.Circle({
|