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,7 +1,7 @@
|
|
|
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
2
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); } }
|
|
3
4
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
4
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
5
5
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
6
6
|
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
7
7
|
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
@@ -23,35 +23,51 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
23
23
|
import React from 'react';
|
|
24
24
|
import { connect } from 'react-redux';
|
|
25
25
|
import PropTypes from 'prop-types';
|
|
26
|
-
import {
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import './
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
import { setViewMode, ViewMode } from '../actions/display';
|
|
27
|
+
import ConfigUtils from '../utils/ConfigUtils';
|
|
28
|
+
import { UrlParams } from '../utils/PermaLinkUtils';
|
|
29
|
+
import Icon from './Icon';
|
|
30
|
+
import MapButton from './MapButton';
|
|
31
|
+
import './style/ViewSwitcher.css';
|
|
32
|
+
var ViewSwitcher = /*#__PURE__*/function (_React$Component) {
|
|
33
|
+
function ViewSwitcher() {
|
|
32
34
|
var _this;
|
|
33
|
-
_classCallCheck(this,
|
|
35
|
+
_classCallCheck(this, ViewSwitcher);
|
|
34
36
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
35
37
|
args[_key] = arguments[_key];
|
|
36
38
|
}
|
|
37
|
-
_this = _callSuper(this,
|
|
39
|
+
_this = _callSuper(this, ViewSwitcher, [].concat(args));
|
|
38
40
|
_defineProperty(_this, "state", {
|
|
39
41
|
expanded: false
|
|
40
42
|
});
|
|
41
43
|
_defineProperty(_this, "render", function () {
|
|
44
|
+
var _this$props$theme, _this$props$theme2;
|
|
42
45
|
var buttons = [{
|
|
43
|
-
mode:
|
|
46
|
+
mode: ViewMode._2D,
|
|
44
47
|
icon: "2d"
|
|
45
|
-
}, {
|
|
46
|
-
mode: View3DMode.FULLSCREEN,
|
|
47
|
-
icon: "3d"
|
|
48
|
-
}, {
|
|
49
|
-
mode: View3DMode.SPLITSCREEN,
|
|
50
|
-
icon: "3d2d"
|
|
51
48
|
}];
|
|
49
|
+
if ((_this$props$theme = _this.props.theme) !== null && _this$props$theme !== void 0 && _this$props$theme.map3d && ConfigUtils.havePlugin("View3D")) {
|
|
50
|
+
buttons.push({
|
|
51
|
+
mode: ViewMode._3DFullscreen,
|
|
52
|
+
icon: "3d"
|
|
53
|
+
});
|
|
54
|
+
buttons.push({
|
|
55
|
+
mode: ViewMode._3DSplitscreen,
|
|
56
|
+
icon: "3d2d"
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
if ((_this$props$theme2 = _this.props.theme) !== null && _this$props$theme2 !== void 0 && _this$props$theme2.obliqueDatasets && ConfigUtils.havePlugin("ObliqueView")) {
|
|
60
|
+
buttons.push({
|
|
61
|
+
mode: ViewMode._Oblique,
|
|
62
|
+
icon: "oblique"
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
if (buttons.length <= 1) {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
52
68
|
return /*#__PURE__*/React.createElement(MapButton, {
|
|
53
69
|
active: _this.state.expanded,
|
|
54
|
-
|
|
70
|
+
className: "view-switcher-button",
|
|
55
71
|
icon: "view",
|
|
56
72
|
iconSize: "xlarge",
|
|
57
73
|
onClick: function onClick() {
|
|
@@ -63,11 +79,11 @@ var View3DSwitcher = /*#__PURE__*/function (_React$Component) {
|
|
|
63
79
|
},
|
|
64
80
|
position: _this.props.position
|
|
65
81
|
}, /*#__PURE__*/React.createElement("div", {
|
|
66
|
-
className: "
|
|
67
|
-
inert: _this.state.expanded
|
|
82
|
+
className: "view-switcher-buttons" + (_this.state.expanded ? " view-switcher-buttons-expanded" : ""),
|
|
83
|
+
inert: !_this.state.expanded
|
|
68
84
|
}, buttons.map(function (button) {
|
|
69
85
|
return /*#__PURE__*/React.createElement("button", {
|
|
70
|
-
className: "map-button" + (button.mode === _this.props.
|
|
86
|
+
className: "map-button" + (button.mode === _this.props.viewMode ? " map-button-active" : ""),
|
|
71
87
|
key: button.icon,
|
|
72
88
|
onClick: function onClick() {
|
|
73
89
|
return _this.switchMode(button.mode);
|
|
@@ -79,26 +95,55 @@ var View3DSwitcher = /*#__PURE__*/function (_React$Component) {
|
|
|
79
95
|
})));
|
|
80
96
|
});
|
|
81
97
|
_defineProperty(_this, "switchMode", function (mode) {
|
|
82
|
-
_this.props.
|
|
98
|
+
_this.props.setViewMode(mode);
|
|
83
99
|
_this.setState({
|
|
84
100
|
expanded: false
|
|
85
101
|
});
|
|
86
102
|
});
|
|
87
103
|
return _this;
|
|
88
104
|
}
|
|
89
|
-
_inherits(
|
|
90
|
-
return _createClass(
|
|
105
|
+
_inherits(ViewSwitcher, _React$Component);
|
|
106
|
+
return _createClass(ViewSwitcher, [{
|
|
107
|
+
key: "componentDidUpdate",
|
|
108
|
+
value: function componentDidUpdate(prevProps) {
|
|
109
|
+
// Handle view mode change
|
|
110
|
+
if (this.props.viewMode !== prevProps.viewMode) {
|
|
111
|
+
if (this.props.viewMode === ViewMode._3DFullscreen) {
|
|
112
|
+
UrlParams.updateParams({
|
|
113
|
+
v: "3d"
|
|
114
|
+
});
|
|
115
|
+
} else if (this.props.viewMode === ViewMode._3DSplitscreen) {
|
|
116
|
+
UrlParams.updateParams({
|
|
117
|
+
v: "3d2d"
|
|
118
|
+
});
|
|
119
|
+
} else if (this.props.viewMode === ViewMode._Oblique) {
|
|
120
|
+
UrlParams.updateParams({
|
|
121
|
+
v: "oblique"
|
|
122
|
+
});
|
|
123
|
+
} else {
|
|
124
|
+
UrlParams.updateParams({
|
|
125
|
+
v: "2d"
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}]);
|
|
91
131
|
}(React.Component);
|
|
92
|
-
_defineProperty(
|
|
132
|
+
_defineProperty(ViewSwitcher, "propTypes", {
|
|
93
133
|
position: PropTypes.number,
|
|
94
|
-
|
|
134
|
+
setViewMode: PropTypes.func,
|
|
95
135
|
switchTo: PropTypes.string,
|
|
96
|
-
|
|
136
|
+
theme: PropTypes.object,
|
|
137
|
+
viewMode: PropTypes.number
|
|
138
|
+
});
|
|
139
|
+
_defineProperty(ViewSwitcher, "defaultProps", {
|
|
140
|
+
position: 1
|
|
97
141
|
});
|
|
98
142
|
export default connect(function (state) {
|
|
99
143
|
return {
|
|
100
|
-
|
|
144
|
+
viewMode: state.display.viewMode,
|
|
145
|
+
theme: state.theme.current
|
|
101
146
|
};
|
|
102
147
|
}, {
|
|
103
|
-
|
|
104
|
-
})(
|
|
148
|
+
setViewMode: setViewMode
|
|
149
|
+
})(ViewSwitcher);
|
package/components/map/OlMap.js
CHANGED
|
@@ -137,7 +137,7 @@ var OlMap = /*#__PURE__*/function (_React$Component) {
|
|
|
137
137
|
var featureObj = format.writeFeatureObject(feature);
|
|
138
138
|
featureObj.layerId = layer ? layer.get('id') : null;
|
|
139
139
|
features.push(featureObj);
|
|
140
|
-
} catch (
|
|
140
|
+
} catch (_unused) {
|
|
141
141
|
/* pass */
|
|
142
142
|
}
|
|
143
143
|
}, {
|
|
@@ -36,11 +36,11 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
36
36
|
import React, { Suspense } from 'react';
|
|
37
37
|
import ReactDOM from 'react-dom';
|
|
38
38
|
import { connect } from 'react-redux';
|
|
39
|
-
import
|
|
39
|
+
import CoordinateSystem from '@giro3d/giro3d/core/geographic/coordinate-system/CoordinateSystem';
|
|
40
40
|
import Coordinates, { crsIsGeographic } from '@giro3d/giro3d/core/geographic/Coordinates';
|
|
41
41
|
import Ellipsoid from '@giro3d/giro3d/core/geographic/Ellipsoid';
|
|
42
42
|
import Extent from '@giro3d/giro3d/core/geographic/Extent.js';
|
|
43
|
-
import
|
|
43
|
+
import Instance from '@giro3d/giro3d/core/Instance.js';
|
|
44
44
|
import ElevationLayer from '@giro3d/giro3d/core/layer/ElevationLayer.js';
|
|
45
45
|
import DrapedFeatureCollection from '@giro3d/giro3d/entities/DrapedFeatureCollection';
|
|
46
46
|
import Map from '@giro3d/giro3d/entities/Map.js';
|
|
@@ -65,15 +65,15 @@ import { registerPermalinkDataStoreHook, unregisterPermalinkDataStoreHook, UrlPa
|
|
|
65
65
|
import ServiceLayerUtils from '../../utils/ServiceLayerUtils';
|
|
66
66
|
import ThemeUtils from '../../utils/ThemeUtils';
|
|
67
67
|
import { MapContainerPortalContext } from '../PluginsContainer';
|
|
68
|
+
import ViewSwitcher from '../ViewSwitcher';
|
|
68
69
|
import EditDataset3D from './EditDataset3D';
|
|
69
|
-
import MapControls3D from './MapControls3D';
|
|
70
|
-
import View3DSwitcher from './View3DSwitcher';
|
|
71
70
|
import LayerRegistry from './layers/index';
|
|
71
|
+
import MapControls3D from './MapControls3D';
|
|
72
72
|
import { importGltf, updateObjectLabel } from './utils/MiscUtils3D';
|
|
73
73
|
import Tiles3DStyle from './utils/Tiles3DStyle';
|
|
74
74
|
import './style/Map3D.css';
|
|
75
75
|
|
|
76
|
-
// Ensures
|
|
76
|
+
// Ensures onUnload is called *after* all other children have unmounted
|
|
77
77
|
var UnloadWrapper = /*#__PURE__*/function (_React$Component) {
|
|
78
78
|
function UnloadWrapper() {
|
|
79
79
|
var _this;
|
|
@@ -587,7 +587,7 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
|
|
|
587
587
|
}
|
|
588
588
|
});
|
|
589
589
|
_defineProperty(_this2, "setupInstance", function () {
|
|
590
|
-
var _this2$props$theme$ma, _this2$props$theme$ma2, _this2$props$theme$ma3, _this2$props$theme$ma4, _this2$props$theme$ma5, _this2$props$theme$ma8, _this2$props$theme$ma9, _this2$props$theme$
|
|
590
|
+
var _this2$props$theme$ma, _this2$props$theme$ma2, _this2$props$theme$ma3, _this2$props$theme$ma4, _this2$props$theme$ma5, _this2$props$theme$ma8, _this2$props$theme$ma9, _this2$props$theme$ma0;
|
|
591
591
|
if (_this2.instance) {
|
|
592
592
|
_this2.disposeInstance();
|
|
593
593
|
}
|
|
@@ -699,19 +699,19 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
|
|
|
699
699
|
_this2.instance.notifyChange(tiles);
|
|
700
700
|
});
|
|
701
701
|
// Apply style when loading tile
|
|
702
|
-
tiles.tiles.addEventListener('load-model', function (
|
|
702
|
+
tiles.tiles.addEventListener('load-model', function (_ref0) {
|
|
703
703
|
var _entry$idAttr;
|
|
704
|
-
var scene =
|
|
704
|
+
var scene = _ref0.scene;
|
|
705
705
|
scene.userData.tilesetName = entry.name;
|
|
706
706
|
scene.userData.featureIdAttr = (_entry$idAttr = entry.idAttr) !== null && _entry$idAttr !== void 0 ? _entry$idAttr : "id";
|
|
707
707
|
Tiles3DStyle.applyTileStyle(scene, _this2.state.sceneContext.sceneObjects[entry.name], _this2.state.sceneContext);
|
|
708
708
|
_this2.instance.notifyChange(tiles);
|
|
709
709
|
});
|
|
710
710
|
// Show/hide labels when tile visibility changes
|
|
711
|
-
tiles.tiles.addEventListener('tile-visibility-change', function (
|
|
711
|
+
tiles.tiles.addEventListener('tile-visibility-change', function (_ref1) {
|
|
712
712
|
var _scene$userData$tileL2, _scene$userData2;
|
|
713
|
-
var scene =
|
|
714
|
-
visible =
|
|
713
|
+
var scene = _ref1.scene,
|
|
714
|
+
visible = _ref1.visible;
|
|
715
715
|
Object.values((_scene$userData$tileL2 = scene === null || scene === void 0 || (_scene$userData2 = scene.userData) === null || _scene$userData2 === void 0 ? void 0 : _scene$userData2.tileLabels) !== null && _scene$userData$tileL2 !== void 0 ? _scene$userData$tileL2 : {}).forEach(function (label) {
|
|
716
716
|
label.labelObject.visible = visible;
|
|
717
717
|
label.labelObject.element.style.display = visible ? 'initial' : 'none';
|
|
@@ -739,7 +739,7 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
|
|
|
739
739
|
});
|
|
740
740
|
|
|
741
741
|
// Add other objects
|
|
742
|
-
(((_this2$props$theme$
|
|
742
|
+
(((_this2$props$theme$ma0 = _this2.props.theme.map3d) === null || _this2$props$theme$ma0 === void 0 ? void 0 : _this2$props$theme$ma0.objects3d) || []).forEach(function (entry) {
|
|
743
743
|
var _entry$title2, _entry$visibility2;
|
|
744
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
|
|
@@ -779,10 +779,10 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
|
|
|
779
779
|
var isFirstPerson = _this2.state.sceneContext.scene.view.controls.isFirstPerson;
|
|
780
780
|
var maxDistance = isFirstPerson ? 200 + 20 * quality : 500 + quality * quality;
|
|
781
781
|
// Hide scene objects according to scene quality
|
|
782
|
-
Object.entries(_this2.state.sceneContext.sceneObjects).forEach(function (
|
|
783
|
-
var
|
|
784
|
-
objId =
|
|
785
|
-
options =
|
|
782
|
+
Object.entries(_this2.state.sceneContext.sceneObjects).forEach(function (_ref10) {
|
|
783
|
+
var _ref11 = _slicedToArray(_ref10, 2),
|
|
784
|
+
objId = _ref11[0],
|
|
785
|
+
options = _ref11[1];
|
|
786
786
|
var object = _this2.objectMap[objId];
|
|
787
787
|
if (options.layertree && object.isObject3D && object.visible) {
|
|
788
788
|
object.children.forEach(function (child) {
|
|
@@ -803,10 +803,10 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
|
|
|
803
803
|
});
|
|
804
804
|
});
|
|
805
805
|
_defineProperty(_this2, "instanceOnUpdateEnd", function () {
|
|
806
|
-
Object.entries(_this2.state.sceneContext.sceneObjects).forEach(function (
|
|
807
|
-
var
|
|
808
|
-
objId =
|
|
809
|
-
options =
|
|
806
|
+
Object.entries(_this2.state.sceneContext.sceneObjects).forEach(function (_ref12) {
|
|
807
|
+
var _ref13 = _slicedToArray(_ref12, 2),
|
|
808
|
+
objId = _ref13[0],
|
|
809
|
+
options = _ref13[1];
|
|
810
810
|
var object = _this2.objectMap[objId];
|
|
811
811
|
if (options.layertree && object.isObject3D) {
|
|
812
812
|
object.children.forEach(function (child) {
|
|
@@ -816,8 +816,8 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
|
|
|
816
816
|
}
|
|
817
817
|
});
|
|
818
818
|
});
|
|
819
|
-
_defineProperty(_this2, "instanceOnBeforeEntityUpdate", function (
|
|
820
|
-
var entity =
|
|
819
|
+
_defineProperty(_this2, "instanceOnBeforeEntityUpdate", function (_ref14) {
|
|
820
|
+
var entity = _ref14.entity;
|
|
821
821
|
if (entity !== _this2.map) {
|
|
822
822
|
_this2.instance.view.camera.userData.__previousFar = _this2.instance.view.camera.far;
|
|
823
823
|
var quality = _this2.state.sceneContext.settings.sceneQuality;
|
|
@@ -826,8 +826,8 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
|
|
|
826
826
|
_this2.instance.view.camera.updateProjectionMatrix();
|
|
827
827
|
}
|
|
828
828
|
});
|
|
829
|
-
_defineProperty(_this2, "instanceOnAfterEntityUpdate", function (
|
|
830
|
-
var entity =
|
|
829
|
+
_defineProperty(_this2, "instanceOnAfterEntityUpdate", function (_ref15) {
|
|
830
|
+
var entity = _ref15.entity;
|
|
831
831
|
if (entity !== _this2.map) {
|
|
832
832
|
_this2.instance.view.camera.far = _this2.instance.view.camera.userData.__previousFar;
|
|
833
833
|
delete _this2.instance.view.camera.userData.__previousFar;
|
|
@@ -934,12 +934,12 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
|
|
|
934
934
|
ModelPixelScale = _image$fileDirectory.ModelPixelScale;
|
|
935
935
|
|
|
936
936
|
// Extract scale and tiepoint values
|
|
937
|
-
var
|
|
938
|
-
scaleX =
|
|
939
|
-
scaleY =
|
|
940
|
-
var
|
|
941
|
-
tiepointX =
|
|
942
|
-
tiepointY =
|
|
937
|
+
var _ref16 = [ModelPixelScale[0], ModelPixelScale[1]],
|
|
938
|
+
scaleX = _ref16[0],
|
|
939
|
+
scaleY = _ref16[1];
|
|
940
|
+
var _ref17 = [ModelTiepoint[3], ModelTiepoint[4]],
|
|
941
|
+
tiepointX = _ref17[0],
|
|
942
|
+
tiepointY = _ref17[1]; // Tiepoint world coordinates
|
|
943
943
|
|
|
944
944
|
// Calculate pixel indices (rounded to nearest integers)
|
|
945
945
|
var minPixelX = Math.round((dtmExt[0] - tiepointX) / scaleX);
|
|
@@ -1021,10 +1021,10 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
|
|
|
1021
1021
|
_this2.state.sceneContext.setViewToExtent(bounds, rotation);
|
|
1022
1022
|
});
|
|
1023
1023
|
_defineProperty(_this2, "store3dState", function () {
|
|
1024
|
-
var promises = Object.entries(_this2.state.sceneContext.sceneObjects).map(function (
|
|
1025
|
-
var
|
|
1026
|
-
objectId =
|
|
1027
|
-
entry =
|
|
1024
|
+
var promises = Object.entries(_this2.state.sceneContext.sceneObjects).map(function (_ref18) {
|
|
1025
|
+
var _ref19 = _slicedToArray(_ref18, 2),
|
|
1026
|
+
objectId = _ref19[0],
|
|
1027
|
+
entry = _ref19[1];
|
|
1028
1028
|
if (!entry.layertree) {
|
|
1029
1029
|
return null;
|
|
1030
1030
|
}
|
|
@@ -1064,10 +1064,10 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
|
|
|
1064
1064
|
var _this2$state$sceneCon2, _this2$state$sceneCon3;
|
|
1065
1065
|
var camera = _this2.state.sceneContext.scene.view.camera.position;
|
|
1066
1066
|
var target = _this2.state.sceneContext.scene.view.controls.target;
|
|
1067
|
-
var layers = Object.entries(_this2.state.sceneContext.colorLayers).map(function (
|
|
1068
|
-
var
|
|
1069
|
-
layerId =
|
|
1070
|
-
options =
|
|
1067
|
+
var layers = Object.entries(_this2.state.sceneContext.colorLayers).map(function (_ref20) {
|
|
1068
|
+
var _ref21 = _slicedToArray(_ref20, 2),
|
|
1069
|
+
layerId = _ref21[0],
|
|
1070
|
+
options = _ref21[1];
|
|
1071
1071
|
return {
|
|
1072
1072
|
id: layerId,
|
|
1073
1073
|
options: {
|
|
@@ -1181,7 +1181,9 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
|
|
|
1181
1181
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
1182
1182
|
var _this3 = this;
|
|
1183
1183
|
if (this.props.theme !== prevProps.theme) {
|
|
1184
|
-
this.
|
|
1184
|
+
if (this.props.theme.map3d) {
|
|
1185
|
+
this.setupInstance();
|
|
1186
|
+
}
|
|
1185
1187
|
} else if (this.props.layers !== prevProps.layers) {
|
|
1186
1188
|
this.setState(function (state) {
|
|
1187
1189
|
return {
|
|
@@ -1207,10 +1209,10 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
|
|
|
1207
1209
|
this.setState(function (state) {
|
|
1208
1210
|
return {
|
|
1209
1211
|
sceneContext: _objectSpread(_objectSpread({}, state.sceneContext), {}, {
|
|
1210
|
-
collisionObjects: Object.entries(state.sceneContext.sceneObjects).map(function (
|
|
1211
|
-
var
|
|
1212
|
-
objId =
|
|
1213
|
-
options =
|
|
1212
|
+
collisionObjects: Object.entries(state.sceneContext.sceneObjects).map(function (_ref22) {
|
|
1213
|
+
var _ref23 = _slicedToArray(_ref22, 2),
|
|
1214
|
+
objId = _ref23[0],
|
|
1215
|
+
options = _ref23[1];
|
|
1214
1216
|
if (options.layertree && options.visibility) {
|
|
1215
1217
|
var _obj$tiles$group, _obj$tiles;
|
|
1216
1218
|
var obj = _this3.objectMap[objId];
|
|
@@ -1249,12 +1251,12 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
|
|
|
1249
1251
|
sceneContext: this.state.sceneContext
|
|
1250
1252
|
}, /*#__PURE__*/React.createElement(EditDataset3D, {
|
|
1251
1253
|
sceneContext: this.state.sceneContext
|
|
1252
|
-
}), /*#__PURE__*/React.createElement(
|
|
1254
|
+
}), /*#__PURE__*/React.createElement(ViewSwitcher, {
|
|
1253
1255
|
position: 1
|
|
1254
|
-
}), Object.entries(this.props.plugins3d).map(function (
|
|
1255
|
-
var
|
|
1256
|
-
name =
|
|
1257
|
-
Component =
|
|
1256
|
+
}), Object.entries(this.props.plugins3d).map(function (_ref24) {
|
|
1257
|
+
var _ref25 = _slicedToArray(_ref24, 2),
|
|
1258
|
+
name = _ref25[0],
|
|
1259
|
+
Component = _ref25[1];
|
|
1258
1260
|
return /*#__PURE__*/React.createElement(Suspense, {
|
|
1259
1261
|
key: name
|
|
1260
1262
|
}, /*#__PURE__*/React.createElement(Component, _extends({
|
|
@@ -374,7 +374,10 @@ var MapControls3D = /*#__PURE__*/function (_React$Component) {
|
|
|
374
374
|
style: {
|
|
375
375
|
order: 996
|
|
376
376
|
}
|
|
377
|
-
}), this.context) : null
|
|
377
|
+
}), this.context) : null, /*#__PURE__*/React.createElement("span", {
|
|
378
|
+
key: "Unloader",
|
|
379
|
+
ref: this.unload
|
|
380
|
+
})];
|
|
378
381
|
}
|
|
379
382
|
}]);
|
|
380
383
|
}(React.Component);
|
|
@@ -33,8 +33,8 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
33
33
|
import React from 'react';
|
|
34
34
|
import PropTypes from 'prop-types';
|
|
35
35
|
import { Color, Group, Vector3 } from 'three';
|
|
36
|
-
import { TransformControls } from 'three/addons/controls/TransformControls';
|
|
37
36
|
import { CSG } from 'three-csg-ts';
|
|
37
|
+
import { TransformControls } from 'three/addons/controls/TransformControls';
|
|
38
38
|
import LocaleUtils from '../../../utils/LocaleUtils';
|
|
39
39
|
import Icon from '../../Icon';
|
|
40
40
|
import ButtonBar from '../../widgets/ButtonBar';
|
|
@@ -22,8 +22,8 @@ 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
25
|
import CoordinateSystem from '@giro3d/giro3d/core/geographic/coordinate-system/CoordinateSystem';
|
|
26
|
+
import Extent from '@giro3d/giro3d/core/geographic/Extent';
|
|
27
27
|
import ColorLayer from '@giro3d/giro3d/core/layer/ColorLayer';
|
|
28
28
|
import StreamableFeatureSource, { wfsBuilder, tiledLoadingStrategy } from '@giro3d/giro3d/sources/StreamableFeatureSource';
|
|
29
29
|
import VectorSource from "@giro3d/giro3d/sources/VectorSource.js";
|
|
@@ -21,9 +21,9 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
21
21
|
* LICENSE file in the root directory of this source tree.
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
|
+
import { QRCodeCanvas } from 'qrcode.react';
|
|
24
25
|
import React from 'react';
|
|
25
26
|
import PropTypes from 'prop-types';
|
|
26
|
-
import { QRCodeCanvas } from 'qrcode.react';
|
|
27
27
|
import LocaleUtils from '../../utils/LocaleUtils';
|
|
28
28
|
import CopyButton from '../widgets/CopyButton';
|
|
29
29
|
var ShareQRCode = /*#__PURE__*/function (_React$Component) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
div.overview-map
|
|
1
|
+
div.overview-map {
|
|
2
2
|
position: absolute;
|
|
3
3
|
bottom: 0;
|
|
4
4
|
right: 0;
|
|
5
5
|
z-index: 101;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
div.overview-map
|
|
8
|
+
div.overview-map > button {
|
|
9
9
|
font-size: initial!important;
|
|
10
10
|
right: 0.25em;
|
|
11
11
|
bottom: 0.25em;
|
|
@@ -21,7 +21,7 @@ div.overview-map-3d > button {
|
|
|
21
21
|
font-weight: bold;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
div.overview-map
|
|
24
|
+
div.overview-map > div.ol-overviewmap-map {
|
|
25
25
|
position: absolute;
|
|
26
26
|
right: 1px;
|
|
27
27
|
bottom: 1px;
|
|
@@ -32,6 +32,6 @@ div.overview-map-3d > div.ol-overviewmap-map-3d {
|
|
|
32
32
|
border: 1px solid var(--border-color);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
div.overview-map
|
|
35
|
+
div.overview-map.ol-collapsed > div.ol-overviewmap-map {
|
|
36
36
|
display: none;
|
|
37
37
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
button.view-switcher-button {
|
|
2
|
+
position: relative;
|
|
3
|
+
z-index: 2;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
div.view-switcher-buttons > button {
|
|
7
|
+
transition: right 0.25s, box-shadow 0.25s;
|
|
8
|
+
position: absolute;
|
|
9
|
+
right: 0;
|
|
10
|
+
bottom: 0;
|
|
11
|
+
z-index: 1;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
div.view-switcher-buttons:not(div.view-switcher-buttons-expanded) button {
|
|
15
|
+
box-shadow: none;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
div.view-switcher-buttons-expanded > button:nth-child(1) {
|
|
19
|
+
right: 4em;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
div.view-switcher-buttons-expanded > button:nth-child(2) {
|
|
23
|
+
right: 8em;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
div.view-switcher-buttons-expanded > button:nth-child(3) {
|
|
27
|
+
right: 12em;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
div.view-switcher-buttons-expanded > button:nth-child(4) {
|
|
31
|
+
right: 16em;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
div.view-switcher-buttons-expanded > button:nth-child(5) {
|
|
35
|
+
right: 20em;
|
|
36
|
+
}
|
|
@@ -26,12 +26,12 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
26
26
|
* LICENSE file in the root directory of this source tree.
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
|
-
import React from 'react';
|
|
30
29
|
import { ColorPicker } from '@vtaits/react-color-picker';
|
|
30
|
+
import '@vtaits/react-color-picker/index.css';
|
|
31
|
+
import React from 'react';
|
|
31
32
|
import PropTypes from 'prop-types';
|
|
32
33
|
import MiscUtils from '../../utils/MiscUtils';
|
|
33
34
|
import './style/ColorButton.css';
|
|
34
|
-
import '@vtaits/react-color-picker/index.css';
|
|
35
35
|
var defaultColors = [
|
|
36
36
|
// [r, g, b, a]
|
|
37
37
|
[255, 255, 255, 1], [0, 0, 0, 1], [255, 105, 0, 1], [252, 185, 0, 1], [0, 208, 132, 1], [142, 209, 252, 1], [6, 147, 227, 1], [171, 184, 195, 1], [235, 20, 76, 1], [247, 141, 167, 1]];
|
|
@@ -121,8 +121,8 @@ var LayerCatalogWidget = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
121
121
|
return res;
|
|
122
122
|
}, []);
|
|
123
123
|
if (existingSublayers.includes((_entry$name = entry.name) !== null && _entry$name !== void 0 ? _entry$name : resource === null || resource === void 0 ? void 0 : resource.name)) {
|
|
124
|
-
var
|
|
125
|
-
var text =
|
|
124
|
+
var _entry$title;
|
|
125
|
+
var text = LocaleUtils.tr("themelayerslist.existinglayers") + ": " + ((_entry$title = entry.title) !== null && _entry$title !== void 0 ? _entry$title : entry.name);
|
|
126
126
|
var actions = [{
|
|
127
127
|
name: LocaleUtils.tr("themelayerslist.addanyway"),
|
|
128
128
|
onClick: function onClick() {
|
|
@@ -139,13 +139,13 @@ var LayerCatalogWidget = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
139
139
|
var asGroup = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
140
140
|
_this.props.closeWindow("existinglayers");
|
|
141
141
|
if (resource) {
|
|
142
|
-
var _entry$
|
|
142
|
+
var _entry$title2;
|
|
143
143
|
// Create placeholder layer
|
|
144
144
|
_this.props.addLayer({
|
|
145
145
|
id: resource.id,
|
|
146
146
|
type: "placeholder",
|
|
147
147
|
name: resource.name,
|
|
148
|
-
title: (_entry$
|
|
148
|
+
title: (_entry$title2 = entry.title) !== null && _entry$title2 !== void 0 ? _entry$title2 : resource.name,
|
|
149
149
|
role: resource.USERLAYER,
|
|
150
150
|
loading: true
|
|
151
151
|
});
|
package/libs/openlayers.js
CHANGED
|
@@ -13,15 +13,9 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
+
import OlInteractionDrawRegular from 'ol-ext/interaction/DrawRegular';
|
|
17
|
+
import OlInteractionTransform from 'ol-ext/interaction/Transform';
|
|
16
18
|
import OlCollection from 'ol/Collection';
|
|
17
|
-
import OlFeature from 'ol/Feature';
|
|
18
|
-
import OlGeolocation from 'ol/Geolocation';
|
|
19
|
-
import OlKinetic from 'ol/Kinetic';
|
|
20
|
-
import OlMap from 'ol/Map';
|
|
21
|
-
import OlObject from 'ol/Object';
|
|
22
|
-
import OlOverlay from 'ol/Overlay';
|
|
23
|
-
import OlTileQueue from 'ol/TileQueue';
|
|
24
|
-
import OlView from 'ol/View';
|
|
25
19
|
import { defaults as olControlDefaults } from 'ol/control';
|
|
26
20
|
import OlControlAttribution from 'ol/control/Attribution';
|
|
27
21
|
import OlControlOverviewMap from 'ol/control/OverviewMap';
|
|
@@ -29,16 +23,18 @@ import OlControlScaleLine from 'ol/control/ScaleLine';
|
|
|
29
23
|
import OlControlZoom from 'ol/control/Zoom';
|
|
30
24
|
import * as OlEventsCondition from 'ol/events/condition';
|
|
31
25
|
import * as OlExtent from 'ol/extent';
|
|
26
|
+
import OlFeature from 'ol/Feature';
|
|
27
|
+
import OlFormatGeoJSON from 'ol/format/GeoJSON';
|
|
32
28
|
import OlFormatGML2 from 'ol/format/GML2';
|
|
33
29
|
import OlFormatGML3 from 'ol/format/GML3';
|
|
34
30
|
import OlFormatGML32 from 'ol/format/GML32';
|
|
35
|
-
import OlFormatGeoJSON from 'ol/format/GeoJSON';
|
|
36
31
|
import OlFormatKML from 'ol/format/KML';
|
|
37
32
|
import OlFormatMVT from 'ol/format/MVT';
|
|
38
33
|
import OlFormatWFS from 'ol/format/WFS';
|
|
39
34
|
import OlFormatWKT from 'ol/format/WKT';
|
|
40
35
|
import OlFormatWMSCapabilities from 'ol/format/WMSCapabilities';
|
|
41
36
|
import OlFormatWMTSCapabilities from 'ol/format/WMTSCapabilities';
|
|
37
|
+
import OlGeolocation from 'ol/Geolocation';
|
|
42
38
|
import OlGeomCircle from 'ol/geom/Circle';
|
|
43
39
|
import OlGeomGeometryCollection from 'ol/geom/GeometryCollection';
|
|
44
40
|
import OlGeomLineString from 'ol/geom/LineString';
|
|
@@ -63,6 +59,7 @@ import OlInteractionPointer from 'ol/interaction/Pointer';
|
|
|
63
59
|
import OlInteractionSelect from 'ol/interaction/Select';
|
|
64
60
|
import OlInteractionSnap from 'ol/interaction/Snap';
|
|
65
61
|
import OlInteractionTranslate from 'ol/interaction/Translate';
|
|
62
|
+
import OlKinetic from 'ol/Kinetic';
|
|
66
63
|
import OlGraticule from 'ol/layer/Graticule';
|
|
67
64
|
import OlLayerGroup from 'ol/layer/Group';
|
|
68
65
|
import OlLayerImage from 'ol/layer/Image';
|
|
@@ -71,6 +68,9 @@ import OlLayerTile from 'ol/layer/Tile';
|
|
|
71
68
|
import OlLayerVector from 'ol/layer/Vector';
|
|
72
69
|
import OlLayerVectorTile from 'ol/layer/VectorTile';
|
|
73
70
|
import * as OlLoadingstrategy from 'ol/loadingstrategy';
|
|
71
|
+
import OlMap from 'ol/Map';
|
|
72
|
+
import OlObject from 'ol/Object';
|
|
73
|
+
import OlOverlay from 'ol/Overlay';
|
|
74
74
|
import * as OlProj from 'ol/proj';
|
|
75
75
|
import OlSourceBingMaps from 'ol/source/BingMaps';
|
|
76
76
|
import OlSourceImageStatic from 'ol/source/ImageStatic';
|
|
@@ -91,8 +91,8 @@ import OlStyleStyle from 'ol/style/Style';
|
|
|
91
91
|
import OlStyleText from 'ol/style/Text';
|
|
92
92
|
import OlTilegridTileGrid from 'ol/tilegrid/TileGrid';
|
|
93
93
|
import OlTilegridWMTS from 'ol/tilegrid/WMTS';
|
|
94
|
-
import
|
|
95
|
-
import
|
|
94
|
+
import OlTileQueue from 'ol/TileQueue';
|
|
95
|
+
import OlView from 'ol/View';
|
|
96
96
|
import 'ol/ol.css';
|
|
97
97
|
export default {
|
|
98
98
|
Attribution: OlControlAttribution,
|