qwc2 2025.12.18 → 2025.12.24
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/display.js +6 -6
- package/actions/theme.js +4 -19
- package/components/AppMenu.js +1 -1
- package/components/AttributeForm.js +7 -7
- package/components/AttributeTableWidget.js +2 -2
- package/components/AutoEditForm.js +6 -3
- package/components/EditComboField.js +1 -4
- package/components/IdentifyViewer.js +33 -34
- package/components/ImportLayer.js +78 -79
- package/components/OverviewMapButton.js +147 -0
- package/components/PluginsContainer.js +2 -2
- package/components/ResizeableWindow.js +8 -1
- package/components/SearchBox.js +2 -2
- package/components/SideBar.js +1 -0
- package/components/StandardApp.js +1 -2
- package/components/ThemeLayersListWindow.js +10 -1
- package/components/{map3d/View3DSwitcher.js → ViewSwitcher.js} +74 -29
- package/components/map/OlMap.js +1 -1
- package/components/map3d/Map3D.js +50 -48
- package/components/map3d/MapControls3D.js +4 -1
- package/components/map3d/drawtool/EditTool3D.js +1 -1
- package/components/map3d/layers/WFSLayer3D.js +1 -1
- package/components/share/ShareQRCode.js +1 -1
- package/{plugins/map3d/style/OverviewMap3D.css → components/style/OverviewMapButton.css} +4 -4
- package/components/style/ViewSwitcher.css +36 -0
- package/components/widgets/ColorButton.js +2 -2
- package/components/widgets/CopyButton.js +1 -1
- package/components/widgets/LayerCatalogWidget.js +4 -4
- package/libs/openlayers.js +11 -11
- package/package.json +54 -55
- package/plugins/API.js +4 -4
- package/plugins/FeatureForm.js +2 -2
- package/plugins/FeatureSearch.js +12 -12
- package/plugins/GeometryDigitizer.js +12 -13
- package/plugins/Map.js +11 -4
- package/plugins/MapFilter.js +12 -12
- package/plugins/MapTip.js +1 -1
- package/plugins/ObliqueView.js +115 -51
- package/plugins/Print.js +79 -91
- package/plugins/Routing.js +1 -1
- package/plugins/Share.js +5 -5
- package/plugins/TimeManager.js +1 -2
- package/plugins/View3D.js +135 -123
- package/plugins/map/RedliningSupport.js +3 -3
- package/plugins/map3d/Draw3D.js +4 -4
- package/plugins/map3d/ExportObjects3D.js +1 -1
- package/plugins/map3d/HideObjects3D.js +7 -7
- package/plugins/map3d/Identify3D.js +1 -1
- package/plugins/map3d/LayerTree3D.js +1 -1
- package/plugins/map3d/MapExport3D.js +25 -25
- package/plugins/map3d/Measure3D.js +1 -1
- package/plugins/map3d/OverviewMap3D.js +27 -102
- package/plugins/map3d/TopBar3D.js +7 -7
- package/plugins/style/ObliqueView.css +27 -11
- package/reducers/display.js +2 -2
- package/reducers/layers.js +11 -11
- package/scripts/gen-plugin-docs.js +11 -4
- package/scripts/makeIconkit.js +2 -2
- package/scripts/themesConfig.js +5 -5
- package/scripts/updateTranslations.js +2 -2
- package/utils/CoordinatesUtils.js +1 -1
- package/utils/EditingUtils.js +6 -6
- package/utils/FeatureStyles.js +1 -1
- package/utils/LayerUtils.js +73 -74
- package/utils/MiscUtils.js +10 -3
- package/utils/PermaLinkUtils.js +68 -71
- package/utils/SearchProviders.js +2 -2
- package/utils/ServiceLayerUtils.js +12 -12
- package/utils/ThemeUtils.js +1 -1
- package/utils/VectorLayerUtils.js +3 -3
- package/components/map3d/style/View3DSwitcher.css +0 -19
|
@@ -1,5 +1,6 @@
|
|
|
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
|
-
function
|
|
2
|
+
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
3
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
3
4
|
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
4
5
|
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
5
6
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
@@ -487,10 +488,10 @@ var MapExport3D = /*#__PURE__*/function (_React$Component) {
|
|
|
487
488
|
}, {
|
|
488
489
|
key: "exportToPdf",
|
|
489
490
|
value: function () {
|
|
490
|
-
var _exportToPdf = _asyncToGenerator(/*#__PURE__*/
|
|
491
|
+
var _exportToPdf = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(form, imgBuffer) {
|
|
491
492
|
var formData, data, config, response, _yield$import, PDFDocument, doc, page, pngImage, x, y, width, height, pdfData, blob;
|
|
492
|
-
return
|
|
493
|
-
while (1) switch (_context.
|
|
493
|
+
return _regenerator().w(function (_context) {
|
|
494
|
+
while (1) switch (_context.n) {
|
|
494
495
|
case 0:
|
|
495
496
|
formData = _objectSpread(_objectSpread({}, formDataEntries(new FormData(form))), Object.fromEntries((this.props.theme.extraPrintParameters || "").split("&").filter(Boolean).map(function (entry) {
|
|
496
497
|
return entry.split("=");
|
|
@@ -506,28 +507,28 @@ var MapExport3D = /*#__PURE__*/function (_React$Component) {
|
|
|
506
507
|
},
|
|
507
508
|
responseType: "arraybuffer"
|
|
508
509
|
};
|
|
509
|
-
_context.
|
|
510
|
+
_context.n = 1;
|
|
510
511
|
return axios.post(this.props.theme.printUrl, data, config);
|
|
511
|
-
case
|
|
512
|
-
response = _context.
|
|
512
|
+
case 1:
|
|
513
|
+
response = _context.v;
|
|
513
514
|
if (!response) {
|
|
514
|
-
_context.
|
|
515
|
+
_context.n = 6;
|
|
515
516
|
break;
|
|
516
517
|
}
|
|
517
|
-
_context.
|
|
518
|
+
_context.n = 2;
|
|
518
519
|
return import('pdf-lib');
|
|
519
|
-
case
|
|
520
|
-
_yield$import = _context.
|
|
520
|
+
case 2:
|
|
521
|
+
_yield$import = _context.v;
|
|
521
522
|
PDFDocument = _yield$import.PDFDocument;
|
|
522
|
-
_context.
|
|
523
|
+
_context.n = 3;
|
|
523
524
|
return PDFDocument.load(response.data);
|
|
524
|
-
case
|
|
525
|
-
doc = _context.
|
|
525
|
+
case 3:
|
|
526
|
+
doc = _context.v;
|
|
526
527
|
page = doc.getPages()[0];
|
|
527
|
-
_context.
|
|
528
|
+
_context.n = 4;
|
|
528
529
|
return doc.embedPng(imgBuffer);
|
|
529
|
-
case
|
|
530
|
-
pngImage = _context.
|
|
530
|
+
case 4:
|
|
531
|
+
pngImage = _context.v;
|
|
531
532
|
x = this.state.layout.map.x * 2.8346;
|
|
532
533
|
y = this.state.layout.map.y * 2.8346;
|
|
533
534
|
width = this.state.layout.map.width * 2.8346;
|
|
@@ -538,10 +539,10 @@ var MapExport3D = /*#__PURE__*/function (_React$Component) {
|
|
|
538
539
|
width: width,
|
|
539
540
|
height: height
|
|
540
541
|
});
|
|
541
|
-
_context.
|
|
542
|
+
_context.n = 5;
|
|
542
543
|
return doc.save();
|
|
543
|
-
case
|
|
544
|
-
pdfData = _context.
|
|
544
|
+
case 5:
|
|
545
|
+
pdfData = _context.v;
|
|
545
546
|
blob = new Blob([pdfData], {
|
|
546
547
|
type: 'application/pdf'
|
|
547
548
|
});
|
|
@@ -549,17 +550,16 @@ var MapExport3D = /*#__PURE__*/function (_React$Component) {
|
|
|
549
550
|
this.setState({
|
|
550
551
|
exporting: false
|
|
551
552
|
});
|
|
552
|
-
_context.
|
|
553
|
+
_context.n = 7;
|
|
553
554
|
break;
|
|
554
|
-
case
|
|
555
|
+
case 6:
|
|
555
556
|
/* eslint-disable-next-line */
|
|
556
557
|
alert('Print failed');
|
|
557
558
|
this.setState({
|
|
558
559
|
exporting: false
|
|
559
560
|
});
|
|
560
|
-
case
|
|
561
|
-
|
|
562
|
-
return _context.stop();
|
|
561
|
+
case 7:
|
|
562
|
+
return _context.a(2);
|
|
563
563
|
}
|
|
564
564
|
}, _callee, this);
|
|
565
565
|
}));
|
|
@@ -35,8 +35,8 @@ import ol from 'openlayers';
|
|
|
35
35
|
import pointInPolygon from 'point-in-polygon';
|
|
36
36
|
import PropTypes from 'prop-types';
|
|
37
37
|
import { CurvePath, LineCurve, Vector2, Vector3 } from 'three';
|
|
38
|
-
import TaskBar from '../../components/TaskBar';
|
|
39
38
|
import HeightProfile3D from '../../components/map3d/HeightProfile3D';
|
|
39
|
+
import TaskBar from '../../components/TaskBar';
|
|
40
40
|
import ButtonBar from '../../components/widgets/ButtonBar';
|
|
41
41
|
import CopyButton from '../../components/widgets/CopyButton';
|
|
42
42
|
import ConfigUtils from '../../utils/ConfigUtils';
|
|
@@ -1,6 +1,4 @@
|
|
|
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
|
-
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; }
|
|
3
|
-
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; }
|
|
4
2
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
5
3
|
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
6
4
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
@@ -23,84 +21,38 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
23
21
|
*/
|
|
24
22
|
|
|
25
23
|
import React from 'react';
|
|
26
|
-
import ol from 'openlayers';
|
|
27
24
|
import PropTypes from 'prop-types';
|
|
28
|
-
import
|
|
29
|
-
import viewconeIcon from '../../resources/viewcone.svg';
|
|
30
|
-
import './style/OverviewMap3D.css';
|
|
25
|
+
import OverviewMapButton from '../../components/OverviewMapButton';
|
|
31
26
|
|
|
32
27
|
/**
|
|
33
28
|
* Overview map for the 3D map.
|
|
34
29
|
*/
|
|
35
30
|
var OverviewMap3D = /*#__PURE__*/function (_React$Component) {
|
|
36
|
-
function OverviewMap3D(
|
|
31
|
+
function OverviewMap3D() {
|
|
37
32
|
var _this;
|
|
38
33
|
_classCallCheck(this, OverviewMap3D);
|
|
39
|
-
|
|
34
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
35
|
+
args[_key] = arguments[_key];
|
|
36
|
+
}
|
|
37
|
+
_this = _callSuper(this, OverviewMap3D, [].concat(args));
|
|
40
38
|
_defineProperty(_this, "state", {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
if (el) {
|
|
45
|
-
_this.map = new ol.Map({
|
|
46
|
-
layers: [_this.viewConeLayer],
|
|
47
|
-
controls: [],
|
|
48
|
-
target: el
|
|
49
|
-
});
|
|
50
|
-
_this.setupView();
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
_defineProperty(_this, "setupView", function () {
|
|
54
|
-
var overviewView = new ol.View({
|
|
55
|
-
enableRotation: false,
|
|
56
|
-
projection: _this.props.sceneContext.mapCrs
|
|
57
|
-
});
|
|
58
|
-
_this.map.setView(overviewView);
|
|
59
|
-
_this.updateViewCone();
|
|
39
|
+
center: null,
|
|
40
|
+
resolution: null,
|
|
41
|
+
coneAngle: null
|
|
60
42
|
});
|
|
61
43
|
_defineProperty(_this, "updateViewCone", function () {
|
|
62
44
|
var _scene$view$controls$, _scene$view$controls, _scene$view$controls$2;
|
|
63
|
-
if (!_this.map) {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
45
|
var scene = _this.props.sceneContext.scene;
|
|
67
46
|
var x = scene.view.camera.position.x;
|
|
68
47
|
var y = scene.view.camera.position.y;
|
|
69
48
|
var azimuth = (_scene$view$controls$ = (_scene$view$controls = scene.view.controls) === null || _scene$view$controls === void 0 || (_scene$view$controls$2 = _scene$view$controls.getAzimuthalAngle) === null || _scene$view$controls$2 === void 0 ? void 0 : _scene$view$controls$2.call(_scene$view$controls)) !== null && _scene$view$controls$ !== void 0 ? _scene$view$controls$ : 0;
|
|
70
49
|
var cameraHeight = scene.view.camera.position.z;
|
|
71
50
|
var resolution = cameraHeight / 100;
|
|
72
|
-
_this.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
});
|
|
78
|
-
_this.map = null;
|
|
79
|
-
_this.viewConeFeature = new ol.Feature(new ol.geom.Point([0, 0]));
|
|
80
|
-
_this.viewConeLayer = new ol.layer.Vector({
|
|
81
|
-
source: new ol.source.Vector({
|
|
82
|
-
features: [_this.viewConeFeature]
|
|
83
|
-
}),
|
|
84
|
-
style: function style(feature) {
|
|
85
|
-
return new ol.style.Style({
|
|
86
|
-
fill: new ol.style.Fill({
|
|
87
|
-
color: 'white'
|
|
88
|
-
}),
|
|
89
|
-
stroke: new ol.style.Stroke({
|
|
90
|
-
color: 'red',
|
|
91
|
-
width: 2
|
|
92
|
-
}),
|
|
93
|
-
image: new ol.style.Icon({
|
|
94
|
-
anchor: [0.5, 1],
|
|
95
|
-
anchorXUnits: 'fraction',
|
|
96
|
-
anchorYUnits: 'fraction',
|
|
97
|
-
src: viewconeIcon,
|
|
98
|
-
rotation: feature.get('rotation'),
|
|
99
|
-
scale: 2
|
|
100
|
-
})
|
|
101
|
-
});
|
|
102
|
-
},
|
|
103
|
-
zIndex: 10000
|
|
51
|
+
_this.setState({
|
|
52
|
+
center: [x, y],
|
|
53
|
+
resolution: resolution,
|
|
54
|
+
coneAngle: -azimuth
|
|
55
|
+
});
|
|
104
56
|
});
|
|
105
57
|
return _this;
|
|
106
58
|
}
|
|
@@ -110,62 +62,35 @@ var OverviewMap3D = /*#__PURE__*/function (_React$Component) {
|
|
|
110
62
|
value: function componentDidMount() {
|
|
111
63
|
this.props.sceneContext.scene.view.controls.addEventListener('change', this.updateViewCone);
|
|
112
64
|
}
|
|
65
|
+
}, {
|
|
66
|
+
key: "componentWillUnmount",
|
|
67
|
+
value: function componentWillUnmount() {
|
|
68
|
+
this.props.sceneContext.scene.view.controls.removeEventListener('change', this.updateViewCone);
|
|
69
|
+
}
|
|
113
70
|
}, {
|
|
114
71
|
key: "componentDidUpdate",
|
|
115
72
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
116
73
|
if (this.props.sceneContext.mapCrs !== prevProps.sceneContext.mapCrs) {
|
|
117
74
|
this.setupView();
|
|
118
75
|
}
|
|
119
|
-
if (this.map) {
|
|
120
|
-
if (this.state.center !== prevState.center || this.state.azimuth !== prevState.azimuth) {
|
|
121
|
-
this.map.getView().setCenter(this.state.center);
|
|
122
|
-
this.viewConeFeature.getGeometry().setCoordinates(this.state.center);
|
|
123
|
-
this.viewConeFeature.set('rotation', -this.state.azimuth, true);
|
|
124
|
-
this.viewConeLayer.getSource().changed();
|
|
125
|
-
}
|
|
126
|
-
if (this.state.resolution !== prevState.resolution) {
|
|
127
|
-
this.map.getView().setResolution(this.state.resolution);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
76
|
}
|
|
131
77
|
}, {
|
|
132
78
|
key: "render",
|
|
133
79
|
value: function render() {
|
|
134
|
-
var _this$props$sceneCont
|
|
135
|
-
_this2 = this;
|
|
136
|
-
var style = {
|
|
137
|
-
display: this.state.collapsed ? 'none' : 'initial'
|
|
138
|
-
};
|
|
80
|
+
var _this$props$sceneCont;
|
|
139
81
|
var baseLayer = this.props.sceneContext.baseLayers.find(function (l) {
|
|
140
82
|
return l.visibility === true;
|
|
141
83
|
});
|
|
142
84
|
var overviewLayer = (_this$props$sceneCont = this.props.sceneContext.baseLayers.find(function (l) {
|
|
143
85
|
return l.overview === true;
|
|
144
86
|
})) !== null && _this$props$sceneCont !== void 0 ? _this$props$sceneCont : baseLayer;
|
|
145
|
-
return
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}), /*#__PURE__*/React.createElement("button", {
|
|
153
|
-
onClick: function onClick() {
|
|
154
|
-
return _this2.setState(function (state) {
|
|
155
|
-
return {
|
|
156
|
-
collapsed: !state.collapsed
|
|
157
|
-
};
|
|
158
|
-
});
|
|
159
|
-
},
|
|
160
|
-
type: "button"
|
|
161
|
-
}, this.state.collapsed ? '«' : '»')), this.map && overviewLayer ? /*#__PURE__*/React.createElement(OlLayer, {
|
|
162
|
-
key: overviewLayer.name,
|
|
163
|
-
map: this.map,
|
|
164
|
-
options: _objectSpread(_objectSpread({}, overviewLayer), {}, {
|
|
165
|
-
visibility: true
|
|
166
|
-
}),
|
|
167
|
-
projection: this.props.sceneContext.mapCrs
|
|
168
|
-
}) : null];
|
|
87
|
+
return overviewLayer ? /*#__PURE__*/React.createElement(OverviewMapButton, {
|
|
88
|
+
center: this.state.center,
|
|
89
|
+
coneRotation: this.state.coneAngle,
|
|
90
|
+
layer: overviewLayer,
|
|
91
|
+
projection: this.props.sceneContext.mapCrs,
|
|
92
|
+
resolution: this.state.resolution
|
|
93
|
+
}) : null;
|
|
169
94
|
}
|
|
170
95
|
}]);
|
|
171
96
|
}(React.Component);
|
|
@@ -27,13 +27,13 @@ import { connect } from 'react-redux';
|
|
|
27
27
|
import classNames from 'classnames';
|
|
28
28
|
import isEmpty from 'lodash.isempty';
|
|
29
29
|
import PropTypes from 'prop-types';
|
|
30
|
-
import { toggleFullscreen,
|
|
30
|
+
import { toggleFullscreen, ViewMode } from '../../actions/display';
|
|
31
31
|
import { openExternalUrl, setTopbarHeight } from '../../actions/windows';
|
|
32
32
|
import AppMenu from '../../components/AppMenu';
|
|
33
33
|
import FullscreenSwitcher from '../../components/FullscreenSwitcher';
|
|
34
|
+
import SearchField3D from '../../components/map3d/SearchField3D';
|
|
34
35
|
import { Swipeable } from '../../components/Swipeable';
|
|
35
36
|
import Toolbar from '../../components/Toolbar';
|
|
36
|
-
import SearchField3D from '../../components/map3d/SearchField3D';
|
|
37
37
|
import ConfigUtils from '../../utils/ConfigUtils';
|
|
38
38
|
import LocaleUtils from '../../utils/LocaleUtils';
|
|
39
39
|
import ThemeUtils from '../../utils/ThemeUtils';
|
|
@@ -55,7 +55,7 @@ var TopBar3D = /*#__PURE__*/function (_React$Component) {
|
|
|
55
55
|
});
|
|
56
56
|
_defineProperty(_this, "filter2DItems", function (item) {
|
|
57
57
|
var pluginConf = ConfigUtils.getPluginConfig(item.key);
|
|
58
|
-
return isEmpty(pluginConf) || _this.props.
|
|
58
|
+
return isEmpty(pluginConf) || _this.props.viewMode === ViewMode._3DFullscreen && pluginConf.availableIn3D;
|
|
59
59
|
});
|
|
60
60
|
_defineProperty(_this, "storeHeight", function (el) {
|
|
61
61
|
if (el) {
|
|
@@ -100,7 +100,7 @@ var TopBar3D = /*#__PURE__*/function (_React$Component) {
|
|
|
100
100
|
}, {
|
|
101
101
|
key: "componentDidUpdate",
|
|
102
102
|
value: function componentDidUpdate(prevProps) {
|
|
103
|
-
if (this.props.currentTheme !== prevProps.currentTheme || this.props.
|
|
103
|
+
if (this.props.currentTheme !== prevProps.currentTheme || this.props.viewMode !== prevProps.viewMode) {
|
|
104
104
|
this.setState({
|
|
105
105
|
allowedToolbarItems: ThemeUtils.allowedItems(this.props.toolbarItems, this.props.currentTheme, this.filter2DItems),
|
|
106
106
|
allowedMenuItems: ThemeUtils.allowedItems(this.props.menuItems, this.props.currentTheme, this.filter2DItems)
|
|
@@ -167,7 +167,7 @@ var TopBar3D = /*#__PURE__*/function (_React$Component) {
|
|
|
167
167
|
menuItems: this.state.allowedMenuItems,
|
|
168
168
|
openExternalUrl: this.openUrl,
|
|
169
169
|
showFilterField: config.appMenuFilterField
|
|
170
|
-
}), this.props.
|
|
170
|
+
}), this.props.viewMode === ViewMode._3DFullscreen ? /*#__PURE__*/React.createElement(FullscreenSwitcher, null) : null));
|
|
171
171
|
}
|
|
172
172
|
}]);
|
|
173
173
|
}(React.Component);
|
|
@@ -193,7 +193,7 @@ _defineProperty(TopBar3D, "propTypes", {
|
|
|
193
193
|
* You can also include entries for 2D plugins which are compatible with the 3D view (i.e. `ThemeSwitcher`, `Share`, etc.),
|
|
194
194
|
* these will be displayed only in fullsceen 3D mode. */
|
|
195
195
|
toolbarItems: PropTypes.array,
|
|
196
|
-
|
|
196
|
+
viewMode: PropTypes.number
|
|
197
197
|
});
|
|
198
198
|
_defineProperty(TopBar3D, "defaultProps", {
|
|
199
199
|
searchOptions: {
|
|
@@ -204,7 +204,7 @@ export default connect(function (state) {
|
|
|
204
204
|
return {
|
|
205
205
|
currentTheme: state.theme.current,
|
|
206
206
|
fullscreen: state.display.fullscreen,
|
|
207
|
-
|
|
207
|
+
viewMode: state.display.viewMode
|
|
208
208
|
};
|
|
209
209
|
}, {
|
|
210
210
|
setTopbarHeight: setTopbarHeight,
|
|
@@ -31,18 +31,25 @@ div.obliqueview-nav-rotate {
|
|
|
31
31
|
align-items: center;
|
|
32
32
|
justify-content: center;
|
|
33
33
|
flex-wrap: wrap;
|
|
34
|
-
width:
|
|
35
|
-
height:
|
|
36
|
-
border-radius: 3em;
|
|
37
|
-
color: var(--map-button-text-color);
|
|
38
|
-
background-color: var(--map-button-bg-color);
|
|
39
|
-
box-shadow: 0px 5px 10px rgba(136, 136, 136, 0.5);
|
|
34
|
+
width: 6em;
|
|
35
|
+
height: 6em;
|
|
40
36
|
margin-bottom: 0.5em;
|
|
41
37
|
transition: transform 0.5s;
|
|
42
38
|
}
|
|
43
39
|
|
|
44
40
|
div.obliqueview-nav-rotate > span {
|
|
45
|
-
flex: 0 0
|
|
41
|
+
flex: 0 0 2em;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
div.obliqueview-nav-circle {
|
|
45
|
+
position: absolute;
|
|
46
|
+
left: .75em;
|
|
47
|
+
top: .75em;
|
|
48
|
+
right: .75em;
|
|
49
|
+
bottom: .75em;
|
|
50
|
+
border: 4px solid var(--map-button-bg-color);
|
|
51
|
+
z-index: -1;
|
|
52
|
+
border-radius: 4.5em;
|
|
46
53
|
}
|
|
47
54
|
|
|
48
55
|
span.obliqueview-nav-dir {
|
|
@@ -52,12 +59,17 @@ span.obliqueview-nav-dir {
|
|
|
52
59
|
font-weight: bold;
|
|
53
60
|
cursor: pointer;
|
|
54
61
|
transition: transform 0.5s;
|
|
62
|
+
border-radius: 6px;
|
|
63
|
+
color: var(--map-button-text-color);
|
|
64
|
+
background-color: var(--map-button-bg-color);
|
|
65
|
+
box-shadow: 0px 5px 10px rgba(136, 136, 136, 0.5);
|
|
66
|
+
line-height: 2em;
|
|
55
67
|
}
|
|
56
68
|
|
|
57
69
|
div.obliqueview-nav-zoom {
|
|
58
70
|
position: absolute;
|
|
59
|
-
right:
|
|
60
|
-
top:
|
|
71
|
+
right: 1.5em;
|
|
72
|
+
top: 8em;
|
|
61
73
|
width: 2em;
|
|
62
74
|
display: flex;
|
|
63
75
|
align-items: center;
|
|
@@ -90,7 +102,8 @@ div.obliqueview-bottombar {
|
|
|
90
102
|
right: 0;
|
|
91
103
|
bottom: 0;
|
|
92
104
|
height: 3em;
|
|
93
|
-
|
|
105
|
+
padding: 0 0.5em;
|
|
106
|
+
z-index: 3;
|
|
94
107
|
color: var(--panel-text-color);
|
|
95
108
|
background-color: var(--panel-bg-color);
|
|
96
109
|
box-shadow: 0 -2px 4px rgba(136, 136, 136, 0.5);
|
|
@@ -98,7 +111,10 @@ div.obliqueview-bottombar {
|
|
|
98
111
|
font-size: 75%;
|
|
99
112
|
display: flex;
|
|
100
113
|
align-items: center;
|
|
101
|
-
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
span.obliqueview-bottombar-spacer {
|
|
117
|
+
flex: 1 1 auto;
|
|
102
118
|
}
|
|
103
119
|
|
|
104
120
|
div.obliqueview-scalechooser {
|
package/reducers/display.js
CHANGED
|
@@ -15,7 +15,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
15
15
|
import { TOGGLE_FULLSCREEN, SET_VIEW_3D_MODE } from '../actions/display';
|
|
16
16
|
var defaultState = {
|
|
17
17
|
fullscreen: false,
|
|
18
|
-
|
|
18
|
+
viewMode: 0
|
|
19
19
|
};
|
|
20
20
|
export default function toggleFullscreen() {
|
|
21
21
|
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultState;
|
|
@@ -30,7 +30,7 @@ export default function toggleFullscreen() {
|
|
|
30
30
|
case SET_VIEW_3D_MODE:
|
|
31
31
|
{
|
|
32
32
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
33
|
-
|
|
33
|
+
viewMode: action.mode
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
default:
|
package/reducers/layers.js
CHANGED
|
@@ -390,7 +390,7 @@ export default function layers() {
|
|
|
390
390
|
}
|
|
391
391
|
case REORDER_LAYER:
|
|
392
392
|
{
|
|
393
|
-
var
|
|
393
|
+
var _newLayers0 = LayerUtils.reorderLayer(state.flat, action.layer, action.sublayerpath, action.direction, action.preventSplittingGroups).map(function (layer) {
|
|
394
394
|
if (layer.type === "wms") {
|
|
395
395
|
return _objectSpread(_objectSpread({}, layer), LayerUtils.buildWMSLayerParams(layer, state.filter));
|
|
396
396
|
} else {
|
|
@@ -398,24 +398,24 @@ export default function layers() {
|
|
|
398
398
|
}
|
|
399
399
|
});
|
|
400
400
|
UrlParams.updateParams({
|
|
401
|
-
l: LayerUtils.buildWMSLayerUrlParam(
|
|
401
|
+
l: LayerUtils.buildWMSLayerUrlParam(_newLayers0)
|
|
402
402
|
});
|
|
403
403
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
404
|
-
flat:
|
|
404
|
+
flat: _newLayers0
|
|
405
405
|
});
|
|
406
406
|
}
|
|
407
407
|
case REPLACE_PLACEHOLDER_LAYER:
|
|
408
408
|
{
|
|
409
|
-
var
|
|
409
|
+
var _newLayers1 = LayerUtils.replacePlaceholderLayer(state.flat, action.id, action.layer, state.filter);
|
|
410
410
|
UrlParams.updateParams({
|
|
411
|
-
l: LayerUtils.buildWMSLayerUrlParam(
|
|
411
|
+
l: LayerUtils.buildWMSLayerUrlParam(_newLayers1)
|
|
412
412
|
});
|
|
413
413
|
var _newEditConfigs3 = state.editConfigs;
|
|
414
414
|
if (action.layer.editConfig && action.layer.wms_name) {
|
|
415
415
|
_newEditConfigs3 = _objectSpread(_objectSpread({}, _newEditConfigs3), {}, _defineProperty({}, action.layer.wms_name, _objectSpread(_objectSpread({}, _newEditConfigs3[action.layer.wms_name]), action.layer.editConfig)));
|
|
416
416
|
}
|
|
417
417
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
418
|
-
flat:
|
|
418
|
+
flat: _newLayers1,
|
|
419
419
|
editConfigs: _newEditConfigs3
|
|
420
420
|
});
|
|
421
421
|
}
|
|
@@ -432,20 +432,20 @@ export default function layers() {
|
|
|
432
432
|
filterGeom: action.filterGeom,
|
|
433
433
|
timeRange: action.timeRange
|
|
434
434
|
};
|
|
435
|
-
var
|
|
435
|
+
var _newLayers10 = state.flat.map(function (layer) {
|
|
436
436
|
if (layer.type === "wms") {
|
|
437
437
|
return _objectSpread(_objectSpread({}, layer), LayerUtils.buildWMSLayerParams(layer, filter));
|
|
438
438
|
}
|
|
439
439
|
return layer;
|
|
440
440
|
});
|
|
441
441
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
442
|
-
flat:
|
|
442
|
+
flat: _newLayers10,
|
|
443
443
|
filter: filter
|
|
444
444
|
});
|
|
445
445
|
}
|
|
446
446
|
case SET_THEME_LAYERS_VISIBILITY_PRESET:
|
|
447
447
|
{
|
|
448
|
-
var
|
|
448
|
+
var _newLayers11 = state.flat.map(function (layer) {
|
|
449
449
|
if (layer.role === LayerRole.THEME) {
|
|
450
450
|
var _newLayer2 = LayerUtils.applyVisibilityPreset(layer, action.preset);
|
|
451
451
|
return _objectSpread(_objectSpread({}, _newLayer2), LayerUtils.buildWMSLayerParams(_newLayer2, state.filter));
|
|
@@ -454,10 +454,10 @@ export default function layers() {
|
|
|
454
454
|
}
|
|
455
455
|
});
|
|
456
456
|
UrlParams.updateParams({
|
|
457
|
-
l: LayerUtils.buildWMSLayerUrlParam(
|
|
457
|
+
l: LayerUtils.buildWMSLayerUrlParam(_newLayers11)
|
|
458
458
|
});
|
|
459
459
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
460
|
-
flat:
|
|
460
|
+
flat: _newLayers11
|
|
461
461
|
});
|
|
462
462
|
}
|
|
463
463
|
default:
|
|
@@ -13,16 +13,19 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
13
13
|
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; }
|
|
14
14
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
15
15
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
16
|
+
var reactDocs = require("react-docgen");
|
|
16
17
|
var fs = require("fs");
|
|
17
18
|
var path = require("path");
|
|
18
|
-
var
|
|
19
|
+
var findAllDefinitionsResolver = new reactDocs.builtinResolvers.FindAllDefinitionsResolver();
|
|
19
20
|
var qwcPluginDir = __dirname + '/../plugins';
|
|
20
21
|
var pluginData = [];
|
|
21
22
|
fs.readdirSync(qwcPluginDir).forEach(function (entry) {
|
|
22
23
|
if (entry.endsWith(".jsx")) {
|
|
23
24
|
var file = path.resolve(qwcPluginDir, entry);
|
|
24
25
|
var contents = fs.readFileSync(file);
|
|
25
|
-
pluginData.push(reactDocs.parse(contents,
|
|
26
|
+
pluginData.push(reactDocs.parse(contents, {
|
|
27
|
+
resolver: findAllDefinitionsResolver
|
|
28
|
+
}));
|
|
26
29
|
}
|
|
27
30
|
});
|
|
28
31
|
pluginData = pluginData.flat();
|
|
@@ -31,7 +34,9 @@ fs.readdirSync(qwcPluginDir + "/map").forEach(function (entry) {
|
|
|
31
34
|
if (entry.endsWith(".jsx")) {
|
|
32
35
|
var file = path.resolve(qwcPluginDir, "map", entry);
|
|
33
36
|
var contents = fs.readFileSync(file);
|
|
34
|
-
mapToolPluginData.push(reactDocs.parse(contents,
|
|
37
|
+
mapToolPluginData.push(reactDocs.parse(contents, {
|
|
38
|
+
resolver: findAllDefinitionsResolver
|
|
39
|
+
}));
|
|
35
40
|
}
|
|
36
41
|
});
|
|
37
42
|
mapToolPluginData = mapToolPluginData.flat();
|
|
@@ -40,7 +45,9 @@ fs.readdirSync(qwcPluginDir + "/map3d").forEach(function (entry) {
|
|
|
40
45
|
if (entry.endsWith(".jsx")) {
|
|
41
46
|
var file = path.resolve(qwcPluginDir, "map3d", entry);
|
|
42
47
|
var contents = fs.readFileSync(file);
|
|
43
|
-
plugin3dData.push(reactDocs.parse(contents,
|
|
48
|
+
plugin3dData.push(reactDocs.parse(contents, {
|
|
49
|
+
resolver: findAllDefinitionsResolver
|
|
50
|
+
}));
|
|
44
51
|
}
|
|
45
52
|
});
|
|
46
53
|
plugin3dData = plugin3dData.flat();
|
package/scripts/makeIconkit.js
CHANGED
|
@@ -4,14 +4,14 @@ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol
|
|
|
4
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; } }
|
|
5
5
|
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; }
|
|
6
6
|
var webfontsGenerator = require('@furkot/webfonts-generator');
|
|
7
|
+
var fs = require('fs');
|
|
7
8
|
var glob = require('glob');
|
|
8
9
|
var mkdirp = require('mkdirp');
|
|
9
|
-
var fs = require('fs');
|
|
10
10
|
var path = require('path');
|
|
11
11
|
var readJSON = function readJSON(filename) {
|
|
12
12
|
try {
|
|
13
13
|
return JSON.parse(fs.readFileSync(process.cwd() + filename, "utf8"));
|
|
14
|
-
} catch (
|
|
14
|
+
} catch (_unused) {
|
|
15
15
|
return {};
|
|
16
16
|
}
|
|
17
17
|
};
|