qwc2 2025.11.18 → 2025.11.19
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/actions/windows.js +3 -1
- package/components/AttributeTableWidget.js +0 -1
- package/components/ThemeLayersListWindow.js +14 -4
- package/components/WindowManager.js +14 -1
- package/components/map3d/Map3D.js +35 -34
- package/components/map3d/layers/GeoTIFFLayer3D.js +2 -1
- package/components/map3d/layers/VectorLayer3D.js +10 -0
- package/components/map3d/layers/WFSLayer3D.js +17 -1
- package/components/style/WindowManager.css +6 -0
- package/package.json +2 -2
- package/reducers/windows.js +2 -1
- package/static/translations/bg-BG.json +1 -0
- package/static/translations/ca-ES.json +1 -0
- package/static/translations/cs-CZ.json +1 -0
- package/static/translations/de-CH.json +1 -0
- package/static/translations/de-DE.json +1 -0
- package/static/translations/en-US.json +1 -0
- package/static/translations/es-ES.json +1 -0
- package/static/translations/fi-FI.json +1 -0
- package/static/translations/fr-FR.json +2 -1
- package/static/translations/hu-HU.json +1 -0
- package/static/translations/it-IT.json +1 -0
- package/static/translations/ja-JP.json +1 -0
- package/static/translations/nl-NL.json +1 -0
- package/static/translations/no-NO.json +1 -0
- package/static/translations/pl-PL.json +1 -0
- package/static/translations/pt-BR.json +1 -0
- package/static/translations/pt-PT.json +1 -0
- package/static/translations/ro-RO.json +1 -0
- package/static/translations/ru-RU.json +1 -0
- package/static/translations/sv-SE.json +1 -0
- package/static/translations/tr-TR.json +1 -0
- package/static/translations/tsconfig.json +1 -0
- package/static/translations/uk-UA.json +1 -0
- package/utils/ThemeUtils.js +2 -1
package/actions/windows.js
CHANGED
|
@@ -52,12 +52,14 @@ export function showIframeDialog(name, url, options) {
|
|
|
52
52
|
export function showNotification(name, text) {
|
|
53
53
|
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : NotificationType.INFO;
|
|
54
54
|
var sticky = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
55
|
+
var actions = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
|
|
55
56
|
return {
|
|
56
57
|
type: SHOW_NOTIFICATION,
|
|
57
58
|
name: name,
|
|
58
59
|
text: text,
|
|
59
60
|
notificationType: type,
|
|
60
|
-
sticky: sticky
|
|
61
|
+
sticky: sticky,
|
|
62
|
+
actions: actions
|
|
61
63
|
};
|
|
62
64
|
}
|
|
63
65
|
export function closeWindow(name) {
|
|
@@ -35,7 +35,7 @@ import PropTypes from 'prop-types';
|
|
|
35
35
|
import { LayerRole, addLayer } from '../actions/layers';
|
|
36
36
|
import { setCurrentTask } from '../actions/task';
|
|
37
37
|
import { setThemeLayersList } from '../actions/theme';
|
|
38
|
-
import { showNotification, closeWindow } from '../actions/windows';
|
|
38
|
+
import { showNotification, closeWindow, NotificationType } from '../actions/windows';
|
|
39
39
|
import LayerUtils from '../utils/LayerUtils';
|
|
40
40
|
import LocaleUtils from '../utils/LocaleUtils';
|
|
41
41
|
import ThemeUtils from '../utils/ThemeUtils';
|
|
@@ -70,14 +70,23 @@ var ThemeLayersListWindow = /*#__PURE__*/function (_React$Component) {
|
|
|
70
70
|
var filteredSublayers = [];
|
|
71
71
|
sublayers = sublayers.filter(function (sublayer) {
|
|
72
72
|
if (existingSublayers.includes(sublayer.name)) {
|
|
73
|
-
filteredSublayers.push(sublayer
|
|
73
|
+
filteredSublayers.push(sublayer);
|
|
74
74
|
return false;
|
|
75
75
|
}
|
|
76
76
|
return true;
|
|
77
77
|
});
|
|
78
78
|
if (!isEmpty(filteredSublayers)) {
|
|
79
|
-
var text = LocaleUtils.tr("themelayerslist.existinglayers") + ": " + filteredSublayers.
|
|
80
|
-
|
|
79
|
+
var text = LocaleUtils.tr("themelayerslist.existinglayers") + ": " + filteredSublayers.map(function (l) {
|
|
80
|
+
return l.title;
|
|
81
|
+
}).join(", ");
|
|
82
|
+
var actions = [{
|
|
83
|
+
name: LocaleUtils.tr("themelayerslist.addanyway"),
|
|
84
|
+
onClick: function onClick() {
|
|
85
|
+
_this.props.addLayer(ThemeUtils.createThemeLayer(_this.props.theme, _this.props.themes, LayerRole.USERLAYER, filteredSublayers));
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
}];
|
|
89
|
+
_this.props.showNotification("existinglayers", text, NotificationType.INFO, false, actions);
|
|
81
90
|
}
|
|
82
91
|
}
|
|
83
92
|
if (!isEmpty(sublayers)) {
|
|
@@ -108,6 +117,7 @@ var ThemeLayersListWindow = /*#__PURE__*/function (_React$Component) {
|
|
|
108
117
|
}
|
|
109
118
|
});
|
|
110
119
|
_defineProperty(_this, "onClose", function () {
|
|
120
|
+
_this.props.closeWindow("existinglayers");
|
|
111
121
|
_this.props.setThemeLayersList(null);
|
|
112
122
|
});
|
|
113
123
|
return _this;
|
|
@@ -32,6 +32,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
32
32
|
|
|
33
33
|
import React from 'react';
|
|
34
34
|
import { connect } from 'react-redux';
|
|
35
|
+
import isEmpty from 'lodash.isempty';
|
|
35
36
|
import PropTypes from 'prop-types';
|
|
36
37
|
import { closeWindow, closeAllWindows, NotificationType } from '../actions/windows';
|
|
37
38
|
import LocaleUtils from '../utils/LocaleUtils';
|
|
@@ -92,7 +93,19 @@ var WindowManager = /*#__PURE__*/function (_React$Component) {
|
|
|
92
93
|
return /*#__PURE__*/React.createElement("div", {
|
|
93
94
|
className: className,
|
|
94
95
|
key: key
|
|
95
|
-
}, /*#__PURE__*/React.createElement("div", null,
|
|
96
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, data.text), !isEmpty(data.actions) ? /*#__PURE__*/React.createElement("div", {
|
|
97
|
+
className: "windows-notification-actions"
|
|
98
|
+
}, data.actions.map(function (action, idx) {
|
|
99
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
100
|
+
className: "button",
|
|
101
|
+
key: "action" + idx,
|
|
102
|
+
onClick: function onClick() {
|
|
103
|
+
var res = action.onClick();
|
|
104
|
+
if (res) _this.closeWindow(key);
|
|
105
|
+
},
|
|
106
|
+
type: "button"
|
|
107
|
+
}, action.name);
|
|
108
|
+
})) : null), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Icon, {
|
|
96
109
|
icon: "remove",
|
|
97
110
|
onClick: function onClick() {
|
|
98
111
|
return _this.closeWindow(key);
|
|
@@ -37,10 +37,12 @@ import React, { Suspense } from 'react';
|
|
|
37
37
|
import ReactDOM from 'react-dom';
|
|
38
38
|
import { connect } from 'react-redux';
|
|
39
39
|
import Instance from '@giro3d/giro3d/core/Instance.js';
|
|
40
|
-
import Coordinates from '@giro3d/giro3d/core/geographic/Coordinates';
|
|
40
|
+
import Coordinates, { crsIsGeographic } from '@giro3d/giro3d/core/geographic/Coordinates';
|
|
41
|
+
import Ellipsoid from '@giro3d/giro3d/core/geographic/Ellipsoid';
|
|
41
42
|
import Extent from '@giro3d/giro3d/core/geographic/Extent.js';
|
|
43
|
+
import CoordinateSystem from '@giro3d/giro3d/core/geographic/coordinate-system/CoordinateSystem';
|
|
42
44
|
import ElevationLayer from '@giro3d/giro3d/core/layer/ElevationLayer.js';
|
|
43
|
-
import
|
|
45
|
+
import DrapedFeatureCollection from '@giro3d/giro3d/entities/DrapedFeatureCollection';
|
|
44
46
|
import Map from '@giro3d/giro3d/entities/Map.js';
|
|
45
47
|
import Tiles3D from "@giro3d/giro3d/entities/Tiles3D.js";
|
|
46
48
|
import Inspector from "@giro3d/giro3d/gui/Inspector.js";
|
|
@@ -212,7 +214,7 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
|
|
|
212
214
|
colorLayers[layer.id] = _objectSpread(_objectSpread({}, layer), {}, {
|
|
213
215
|
visibility: (_prevOptions$visibili = prevOptions === null || prevOptions === void 0 ? void 0 : prevOptions.visibility) !== null && _prevOptions$visibili !== void 0 ? _prevOptions$visibili : false,
|
|
214
216
|
opacity: (_prevOptions$opacity = prevOptions === null || prevOptions === void 0 ? void 0 : prevOptions.opacity) !== null && _prevOptions$opacity !== void 0 ? _prevOptions$opacity : 255,
|
|
215
|
-
extrusionHeight: (_prevOptions$extrusio = prevOptions === null || prevOptions === void 0 ? void 0 : prevOptions.extrusionHeight) !== null && _prevOptions$extrusio !== void 0 ? _prevOptions$extrusio :
|
|
217
|
+
extrusionHeight: (_prevOptions$extrusio = prevOptions === null || prevOptions === void 0 ? void 0 : prevOptions.extrusionHeight) !== null && _prevOptions$extrusio !== void 0 ? _prevOptions$extrusio : layerCreator.createFeatureSource ? 0 : undefined,
|
|
216
218
|
fields: (_prevOptions$fields = prevOptions === null || prevOptions === void 0 ? void 0 : prevOptions.fields) !== null && _prevOptions$fields !== void 0 ? _prevOptions$fields : undefined,
|
|
217
219
|
sublayers: _preserveSublayerOptions(layer, prevOptions)
|
|
218
220
|
});
|
|
@@ -250,9 +252,9 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
|
|
|
250
252
|
mapLayer.visible = options.visibility;
|
|
251
253
|
mapLayer.opacity = options.opacity / 255;
|
|
252
254
|
layerBelow = mapLayer;
|
|
253
|
-
if (options.extrusionHeight !== 0) {
|
|
254
|
-
_this2.createUpdateExtrudedLayer(mapLayer, options, options.features !== (prevOptions === null || prevOptions === void 0 ? void 0 : prevOptions.features));
|
|
255
|
-
} else if ((prevOptions === null || prevOptions === void 0 ? void 0 : prevOptions.extrusionHeight) !== 0) {
|
|
255
|
+
if (options.extrusionHeight !== undefined && options.extrusionHeight !== 0) {
|
|
256
|
+
_this2.createUpdateExtrudedLayer(layerCreator, mapLayer, options, options.features !== (prevOptions === null || prevOptions === void 0 ? void 0 : prevOptions.features));
|
|
257
|
+
} else if ((prevOptions === null || prevOptions === void 0 ? void 0 : prevOptions.extrusionHeight) !== undefined && (prevOptions === null || prevOptions === void 0 ? void 0 : prevOptions.extrusionHeight) !== 0) {
|
|
256
258
|
_this2.removeExtrudedLayer(options.id);
|
|
257
259
|
}
|
|
258
260
|
});
|
|
@@ -262,7 +264,7 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
|
|
|
262
264
|
layerId = _ref4[0],
|
|
263
265
|
options = _ref4[1];
|
|
264
266
|
if (!(layerId in colorLayers)) {
|
|
265
|
-
if (options.extrusionHeight !== 0) {
|
|
267
|
+
if (options.extrusionHeight !== undefined && options.extrusionHeight !== 0) {
|
|
266
268
|
_this2.removeExtrudedLayer(options.id);
|
|
267
269
|
}
|
|
268
270
|
_this2.removeLayer(layerId);
|
|
@@ -270,11 +272,9 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
|
|
|
270
272
|
});
|
|
271
273
|
_this2.instance.notifyChange(_this2.map);
|
|
272
274
|
});
|
|
273
|
-
_defineProperty(_this2, "createUpdateExtrudedLayer", function (mapLayer, options) {
|
|
275
|
+
_defineProperty(_this2, "createUpdateExtrudedLayer", function (layerCreator, mapLayer, options) {
|
|
274
276
|
var _options$features, _options$features$red;
|
|
275
|
-
var forceCreate = arguments.length >
|
|
276
|
-
var bounds = options.bbox.bounds;
|
|
277
|
-
var extent = new Extent(options.bbox.crs, bounds[0], bounds[2], bounds[1], bounds[3]);
|
|
277
|
+
var forceCreate = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
278
278
|
var objId = options.id + ":extruded";
|
|
279
279
|
var makeColor = function makeColor(c) {
|
|
280
280
|
if (Array.isArray(c)) {
|
|
@@ -292,20 +292,9 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
|
|
|
292
292
|
_this2.instance.remove(obj);
|
|
293
293
|
}
|
|
294
294
|
var layercolor = makeColor((_options$color = options.color) !== null && _options$color !== void 0 ? _options$color : "#FF0000");
|
|
295
|
-
obj = new
|
|
296
|
-
source: mapLayer.
|
|
297
|
-
|
|
298
|
-
minLevel: 1,
|
|
299
|
-
maxLevel: 1,
|
|
300
|
-
ignoreZ: true,
|
|
301
|
-
elevation: function elevation(feature) {
|
|
302
|
-
var _this2$getTerrainHeig;
|
|
303
|
-
var coordinates = feature.getGeometry().getCoordinates();
|
|
304
|
-
while (Array.isArray(coordinates[0])) {
|
|
305
|
-
coordinates = coordinates[0];
|
|
306
|
-
}
|
|
307
|
-
return (_this2$getTerrainHeig = _this2.getTerrainHeightFromMap(coordinates)) !== null && _this2$getTerrainHeig !== void 0 ? _this2$getTerrainHeig : 0;
|
|
308
|
-
},
|
|
295
|
+
obj = new DrapedFeatureCollection({
|
|
296
|
+
source: layerCreator.createFeatureSource(mapLayer, options, _this2.state.sceneContext.mapCrs),
|
|
297
|
+
drapingMode: 'per-feature',
|
|
309
298
|
extrusionOffset: function extrusionOffset(feature) {
|
|
310
299
|
if (typeof obj.userData.extrusionHeight === "string") {
|
|
311
300
|
return parseFloat(feature.getProperties()[obj.userData.extrusionHeight]) || 0;
|
|
@@ -325,7 +314,9 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
|
|
|
325
314
|
});
|
|
326
315
|
obj.castShadow = true;
|
|
327
316
|
obj.receiveShadow = true;
|
|
328
|
-
_this2.instance.add(obj)
|
|
317
|
+
_this2.instance.add(obj).then(function () {
|
|
318
|
+
obj.attach(_this2.map);
|
|
319
|
+
});
|
|
329
320
|
_this2.objectMap[objId] = obj;
|
|
330
321
|
}
|
|
331
322
|
obj.userData.extrusionHeight = options.extrusionHeight;
|
|
@@ -339,7 +330,9 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
|
|
|
339
330
|
}, {});
|
|
340
331
|
obj.opacity = mapLayer.opacity;
|
|
341
332
|
obj.visible = mapLayer.visible;
|
|
342
|
-
obj.
|
|
333
|
+
if (obj.visible) {
|
|
334
|
+
obj.updateStyles();
|
|
335
|
+
}
|
|
343
336
|
});
|
|
344
337
|
_defineProperty(_this2, "removeExtrudedLayer", function (layerId) {
|
|
345
338
|
var objId = layerId + ":extruded";
|
|
@@ -602,23 +595,25 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
|
|
|
602
595
|
return;
|
|
603
596
|
}
|
|
604
597
|
var projection = _this2.props.theme.mapCrs;
|
|
598
|
+
var crs = CoordinateSystem.fromSrid(projection);
|
|
605
599
|
|
|
606
600
|
// Setup instance
|
|
607
601
|
_this2.instance = new Instance({
|
|
608
602
|
target: _this2.container,
|
|
609
|
-
crs:
|
|
603
|
+
crs: crs,
|
|
610
604
|
renderer: {
|
|
611
605
|
clearColor: 0x000000,
|
|
612
606
|
preserveDrawingBuffer: true
|
|
613
607
|
}
|
|
614
608
|
});
|
|
615
609
|
_this2.sceneObjectGroup = new Group();
|
|
610
|
+
_this2.sceneObjectGroup.name = "sceneObjects";
|
|
616
611
|
_this2.instance.add(_this2.sceneObjectGroup);
|
|
617
612
|
|
|
618
613
|
// Setup map
|
|
619
614
|
var initialBbox = (_this2$props$theme$ma = (_this2$props$theme$ma2 = _this2.props.theme.map3d) === null || _this2$props$theme$ma2 === void 0 ? void 0 : _this2$props$theme$ma2.extent) !== null && _this2$props$theme$ma !== void 0 ? _this2$props$theme$ma : _this2.props.theme.initialBbox;
|
|
620
615
|
var bounds = CoordinatesUtils.reprojectBbox(initialBbox.bounds, initialBbox.crs, projection);
|
|
621
|
-
var extent = new Extent(
|
|
616
|
+
var extent = new Extent(crs, bounds[0], bounds[2], bounds[1], bounds[3]);
|
|
622
617
|
_this2.map = new Map({
|
|
623
618
|
extent: extent,
|
|
624
619
|
backgroundColor: "white"
|
|
@@ -627,7 +622,12 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
|
|
|
627
622
|
|
|
628
623
|
// Setup camera
|
|
629
624
|
var center = extent.center();
|
|
630
|
-
|
|
625
|
+
if (crsIsGeographic(center.crs)) {
|
|
626
|
+
var position = Ellipsoid.WGS84.toCartesian(center.latitude, center.longitude, center.altitude);
|
|
627
|
+
_this2.instance.view.camera.position.set(position.x, position.y, 0.5 * (extent.east - extent.west));
|
|
628
|
+
} else {
|
|
629
|
+
_this2.instance.view.camera.position.set(center.x, center.y, 0.5 * (extent.east - extent.west));
|
|
630
|
+
}
|
|
631
631
|
|
|
632
632
|
// Skybox
|
|
633
633
|
var cubeTextureLoader = new CubeTextureLoader();
|
|
@@ -637,7 +637,7 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
|
|
|
637
637
|
|
|
638
638
|
// Setup elevation
|
|
639
639
|
var demUrl = MiscUtils.resolveAssetsPath((_this2$props$theme$ma3 = (_this2$props$theme$ma4 = _this2.props.theme.map3d) === null || _this2$props$theme$ma4 === void 0 || (_this2$props$theme$ma4 = _this2$props$theme$ma4.dtm) === null || _this2$props$theme$ma4 === void 0 ? void 0 : _this2$props$theme$ma4.url) !== null && _this2$props$theme$ma3 !== void 0 ? _this2$props$theme$ma3 : "");
|
|
640
|
-
var demCrs = ((_this2$props$theme$ma5 = _this2.props.theme.map3d) === null || _this2$props$theme$ma5 === void 0 || (_this2$props$theme$ma5 = _this2$props$theme$ma5.dtm) === null || _this2$props$theme$ma5 === void 0 ? void 0 : _this2$props$theme$ma5.crs) || "EPSG:3857";
|
|
640
|
+
var demCrs = CoordinateSystem.fromSrid(((_this2$props$theme$ma5 = _this2.props.theme.map3d) === null || _this2$props$theme$ma5 === void 0 || (_this2$props$theme$ma5 = _this2$props$theme$ma5.dtm) === null || _this2$props$theme$ma5 === void 0 ? void 0 : _this2$props$theme$ma5.crs) || "EPSG:3857");
|
|
641
641
|
if (demUrl) {
|
|
642
642
|
var _this2$props$theme$ma6, _this2$props$theme$ma7;
|
|
643
643
|
var demSource = new GeoTIFFSource({
|
|
@@ -740,8 +740,8 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
|
|
|
740
740
|
|
|
741
741
|
// Add other objects
|
|
742
742
|
(((_this2$props$theme$ma10 = _this2.props.theme.map3d) === null || _this2$props$theme$ma10 === void 0 ? void 0 : _this2$props$theme$ma10.objects3d) || []).forEach(function (entry) {
|
|
743
|
-
var _entry$visibility2;
|
|
744
|
-
importGltf(MiscUtils.resolveAssetsPath(entry.url), entry.name, _this2.state.sceneContext, {
|
|
743
|
+
var _entry$title2, _entry$visibility2;
|
|
744
|
+
importGltf(MiscUtils.resolveAssetsPath(entry.url), (_entry$title2 = entry.title) !== null && _entry$title2 !== void 0 ? _entry$title2 : entry.name, _this2.state.sceneContext, {
|
|
745
745
|
visibility: (_entry$visibility2 = entry.visibility) !== null && _entry$visibility2 !== void 0 ? _entry$visibility2 : true
|
|
746
746
|
});
|
|
747
747
|
});
|
|
@@ -968,7 +968,8 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
|
|
|
968
968
|
});
|
|
969
969
|
_defineProperty(_this2, "getTerrainHeightFromMap", function (scenePos) {
|
|
970
970
|
var _elevationResult$samp;
|
|
971
|
-
var
|
|
971
|
+
var crs = CoordinateSystem.fromSrid(_this2.state.sceneContext.mapCrs);
|
|
972
|
+
var coordinates = new Coordinates(crs, scenePos[0], scenePos[1], 0);
|
|
972
973
|
var elevationResult = _this2.state.sceneContext.map.getElevation({
|
|
973
974
|
coordinates: coordinates
|
|
974
975
|
});
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
import CoordinateSystem from '@giro3d/giro3d/core/geographic/coordinate-system/CoordinateSystem';
|
|
9
10
|
import ColorLayer from '@giro3d/giro3d/core/layer/ColorLayer';
|
|
10
11
|
import GeoTIFFSource from "@giro3d/giro3d/sources/GeoTIFFSource.js";
|
|
11
12
|
export default {
|
|
@@ -14,7 +15,7 @@ export default {
|
|
|
14
15
|
name: options.name,
|
|
15
16
|
source: new GeoTIFFSource({
|
|
16
17
|
url: options.url,
|
|
17
|
-
crs: projection
|
|
18
|
+
crs: CoordinateSystem.fromSrid(projection)
|
|
18
19
|
})
|
|
19
20
|
});
|
|
20
21
|
}
|
|
@@ -12,7 +12,9 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
12
12
|
* LICENSE file in the root directory of this source tree.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
+
import CoordinateSystem from '@giro3d/giro3d/core/geographic/coordinate-system/CoordinateSystem';
|
|
15
16
|
import ColorLayer from '@giro3d/giro3d/core/layer/ColorLayer';
|
|
17
|
+
import StaticFeatureSource from '@giro3d/giro3d/sources/StaticFeatureSource';
|
|
16
18
|
import VectorSource from "@giro3d/giro3d/sources/VectorSource.js";
|
|
17
19
|
import ol from 'openlayers';
|
|
18
20
|
import FeatureStyles from '../../../utils/FeatureStyles';
|
|
@@ -22,6 +24,7 @@ export default {
|
|
|
22
24
|
return new ColorLayer({
|
|
23
25
|
name: options.name,
|
|
24
26
|
source: new VectorSource({
|
|
27
|
+
dataProjection: CoordinateSystem.fromSrid(projection),
|
|
25
28
|
data: createFeatures(options, projection),
|
|
26
29
|
format: new ol.format.GeoJSON(),
|
|
27
30
|
style: options.styleFunction || function (feature) {
|
|
@@ -54,5 +57,12 @@ export default {
|
|
|
54
57
|
});
|
|
55
58
|
resolve(_toConsumableArray(fields.values()));
|
|
56
59
|
});
|
|
60
|
+
},
|
|
61
|
+
createFeatureSource: function createFeatureSource(layer, options, projection) {
|
|
62
|
+
var crs = CoordinateSystem.fromSrid(projection);
|
|
63
|
+
return new StaticFeatureSource({
|
|
64
|
+
coordinateSystem: crs,
|
|
65
|
+
features: layer.source.source.getFeatures()
|
|
66
|
+
});
|
|
57
67
|
}
|
|
58
68
|
};
|
|
@@ -22,7 +22,10 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
22
22
|
* LICENSE file in the root directory of this source tree.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
+
import Extent from '@giro3d/giro3d/core/geographic/Extent';
|
|
26
|
+
import CoordinateSystem from '@giro3d/giro3d/core/geographic/coordinate-system/CoordinateSystem';
|
|
25
27
|
import ColorLayer from '@giro3d/giro3d/core/layer/ColorLayer';
|
|
28
|
+
import StreamableFeatureSource, { wfsBuilder, tiledLoadingStrategy } from '@giro3d/giro3d/sources/StreamableFeatureSource';
|
|
26
29
|
import VectorSource from "@giro3d/giro3d/sources/VectorSource.js";
|
|
27
30
|
import axios from 'axios';
|
|
28
31
|
import { tile } from "ol/loadingstrategy.js";
|
|
@@ -55,7 +58,7 @@ export default {
|
|
|
55
58
|
return new ColorLayer({
|
|
56
59
|
name: options.name,
|
|
57
60
|
source: new VectorSource({
|
|
58
|
-
dataProjection:
|
|
61
|
+
dataProjection: CoordinateSystem.fromSrid(projection),
|
|
59
62
|
data: {
|
|
60
63
|
url: url.format(urlParts),
|
|
61
64
|
format: olOpts.format
|
|
@@ -110,5 +113,18 @@ export default {
|
|
|
110
113
|
reject([]);
|
|
111
114
|
});
|
|
112
115
|
});
|
|
116
|
+
},
|
|
117
|
+
createFeatureSource: function createFeatureSource(layer, options, projection) {
|
|
118
|
+
var bounds = CoordinatesUtils.reprojectBbox(options.bbox.bounds, options.bbox.crs, projection);
|
|
119
|
+
var crs = CoordinateSystem.fromSrid(projection);
|
|
120
|
+
var maxextent = new Extent(crs, bounds[0], bounds[2], bounds[1], bounds[3]);
|
|
121
|
+
return new StreamableFeatureSource({
|
|
122
|
+
queryBuilder: wfsBuilder(options.url, options.name),
|
|
123
|
+
sourceCoordinateSystem: crs,
|
|
124
|
+
extent: maxextent,
|
|
125
|
+
loadingStrategy: tiledLoadingStrategy({
|
|
126
|
+
tileSize: 5000
|
|
127
|
+
})
|
|
128
|
+
});
|
|
113
129
|
}
|
|
114
130
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qwc2",
|
|
3
|
-
"version": "2025.11.
|
|
3
|
+
"version": "2025.11.19",
|
|
4
4
|
"description": "QGIS Web Client",
|
|
5
5
|
"author": "Sourcepole AG",
|
|
6
6
|
"license": "BSD-2-Clause",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@furkot/webfonts-generator": "^2.0.2",
|
|
20
|
-
"@
|
|
20
|
+
"@sourcepole/qwc-giro3d": "^0.44.0-dev",
|
|
21
21
|
"@kayahr/text-encoding": "^2.0.0",
|
|
22
22
|
"@loaders.gl/core": "^4.3.3",
|
|
23
23
|
"@loaders.gl/shapefile": "^4.3.3",
|
package/reducers/windows.js
CHANGED
|
@@ -650,6 +650,7 @@
|
|
|
650
650
|
"vertex": "An Ecken einrasten"
|
|
651
651
|
},
|
|
652
652
|
"themelayerslist": {
|
|
653
|
+
"addanyway": "Trotzdem hinzufügen",
|
|
653
654
|
"addlayer": "Layer hinzufügen",
|
|
654
655
|
"addlayerstotheme": "Ebenen der Karte hinzufügen",
|
|
655
656
|
"addselectedlayers": "Selektierte Ebenen hinzufügen",
|
|
@@ -650,6 +650,7 @@
|
|
|
650
650
|
"vertex": "An Ecken einrasten"
|
|
651
651
|
},
|
|
652
652
|
"themelayerslist": {
|
|
653
|
+
"addanyway": "Trotzdem hinzufügen",
|
|
653
654
|
"addlayer": "Layer hinzufügen",
|
|
654
655
|
"addlayerstotheme": "Ebenen der Karte hinzufügen",
|
|
655
656
|
"addselectedlayers": "Selektierte Ebenen hinzufügen",
|
|
@@ -456,7 +456,7 @@
|
|
|
456
456
|
"angle": "Angle",
|
|
457
457
|
"featureunsupported": "Entrée numérique non disponible pour cette géométrie",
|
|
458
458
|
"height": "Hauteur",
|
|
459
|
-
"nofeatureormultiple": "",
|
|
459
|
+
"nofeatureormultiple": "Aucun ou plusieurs objets actifs",
|
|
460
460
|
"side": "Côté",
|
|
461
461
|
"width": "Largeur",
|
|
462
462
|
"windowtitle": "Entrée numérique"
|
|
@@ -650,6 +650,7 @@
|
|
|
650
650
|
"vertex": "Snapping aux sommets"
|
|
651
651
|
},
|
|
652
652
|
"themelayerslist": {
|
|
653
|
+
"addanyway": "Ajouter quand même",
|
|
653
654
|
"addlayer": "Ajouter la couche",
|
|
654
655
|
"addlayerstotheme": "Ajouter des couches à la carte",
|
|
655
656
|
"addselectedlayers": "Ajouter les couches sélectionnées",
|
|
@@ -650,6 +650,7 @@
|
|
|
650
650
|
"vertex": "Snap ai vertici"
|
|
651
651
|
},
|
|
652
652
|
"themelayerslist": {
|
|
653
|
+
"addanyway": "Aggiungi comunque",
|
|
653
654
|
"addlayer": "Aggiungi layer",
|
|
654
655
|
"addlayerstotheme": "Aggiungi layer alla mappa corrente",
|
|
655
656
|
"addselectedlayers": "Aggiungi i layer selezionati",
|
package/utils/ThemeUtils.js
CHANGED
|
@@ -137,6 +137,7 @@ var ThemeUtils = {
|
|
|
137
137
|
var sublayerNames = LayerUtils.getSublayerNames({
|
|
138
138
|
sublayers: subLayers !== null && subLayers !== void 0 ? subLayers : theme.sublayers
|
|
139
139
|
});
|
|
140
|
+
var commonTranslations = StandardApp.store.getState().locale.messagesTree.maptranslations || {};
|
|
140
141
|
var baseParams = urlParts.query;
|
|
141
142
|
var layer = {
|
|
142
143
|
type: "wms",
|
|
@@ -175,7 +176,7 @@ var ThemeUtils = {
|
|
|
175
176
|
LayerUtils.completeExternalLayer(res[cur.internalLayer], LayerUtils.searchSubLayer(theme, 'name', cur.internalLayer));
|
|
176
177
|
return res;
|
|
177
178
|
}, {})),
|
|
178
|
-
translations: theme.translations,
|
|
179
|
+
translations: deepmerge(commonTranslations, theme.translations),
|
|
179
180
|
editConfig: theme.editConfig,
|
|
180
181
|
wms_name: theme.wms_name
|
|
181
182
|
};
|