qwc2 2025.12.4 → 2025.12.15

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.
@@ -0,0 +1,53 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ width="24"
4
+ height="24"
5
+ version="1.1"
6
+ id="svg1"
7
+ sodipodi:docname="oblique.svg"
8
+ inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
9
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
10
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
+ xmlns="http://www.w3.org/2000/svg"
12
+ xmlns:svg="http://www.w3.org/2000/svg">
13
+ <defs
14
+ id="defs1">
15
+ <inkscape:path-effect
16
+ effect="perspective-envelope"
17
+ up_left_point="31.84,8.235"
18
+ up_right_point="118.21,8.235"
19
+ down_left_point="6.84,117.332"
20
+ down_right_point="143.209,117.332"
21
+ id="path-effect1"
22
+ is_visible="true"
23
+ lpeversion="1"
24
+ deform_type="perspective"
25
+ horizontal_mirror="false"
26
+ vertical_mirror="false"
27
+ overflow_perspective="false" />
28
+ </defs>
29
+ <sodipodi:namedview
30
+ id="namedview1"
31
+ pagecolor="#ffffff"
32
+ bordercolor="#666666"
33
+ borderopacity="1.0"
34
+ inkscape:showpageshadow="2"
35
+ inkscape:pageopacity="0.0"
36
+ inkscape:pagecheckerboard="0"
37
+ inkscape:deskcolor="#d1d1d1"
38
+ inkscape:zoom="3.59479"
39
+ inkscape:cx="50.211556"
40
+ inkscape:cy="55.775164"
41
+ inkscape:window-width="1600"
42
+ inkscape:window-height="842"
43
+ inkscape:window-x="0"
44
+ inkscape:window-y="0"
45
+ inkscape:window-maximized="1"
46
+ inkscape:current-layer="svg1" />
47
+ <path
48
+ d="m 139.33138,100.40986 c 2.07628,9.061 -1.23538,16.92214 -7.48538,16.92214 H 18.203 c -6.25,0 -9.5619324,-7.85964 -7.485227,-16.92214 L 30.125343,15.717557 C 31.084946,11.529963 35.078345,8.235 39.036814,8.235 h 71.976376 c 3.95847,0 7.95183,3.294963 8.9114,7.482557 z M 37.902612,14.17429 c -0.788552,0 -1.627148,0.722405 -1.790034,1.542582 L 19.292985,100.40846 c -0.338692,1.70541 0.375285,3.22606 1.525768,3.22606 H 129.23037 c 1.14762,0 1.86732,-1.52065 1.52863,-3.22606 L 113.93933,15.716872 c -0.16289,-0.820177 -1.00606,-1.542582 -1.792,-1.542582 z m 9.9385,28.041591 c -5.628345,0 -9.313113,-5.26189 -8.279299,-11.413497 0.976861,-5.812713 5.854252,-10.301547 10.933143,-10.301547 5.076868,0 8.852895,4.488834 8.40881,10.301547 -0.469976,6.151607 -5.435804,11.413497 -11.062654,11.413497 z M 120.62564,91.150498 H 29.419956 L 32.243929,74.346727 53.872491,50.541182 62.079678,61.858035 89.407567,29.014214 114.54115,54.940506 Z"
49
+ id="path1"
50
+ inkscape:path-effect="#path-effect1"
51
+ inkscape:original-d="m 143.209,105.968 c 0,6.25 -5.113,11.364 -11.363,11.364 H 18.203 c -6.25,0 -11.363,-5.113 -11.363,-11.364 v -86.37 c 0,-6.25 5.113,-11.363 11.363,-11.363 h 113.643 c 6.25,0 11.363,5.113 11.363,11.363 z M 18.203,17.326 c -1.207,0 -2.271,1.068 -2.271,2.271 v 86.37 c 0,1.207 1.065,2.271 2.271,2.271 h 113.643 c 1.203,0 2.274,-1.064 2.274,-2.271 v -86.37 c 0,-1.203 -1.071,-2.271 -2.274,-2.271 H 18.203 Z m 20.458,36.365 c -7.529,0 -13.641,-6.108 -13.641,-13.635 0,-7.527 6.112,-13.638 13.641,-13.638 7.526,0 13.632,6.111 13.632,13.638 0,7.527 -6.105,13.635 -13.632,13.635 z M 125.025,99.15 H 25.02 V 85.51 l 22.73,-22.724 11.363,11.36 36.365,-36.361 29.547,29.547 z"
52
+ transform="matrix(0.16942427,0,0,0.16942427,-0.71096897,1.3629513)" />
53
+ </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qwc2",
3
- "version": "2025.12.04",
3
+ "version": "2025.12.15",
4
4
  "description": "QGIS Web Client",
5
5
  "author": "Sourcepole AG",
6
6
  "license": "BSD-2-Clause",
@@ -17,7 +17,6 @@
17
17
  ],
18
18
  "dependencies": {
19
19
  "@furkot/webfonts-generator": "^2.0.2",
20
- "@sourcepole/qwc-giro3d": "^0.44.0-dev",
21
20
  "@kayahr/text-encoding": "^2.0.0",
22
21
  "@loaders.gl/core": "^4.3.3",
23
22
  "@loaders.gl/shapefile": "^4.3.3",
@@ -26,7 +25,9 @@
26
25
  "@norbulcz/num-parse": "^0.1.0",
27
26
  "@panoramax/web-viewer": "^4.0.1",
28
27
  "@reduxjs/toolkit": "^2.4.0",
28
+ "@sourcepole/qwc-giro3d": "^0.44.0-dev",
29
29
  "@turf/buffer": "^6.5.0",
30
+ "@turf/clean-coords": "^7.3.1",
30
31
  "@turf/helpers": "^6.5.0",
31
32
  "@vtaits/react-color-picker": "^2.0.0",
32
33
  "any-date-parser": "^1.5.4",
@@ -173,6 +173,7 @@ var Cyclomedia = /*#__PURE__*/function (_React$Component) {
173
173
  }
174
174
  });
175
175
  _defineProperty(_this, "cyclomediaIndexHtml", function () {
176
+ var _window$__CSP_NONCE__, _window$__CSP_NONCE__2, _window$__CSP_NONCE__3, _window$__CSP_NONCE__4;
176
177
  var supportedLang = ["de", "en-GB", "en-US", "fi", "fr", "nl", "tr", "pl"];
177
178
  var lang = LocaleUtils.lang();
178
179
  if (supportedLang.indexOf(lang) < 0) {
@@ -182,7 +183,7 @@ var Cyclomedia = /*#__PURE__*/function (_React$Component) {
182
183
  }
183
184
  }
184
185
  var loginOauth = !!_this.props.clientId && !_this.state.loginFailed;
185
- return "\n <!DOCTYPE html>\n <html>\n <head>\n <script type=\"text/javascript\" src=\"https://unpkg.com/react@18.3.1/umd/react.production.min.js\"></script>\n <script type=\"text/javascript\" src=\"https://unpkg.com/react-dom@18.3.1/umd/react-dom.production.min.js\"></script>\n <script type=\"text/javascript\" src=\"https://streetsmart.cyclomedia.com/api/v".concat(_this.props.cyclomediaVersion, "/StreetSmartApi.js\"></script>\n <script type=\"text/javascript\">\n let apiInitialized = false;\n let initCallback = null;\n let posCallback = null;\n let measureCallback = null;\n\n function initApi() {\n StreetSmartApi.init({\n targetElement: document.getElementById(\"streetsmartApi\"),\n username: \"").concat(_this.state.username || undefined, "\",\n password: \"").concat(_this.state.password || undefined, "\",\n apiKey: \"").concat(_this.props.apikey, "\",\n clientId: \"").concat(_this.props.clientId, "\",\n loginOauth: ").concat(loginOauth, ",\n loginRedirectUri: \"").concat(_this.props.loginRedirectUri, "\",\n logoutRedirectUri: \"").concat(_this.props.logoutRedirectUri, "\",\n srs: \"").concat(_this.props.projection, "\",\n locale: \"").concat(lang, "\",\n configurationUrl: 'https://atlas.cyclomedia.com/configuration',\n addressSettings: {\n locale: \"us\",\n database: \"Nokia\"\n }\n }).then(() => {\n apiInitialized = true;\n if (initCallback) {\n initCallback(true);\n }\n }, (e) => {\n apiInitialized = false;\n if (initCallback) {\n initCallback(false, e.message);\n }\n });\n }\n function openImage(posStr, crs) {\n if (!apiInitialized) {\n return;\n }\n StreetSmartApi.open(posStr, {\n viewerType: StreetSmartApi.ViewerType.PANORAMA,\n srs: crs,\n panoramaViewer: {\n closable: false,\n maximizable: true,\n replace: true,\n recordingsVisible: true,\n navbarVisible: true,\n timeTravelVisible: true,\n measureTypeButtonVisible: true,\n measureTypeButtonStart: true,\n measureTypeButtonToggle: true,\n },\n }).then((result) => {\n if (result && result[0]){\n window.panoramaViewer = result[0];\n window.panoramaViewer.on(StreetSmartApi.Events.panoramaViewer.IMAGE_CHANGE, changeView);\n window.panoramaViewer.on(StreetSmartApi.Events.panoramaViewer.VIEW_CHANGE, changeView);\n StreetSmartApi.on(StreetSmartApi.Events.measurement.MEASUREMENT_CHANGED, changeMeasurement);\n StreetSmartApi.on(StreetSmartApi.Events.measurement.MEASUREMENT_STOPPED, stopMeasurement);\n }\n }).catch((reason) => {\n console.log('Failed to create component(s) through API: ' + reason);\n });\n }\n function changeView() {\n if (posCallback) {\n const recording = window.panoramaViewer.getRecording();\n const orientation = window.panoramaViewer.getOrientation();\n const pos = recording.xyz;\n const posData = {\n pos: [pos[0], pos[1]],\n crs: recording.srs,\n yaw: orientation.yaw * Math.PI / 180,\n hFov: orientation.hFov * Math.PI / 180.0\n }\n posCallback(posData);\n }\n }\n function changeMeasurement(e) {\n measureCallback(e.detail.activeMeasurement);\n }\n function stopMeasurement() {\n measureCallback(null);\n }\n function registerCallbacks(_initCallback, _posCallback, _measureCallback) {\n initCallback = _initCallback;\n posCallback = _posCallback;\n measureCallback = _measureCallback;\n }\n </script>\n <style>\n html, body, #streetsmartApi {height: 100%;}\n </style>\n </head>\n <body style=\"margin: 0\">\n <div id=\"streetsmartApi\">\n </div>\n </body>\n </html>\n ");
186
+ return "\n <!DOCTYPE html>\n <html>\n <head>\n <script nonce=\"".concat((_window$__CSP_NONCE__ = window.__CSP_NONCE__) !== null && _window$__CSP_NONCE__ !== void 0 ? _window$__CSP_NONCE__ : '', "\" type=\"text/javascript\" src=\"https://unpkg.com/react@18.3.1/umd/react.production.min.js\"></script>\n <script nonce=\"").concat((_window$__CSP_NONCE__2 = window.__CSP_NONCE__) !== null && _window$__CSP_NONCE__2 !== void 0 ? _window$__CSP_NONCE__2 : '', "\" type=\"text/javascript\" src=\"https://unpkg.com/react-dom@18.3.1/umd/react-dom.production.min.js\"></script>\n <script nonce=\"").concat((_window$__CSP_NONCE__3 = window.__CSP_NONCE__) !== null && _window$__CSP_NONCE__3 !== void 0 ? _window$__CSP_NONCE__3 : '', "\" type=\"text/javascript\" src=\"https://streetsmart.cyclomedia.com/api/v").concat(_this.props.cyclomediaVersion, "/StreetSmartApi.js\"></script>\n <script nonce=\"").concat((_window$__CSP_NONCE__4 = window.__CSP_NONCE__) !== null && _window$__CSP_NONCE__4 !== void 0 ? _window$__CSP_NONCE__4 : '', "\" type=\"text/javascript\">\n let apiInitialized = false;\n let initCallback = null;\n let posCallback = null;\n let measureCallback = null;\n\n function initApi() {\n StreetSmartApi.init({\n targetElement: document.getElementById(\"streetsmartApi\"),\n username: \"").concat(_this.state.username || undefined, "\",\n password: \"").concat(_this.state.password || undefined, "\",\n apiKey: \"").concat(_this.props.apikey, "\",\n clientId: \"").concat(_this.props.clientId, "\",\n loginOauth: ").concat(loginOauth, ",\n loginRedirectUri: \"").concat(_this.props.loginRedirectUri, "\",\n logoutRedirectUri: \"").concat(_this.props.logoutRedirectUri, "\",\n srs: \"").concat(_this.props.projection, "\",\n locale: \"").concat(lang, "\",\n configurationUrl: 'https://atlas.cyclomedia.com/configuration',\n addressSettings: {\n locale: \"us\",\n database: \"Nokia\"\n }\n }).then(() => {\n apiInitialized = true;\n if (initCallback) {\n initCallback(true);\n }\n }, (e) => {\n apiInitialized = false;\n if (initCallback) {\n initCallback(false, e.message);\n }\n });\n }\n function openImage(posStr, crs) {\n if (!apiInitialized) {\n return;\n }\n StreetSmartApi.open(posStr, {\n viewerType: StreetSmartApi.ViewerType.PANORAMA,\n srs: crs,\n panoramaViewer: {\n closable: false,\n maximizable: true,\n replace: true,\n recordingsVisible: true,\n navbarVisible: true,\n timeTravelVisible: true,\n measureTypeButtonVisible: true,\n measureTypeButtonStart: true,\n measureTypeButtonToggle: true,\n },\n }).then((result) => {\n if (result && result[0]){\n window.panoramaViewer = result[0];\n window.panoramaViewer.on(StreetSmartApi.Events.panoramaViewer.IMAGE_CHANGE, changeView);\n window.panoramaViewer.on(StreetSmartApi.Events.panoramaViewer.VIEW_CHANGE, changeView);\n StreetSmartApi.on(StreetSmartApi.Events.measurement.MEASUREMENT_CHANGED, changeMeasurement);\n StreetSmartApi.on(StreetSmartApi.Events.measurement.MEASUREMENT_STOPPED, stopMeasurement);\n }\n }).catch((reason) => {\n console.log('Failed to create component(s) through API: ' + reason);\n });\n }\n function changeView() {\n if (posCallback) {\n const recording = window.panoramaViewer.getRecording();\n const orientation = window.panoramaViewer.getOrientation();\n const pos = recording.xyz;\n const posData = {\n pos: [pos[0], pos[1]],\n crs: recording.srs,\n yaw: orientation.yaw * Math.PI / 180,\n hFov: orientation.hFov * Math.PI / 180.0\n }\n posCallback(posData);\n }\n }\n function changeMeasurement(e) {\n measureCallback(e.detail.activeMeasurement);\n }\n function stopMeasurement() {\n measureCallback(null);\n }\n function registerCallbacks(_initCallback, _posCallback, _measureCallback) {\n initCallback = _initCallback;\n posCallback = _posCallback;\n measureCallback = _measureCallback;\n }\n </script>\n <style>\n html, body, #streetsmartApi {height: 100%;}\n </style>\n </head>\n <body style=\"margin: 0\">\n <div id=\"streetsmartApi\">\n </div>\n </body>\n </html>\n ");
186
187
  });
187
188
  _defineProperty(_this, "addRecordingsWFS", function () {
188
189
  var layer = {
@@ -0,0 +1,410 @@
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"); }
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); } }
4
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
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
+ 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
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
8
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
10
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
11
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
12
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
15
+ /**
16
+ * Copyright 2025 Sourcepole AG
17
+ * All rights reserved.
18
+ *
19
+ * This source code is licensed under the BSD-style license found in the
20
+ * LICENSE file in the root directory of this source tree.
21
+ */
22
+
23
+ import React from 'react';
24
+ import { connect } from 'react-redux';
25
+ import axios from 'axios';
26
+ import ol from 'openlayers';
27
+ import PropTypes from 'prop-types';
28
+ import { setCurrentTask } from '../actions/task';
29
+ import Icon from '../components/Icon';
30
+ import ResizeableWindow from '../components/ResizeableWindow';
31
+ import LayerRegistry from '../components/map/layers/index';
32
+ import InputContainer from '../components/widgets/InputContainer';
33
+ import ConfigUtils from '../utils/ConfigUtils';
34
+ import LayerUtils from '../utils/LayerUtils';
35
+ import LocaleUtils from '../utils/LocaleUtils';
36
+ import MapUtils from '../utils/MapUtils';
37
+ import MiscUtils from '../utils/MiscUtils';
38
+ import './style/ObliqueView.css';
39
+
40
+ /**
41
+ * Display oblique satellite imagery.
42
+ */
43
+ var ObliqueView = /*#__PURE__*/function (_React$Component) {
44
+ function ObliqueView(props) {
45
+ var _this;
46
+ _classCallCheck(this, ObliqueView);
47
+ _this = _callSuper(this, ObliqueView, [props]);
48
+ _defineProperty(_this, "onClose", function () {
49
+ _this.setState(ObliqueView.defaultState);
50
+ });
51
+ _defineProperty(_this, "renderScaleChooser", function () {
52
+ return /*#__PURE__*/React.createElement("div", {
53
+ className: "obliqueview-scalechooser"
54
+ }, /*#__PURE__*/React.createElement("span", null, LocaleUtils.tr("bottombar.scale_label"), ":\xA0"), /*#__PURE__*/React.createElement(InputContainer, null, /*#__PURE__*/React.createElement("span", {
55
+ role: "prefix"
56
+ }, " 1 : "), /*#__PURE__*/React.createElement("select", {
57
+ onChange: function onChange(ev) {
58
+ return _this.setState({
59
+ currentZoom: parseInt(ev.target.value, 10)
60
+ });
61
+ },
62
+ role: "input",
63
+ value: _this.state.currentZoom
64
+ }, _this.props.scales.map(function (item, index) {
65
+ return /*#__PURE__*/React.createElement("option", {
66
+ key: index,
67
+ value: index
68
+ }, LocaleUtils.toLocaleFixed(item, 0));
69
+ }))));
70
+ });
71
+ _defineProperty(_this, "changeZoom", function (delta) {
72
+ _this.setState(function (state) {
73
+ return {
74
+ currentZoom: Math.max(0, Math.min(state.currentZoom + delta, _this.props.scales.length - 1))
75
+ };
76
+ });
77
+ });
78
+ _defineProperty(_this, "queryDatasetConfig", function () {
79
+ var obliqueImageryServiceUrl = ConfigUtils.getConfigProp('obliqueImageryServiceUrl');
80
+ if (_this.state.selectedDataset && obliqueImageryServiceUrl) {
81
+ var reqUrl = obliqueImageryServiceUrl.replace(/\/$/, '') + "/".concat(_this.state.selectedDataset, "/config");
82
+ axios.get(reqUrl).then(function (response) {
83
+ var datasetConfig = response.data;
84
+ var direction = 'n' in datasetConfig.image_centers ? 'n' : Object.keys(datasetConfig.image_centers)[0];
85
+ _this.setState({
86
+ datasetConfig: datasetConfig,
87
+ currentDirection: direction
88
+ });
89
+ })["catch"](function () {
90
+ /* eslint-disable-next-line */
91
+ console.warn("Failed to load dataset config");
92
+ });
93
+ }
94
+ });
95
+ _defineProperty(_this, "setupLayer", function () {
96
+ var datasetConfig = _this.state.datasetConfig;
97
+ var projection = new ol.proj.Projection({
98
+ code: datasetConfig.crs,
99
+ extent: datasetConfig.extent,
100
+ units: "m"
101
+ });
102
+ var targetScale = _this.props.initialScale;
103
+ var zoom = _this.props.scales.reduce(function (best, v, i) {
104
+ return Math.abs(v - targetScale) < Math.abs(_this.props.scales[best] - targetScale) ? i : best;
105
+ }, 0);
106
+ _this.map.setView(new ol.View({
107
+ projection: projection,
108
+ // extent: datasetConfig.extent,
109
+ center: ol.extent.getCenter(datasetConfig.extent),
110
+ rotation: _this.getRotation() / 180 * Math.PI,
111
+ zoom: zoom,
112
+ resolutions: MapUtils.getResolutionsForScales(_this.props.scales, datasetConfig.crs),
113
+ constrainResolution: true
114
+ // showFullExtent: true
115
+ }));
116
+ _this.setState({
117
+ currentZoom: zoom
118
+ });
119
+ _this.map.on('moveend', function () {
120
+ _this.setState(function (state) {
121
+ var newZoom = _this.map.getView().getZoom();
122
+ if (newZoom !== state.currentZoom) {
123
+ return {
124
+ currentZoom: newZoom
125
+ };
126
+ }
127
+ return null;
128
+ });
129
+ });
130
+ var layers = [];
131
+ var themeConfig = _this.props.theme.obliqueDatasets.find(function (entry) {
132
+ return entry.name === _this.state.selectedDataset;
133
+ });
134
+ if (themeConfig.backgroundLayer) {
135
+ var _themeConfig$backgrou;
136
+ var layerConfig = LayerUtils.splitLayerUrlParam(themeConfig.backgroundLayer);
137
+ layerConfig.version = _this.props.themes.defaultWMSVersion || "1.3.0";
138
+ layerConfig.opacity = (_themeConfig$backgrou = themeConfig.backgroundOpacity) !== null && _themeConfig$backgrou !== void 0 ? _themeConfig$backgrou : 127;
139
+ var layerCreator = LayerRegistry[layerConfig.type];
140
+ if (layerCreator) {
141
+ layers.push(layerCreator.create(layerConfig, _this.map));
142
+ }
143
+ }
144
+ _this.obliqueImageryLayer = new ol.layer.Tile({
145
+ source: new ol.source.XYZ({
146
+ projection: projection,
147
+ tileGrid: new ol.tilegrid.TileGrid({
148
+ extent: datasetConfig.extent,
149
+ resolutions: datasetConfig.resolutions,
150
+ tileSize: datasetConfig.tileSize,
151
+ origin: datasetConfig.origin
152
+ }),
153
+ url: datasetConfig.url,
154
+ crossOrigin: "anonymous",
155
+ tileLoadFunction: function tileLoadFunction(tile, src) {
156
+ var _this$closestImage;
157
+ if (((_this$closestImage = _this.closestImage) !== null && _this$closestImage !== void 0 ? _this$closestImage : null) !== null) {
158
+ src += "?img=" + _this.closestImage;
159
+ }
160
+ tile.getImage().src = src.replace('{direction}', _this.state.currentDirection);
161
+ }
162
+ })
163
+ });
164
+ layers.push(_this.obliqueImageryLayer);
165
+ _this.map.setLayers(layers);
166
+ });
167
+ _defineProperty(_this, "searchClosestImage", function () {
168
+ var _this$state$datasetCo;
169
+ var best = null;
170
+ var imageCenters = (_this$state$datasetCo = _this.state.datasetConfig) === null || _this$state$datasetCo === void 0 || (_this$state$datasetCo = _this$state$datasetCo.image_centers) === null || _this$state$datasetCo === void 0 ? void 0 : _this$state$datasetCo[_this.state.currentDirection];
171
+ if (imageCenters) {
172
+ var center = _this.map.getView().getCenter();
173
+ var dsqr = function dsqr(p, q) {
174
+ return (p[0] - q[0]) * (p[0] - q[0]) + (p[1] - q[1]) * (p[1] - q[1]);
175
+ };
176
+ best = 0;
177
+ var bestDist = dsqr(center, imageCenters[0]);
178
+ for (var i = 1; i < imageCenters.length; ++i) {
179
+ var dist = dsqr(center, imageCenters[i]);
180
+ if (dist < bestDist) {
181
+ bestDist = dist;
182
+ best = i;
183
+ }
184
+ }
185
+ }
186
+ if (best !== _this.closestImage) {
187
+ if (_this.obliqueImageryLayer) {
188
+ _this.obliqueImageryLayer.getSource().refresh();
189
+ }
190
+ _this.closestImage = best;
191
+ }
192
+ });
193
+ _defineProperty(_this, "getRotation", function () {
194
+ return {
195
+ n: 0,
196
+ w: 90,
197
+ e: -90,
198
+ s: 180
199
+ }[_this.state.currentDirection];
200
+ });
201
+ var controls = ol.control.defaults({
202
+ zoom: false,
203
+ attribution: false,
204
+ rotate: false
205
+ });
206
+ var interactions = ol.interaction.defaults({
207
+ onFocusOnly: false
208
+ });
209
+ _this.map = new ol.Map({
210
+ controls: controls,
211
+ interactions: interactions
212
+ });
213
+ _this.map.on('moveend', _this.searchClosestImage);
214
+ _this.map.on('rotateend', _this.searchClosestImage);
215
+ _this.closestImage = null;
216
+ _this.obliqueImageryLayer = null;
217
+ _this.state = ObliqueView.defaultState;
218
+ return _this;
219
+ }
220
+ _inherits(ObliqueView, _React$Component);
221
+ return _createClass(ObliqueView, [{
222
+ key: "componentDidUpdate",
223
+ value: function componentDidUpdate(prevProps, prevState) {
224
+ if (this.props.active && !prevProps.active) {
225
+ this.setState({
226
+ active: true
227
+ });
228
+ this.props.setCurrentTask(null);
229
+ }
230
+ if (this.props.active && this.props.theme && this.props.theme !== prevProps.theme || this.props.active && !prevProps.active) {
231
+ var _datasets$find$name, _datasets$find, _datasets$;
232
+ var datasets = this.props.theme.obliqueDatasets || [];
233
+ var defaultDataset = (_datasets$find$name = (_datasets$find = datasets.find(function (entry) {
234
+ return entry["default"];
235
+ })) === null || _datasets$find === void 0 ? void 0 : _datasets$find.name) !== null && _datasets$find$name !== void 0 ? _datasets$find$name : (_datasets$ = datasets[0]) === null || _datasets$ === void 0 ? void 0 : _datasets$.name;
236
+ this.setState({
237
+ selectedDataset: defaultDataset,
238
+ datasetConfig: null,
239
+ currentDirection: null
240
+ });
241
+ }
242
+ if (this.state.selectedDataset !== prevState.selectedDataset) {
243
+ this.closestImage = null;
244
+ this.obliqueImageryLayer = null;
245
+ this.queryDatasetConfig();
246
+ }
247
+ if (this.state.datasetConfig && this.state.datasetConfig !== prevState.datasetConfig) {
248
+ this.setupLayer();
249
+ }
250
+ if (this.state.datasetConfig && this.state.currentDirection !== prevState.currentDirection) {
251
+ var _this$obliqueImageryL, _this$obliqueImageryL2, _this$obliqueImageryL3, _this$map$getView, _this$map$getView$set;
252
+ (_this$obliqueImageryL = this.obliqueImageryLayer) === null || _this$obliqueImageryL === void 0 || (_this$obliqueImageryL2 = _this$obliqueImageryL.getSource) === null || _this$obliqueImageryL2 === void 0 || (_this$obliqueImageryL2 = _this$obliqueImageryL2.call(_this$obliqueImageryL)) === null || _this$obliqueImageryL2 === void 0 || (_this$obliqueImageryL3 = _this$obliqueImageryL2.refresh) === null || _this$obliqueImageryL3 === void 0 || _this$obliqueImageryL3.call(_this$obliqueImageryL2);
253
+ (_this$map$getView = this.map.getView()) === null || _this$map$getView === void 0 || (_this$map$getView$set = _this$map$getView.setRotation) === null || _this$map$getView$set === void 0 || _this$map$getView$set.call(_this$map$getView, this.getRotation() / 180 * Math.PI);
254
+ }
255
+ if (this.state.datasetConfig && this.state.currentZoom !== prevState.currentZoom) {
256
+ var _this$map$getView2, _this$map$getView2$se;
257
+ (_this$map$getView2 = this.map.getView()) === null || _this$map$getView2 === void 0 || (_this$map$getView2$se = _this$map$getView2.setZoom) === null || _this$map$getView2$se === void 0 || _this$map$getView2$se.call(_this$map$getView2, this.state.currentZoom);
258
+ }
259
+ }
260
+ }, {
261
+ key: "render",
262
+ value: function render() {
263
+ var _this2 = this;
264
+ if (!this.state.active) {
265
+ return null;
266
+ }
267
+ var rot = this.getRotation();
268
+ return /*#__PURE__*/React.createElement(ResizeableWindow, {
269
+ dockable: this.props.geometry.side,
270
+ icon: "oblique",
271
+ initialHeight: this.props.geometry.initialHeight,
272
+ initialWidth: this.props.geometry.initialWidth,
273
+ initialX: this.props.geometry.initialX,
274
+ initialY: this.props.geometry.initialY,
275
+ initiallyDocked: this.props.geometry.initiallyDocked,
276
+ onClose: this.onClose,
277
+ splitScreenWhenDocked: true,
278
+ splitTopAndBottomBar: true,
279
+ title: LocaleUtils.tr("obliqueview.title")
280
+ }, /*#__PURE__*/React.createElement("div", {
281
+ className: "obliqueview-body"
282
+ }, /*#__PURE__*/React.createElement("div", {
283
+ className: "obliqueview-map",
284
+ ref: function ref(el) {
285
+ return _this2.map.setTarget(el);
286
+ },
287
+ tabIndex: 0
288
+ }), !this.state.selectedDataset && /*#__PURE__*/React.createElement("div", {
289
+ className: "obliqueview-empty-overlay"
290
+ }, LocaleUtils.tr("obliqueview.nodataset")), /*#__PURE__*/React.createElement("div", {
291
+ className: "obliqueview-nav-rotate",
292
+ style: {
293
+ transform: "rotate(".concat(rot, "deg)")
294
+ }
295
+ }, /*#__PURE__*/React.createElement("span", null), /*#__PURE__*/React.createElement("span", {
296
+ className: "obliqueview-nav-dir",
297
+ onClick: function onClick() {
298
+ return _this2.setState({
299
+ currentDirection: "n"
300
+ });
301
+ },
302
+ onKeyDown: MiscUtils.checkKeyActivate,
303
+ style: {
304
+ transform: "rotate(".concat(-rot, "deg)")
305
+ },
306
+ tabIndex: 0
307
+ }, "N"), /*#__PURE__*/React.createElement("span", null), /*#__PURE__*/React.createElement("span", {
308
+ className: "obliqueview-nav-dir",
309
+ onClick: function onClick() {
310
+ return _this2.setState({
311
+ currentDirection: "w"
312
+ });
313
+ },
314
+ onKeyDown: MiscUtils.checkKeyActivate,
315
+ style: {
316
+ transform: "rotate(".concat(-rot, "deg)")
317
+ },
318
+ tabIndex: 0
319
+ }, "W"), /*#__PURE__*/React.createElement("span", null), /*#__PURE__*/React.createElement("span", {
320
+ className: "obliqueview-nav-dir",
321
+ onClick: function onClick() {
322
+ return _this2.setState({
323
+ currentDirection: "e"
324
+ });
325
+ },
326
+ onKeyDown: MiscUtils.checkKeyActivate,
327
+ style: {
328
+ transform: "rotate(".concat(-rot, "deg)")
329
+ },
330
+ tabIndex: 0
331
+ }, "E"), /*#__PURE__*/React.createElement("span", null), /*#__PURE__*/React.createElement("span", {
332
+ className: "obliqueview-nav-dir",
333
+ onClick: function onClick() {
334
+ return _this2.setState({
335
+ currentDirection: "s"
336
+ });
337
+ },
338
+ onKeyDown: MiscUtils.checkKeyActivate,
339
+ style: {
340
+ transform: "rotate(".concat(-rot, "deg)")
341
+ },
342
+ tabIndex: 0
343
+ }, "S"), /*#__PURE__*/React.createElement("span", null)), /*#__PURE__*/React.createElement("div", {
344
+ className: "obliqueview-nav-zoom"
345
+ }, /*#__PURE__*/React.createElement(Icon, {
346
+ icon: "plus",
347
+ onClick: function onClick() {
348
+ return _this2.changeZoom(+1);
349
+ }
350
+ }), /*#__PURE__*/React.createElement(Icon, {
351
+ icon: "minus",
352
+ onClick: function onClick() {
353
+ return _this2.changeZoom(-1);
354
+ }
355
+ })), /*#__PURE__*/React.createElement("div", {
356
+ className: "obliqueview-bottombar"
357
+ }, this.renderScaleChooser())));
358
+ }
359
+ }]);
360
+ }(React.Component);
361
+ _defineProperty(ObliqueView, "propTypes", {
362
+ active: PropTypes.bool,
363
+ /** Default window geometry with size, position and docking status. Positive position values (including '0') are related to top (InitialY) and left (InitialX), negative values (including '-0') to bottom (InitialY) and right (InitialX). */
364
+ geometry: PropTypes.shape({
365
+ initialWidth: PropTypes.number,
366
+ initialHeight: PropTypes.number,
367
+ initialX: PropTypes.number,
368
+ initialY: PropTypes.number,
369
+ initiallyDocked: PropTypes.bool,
370
+ side: PropTypes.string
371
+ }),
372
+ /** The initial map scale. */
373
+ initialScale: PropTypes.number,
374
+ mapBbox: PropTypes.object,
375
+ projection: PropTypes.string,
376
+ /** A list of allowed map scales, in decreasing order. */
377
+ scales: PropTypes.arrayOf(PropTypes.number),
378
+ setCurrentTask: PropTypes.func,
379
+ theme: PropTypes.object,
380
+ themes: PropTypes.object
381
+ });
382
+ _defineProperty(ObliqueView, "defaultProps", {
383
+ geometry: {
384
+ initialWidth: 480,
385
+ initialHeight: 640,
386
+ initialX: 0,
387
+ initialY: 0,
388
+ initiallyDocked: true,
389
+ side: 'left'
390
+ },
391
+ initialScale: 1000,
392
+ scales: [20000, 10000, 5000, 2500, 1000, 500, 250]
393
+ });
394
+ _defineProperty(ObliqueView, "defaultState", {
395
+ active: false,
396
+ selectedDataset: null,
397
+ datasetConfig: null,
398
+ currentDirection: null,
399
+ currentZoom: 0
400
+ });
401
+ export default connect(function (state) {
402
+ return {
403
+ active: state.task.id === "ObliqueView",
404
+ mapBbox: state.map.bbox,
405
+ theme: state.theme.current,
406
+ themes: state.theme.themes
407
+ };
408
+ }, {
409
+ setCurrentTask: setCurrentTask
410
+ })(ObliqueView);
@@ -9,8 +9,10 @@ div.map-contents {
9
9
  /* Move and re-style rotation reset button */
10
10
  div.ol-rotate {
11
11
  padding: 0;
12
- top: 4em!important;
13
- right: 0.5em!important;
12
+ bottom: 2.75em!important;
13
+ left: 0.5em!important;
14
+ right: initial!important;
15
+ top: initial!important;
14
16
  }
15
17
 
16
18
  div.ol-rotate button {
@@ -0,0 +1,112 @@
1
+ div.obliqueview-body {
2
+ position: absolute;
3
+ left: 0;
4
+ right: 0;
5
+ top: 0;
6
+ bottom: 0;
7
+ }
8
+
9
+ div.obliqueview-empty-overlay {
10
+ position: absolute;
11
+ left: 0;
12
+ right: 0;
13
+ top: 0;
14
+ bottom: 0;
15
+ display: flex;
16
+ align-items: center;
17
+ justify-content: center;
18
+ background-color: rgba(200, 200, 200);
19
+ z-index: 4;
20
+ }
21
+
22
+ div.obliqueview-map {
23
+ height: 100%;
24
+ }
25
+
26
+ div.obliqueview-nav-rotate {
27
+ position: absolute;
28
+ right: 1em;
29
+ top: 1em;
30
+ display: flex;
31
+ align-items: center;
32
+ justify-content: center;
33
+ flex-wrap: wrap;
34
+ width: 4em;
35
+ height: 4em;
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);
40
+ margin-bottom: 0.5em;
41
+ transition: transform 0.5s;
42
+ }
43
+
44
+ div.obliqueview-nav-rotate > span {
45
+ flex: 0 0 1.25em;
46
+ }
47
+
48
+ span.obliqueview-nav-dir {
49
+ display: flex;
50
+ align-items: center;
51
+ justify-content: center;
52
+ font-weight: bold;
53
+ cursor: pointer;
54
+ transition: transform 0.5s;
55
+ }
56
+
57
+ div.obliqueview-nav-zoom {
58
+ position: absolute;
59
+ right: 0.5em;
60
+ top: 6em;
61
+ width: 2em;
62
+ display: flex;
63
+ align-items: center;
64
+ justify-content: center;
65
+ color: var(--map-button-text-color);
66
+ background-color: var(--map-button-bg-color);
67
+ box-shadow: 0px 5px 10px rgba(136, 136, 136, 0.5);
68
+ border-radius: 4px;
69
+ cursor: pointer;
70
+ transition: background-color 0.5s, color 0.5s;
71
+ flex-direction: column;
72
+ margin: 0 1.5em 0.5em 1em;
73
+ }
74
+
75
+ div.obliqueview-nav-zoom > span {
76
+ height: 2em;
77
+ width: 1.5em;
78
+ display: flex;
79
+ align-items: center;
80
+ justify-content: center;
81
+ }
82
+
83
+ div.obliqueview-nav-zoom > span:first-child {
84
+ border-bottom: 1px solid var(--map-button-text-color);
85
+ }
86
+
87
+ div.obliqueview-bottombar {
88
+ position: absolute;
89
+ left: 0;
90
+ right: 0;
91
+ bottom: 0;
92
+ height: 3em;
93
+ z-index: 100;
94
+ color: var(--panel-text-color);
95
+ background-color: var(--panel-bg-color);
96
+ box-shadow: 0 -2px 4px rgba(136, 136, 136, 0.5);
97
+ backdrop-filter: blur(3px);
98
+ font-size: 75%;
99
+ display: flex;
100
+ align-items: center;
101
+ justify-content: center;
102
+ }
103
+
104
+ div.obliqueview-scalechooser {
105
+ width: 10em;
106
+ display: flex;
107
+ align-items: center;
108
+ }
109
+
110
+ div.obliqueview-scalechooser > div.input-container {
111
+ flex: 1 1 auto;
112
+ }
@@ -588,6 +588,7 @@ function getTheme(config, configItem, result, resultItem, proxy) {
588
588
  resultItem.mapTips = configItem.mapTips;
589
589
  resultItem.userMap = configItem.userMap;
590
590
  resultItem.map3d = configItem.map3d;
591
+ resultItem.obliqueDatasets = configItem.obliqueDatasets;
591
592
  resultItem.viewMode = configItem.viewMode;
592
593
  resultItem.editConfig = getEditConfig(configItem.editConfig);
593
594
 
@@ -540,6 +540,8 @@ def getTheme(config, configItem, result, resultItem):
540
540
 
541
541
  if "map3d" in configItem:
542
542
  resultItem["map3d"] = configItem["map3d"]
543
+ if "obliqueDatasets" in configItem:
544
+ resultItem["obliqueDatasets"] = configItem["obliqueDatasets"]
543
545
  if "viewMode" in configItem:
544
546
  resultItem["viewMode"] = configItem["viewMode"]
545
547
 
@@ -50,6 +50,7 @@
50
50
  "MeasureLineString": "Измерване на линия",
51
51
  "MeasurePolygon": "Измерване на полигон",
52
52
  "NewsPopup": "",
53
+ "ObliqueView": "",
53
54
  "Panoramax": "",
54
55
  "Portal": "Портал",
55
56
  "PrintScreen3D": "Експорт на мрежата",
@@ -461,6 +462,10 @@
461
462
  "width": "Ширина",
462
463
  "windowtitle": "Цифрово въвеждане"
463
464
  },
465
+ "obliqueview": {
466
+ "nodataset": "",
467
+ "title": ""
468
+ },
464
469
  "panoramax": {
465
470
  "notfound": "",
466
471
  "title": ""
@@ -50,6 +50,7 @@
50
50
  "MeasureLineString": "Mesurar una línia",
51
51
  "MeasurePolygon": "Mesurar un polígon",
52
52
  "NewsPopup": "Notícies",
53
+ "ObliqueView": "",
53
54
  "Panoramax": "Panoramax",
54
55
  "Portal": "Portal",
55
56
  "PrintScreen3D": "Exportar ràster",
@@ -461,6 +462,10 @@
461
462
  "width": "Amplada",
462
463
  "windowtitle": "Entrada numèrica"
463
464
  },
465
+ "obliqueview": {
466
+ "nodataset": "",
467
+ "title": ""
468
+ },
464
469
  "panoramax": {
465
470
  "notfound": "No hi ha imatge disponible per a aquesta ubicació.",
466
471
  "title": "Visor Panoramax"
@@ -50,6 +50,7 @@
50
50
  "MeasureLineString": "Změřit úsek",
51
51
  "MeasurePolygon": "Měřit mnohoúhelník",
52
52
  "NewsPopup": "",
53
+ "ObliqueView": "",
53
54
  "Panoramax": "",
54
55
  "Portal": "",
55
56
  "PrintScreen3D": "",
@@ -461,6 +462,10 @@
461
462
  "width": "",
462
463
  "windowtitle": ""
463
464
  },
465
+ "obliqueview": {
466
+ "nodataset": "",
467
+ "title": ""
468
+ },
464
469
  "panoramax": {
465
470
  "notfound": "",
466
471
  "title": ""
@@ -50,6 +50,7 @@
50
50
  "MeasureLineString": "Messen Linie",
51
51
  "MeasurePolygon": "Messen Polygon",
52
52
  "NewsPopup": "Aktuelles",
53
+ "ObliqueView": "Schrägluftbildansicht",
53
54
  "Panoramax": "Panoramax",
54
55
  "Portal": "Portal",
55
56
  "PrintScreen3D": "Raster Export",
@@ -461,6 +462,10 @@
461
462
  "width": "Breite",
462
463
  "windowtitle": "Numerische Eingabe"
463
464
  },
465
+ "obliqueview": {
466
+ "nodataset": "Keine Schrägluftbilder verfügbar",
467
+ "title": "Schrägluftbildansicht"
468
+ },
464
469
  "panoramax": {
465
470
  "notfound": "An diesem Ort ist kein Bild verfügbar.",
466
471
  "title": "Panoramax Viewer"
@@ -50,6 +50,7 @@
50
50
  "MeasureLineString": "Messen Linie",
51
51
  "MeasurePolygon": "Messen Polygon",
52
52
  "NewsPopup": "Aktuelles",
53
+ "ObliqueView": "Schrägluftbildansicht",
53
54
  "Panoramax": "Panoramax",
54
55
  "Portal": "Portal",
55
56
  "PrintScreen3D": "Raster Export",
@@ -461,6 +462,10 @@
461
462
  "width": "Breite",
462
463
  "windowtitle": "Numerische Eingabe"
463
464
  },
465
+ "obliqueview": {
466
+ "nodataset": "Keine Schrägluftbilder verfügbar",
467
+ "title": "Schrägluftbildansicht"
468
+ },
464
469
  "panoramax": {
465
470
  "notfound": "An diesem Ort ist kein Bild verfügbar.",
466
471
  "title": "Panoramax Viewer"
@@ -50,6 +50,7 @@
50
50
  "MeasureLineString": "Measure a line",
51
51
  "MeasurePolygon": "Measure a polygon",
52
52
  "NewsPopup": "News",
53
+ "ObliqueView": "Oblique Aerial View",
53
54
  "Panoramax": "Panoramax",
54
55
  "Portal": "Portal",
55
56
  "PrintScreen3D": "Raster Export",
@@ -461,6 +462,10 @@
461
462
  "width": "Width",
462
463
  "windowtitle": "Numeric input"
463
464
  },
465
+ "obliqueview": {
466
+ "nodataset": "No oblique imagery available",
467
+ "title": "Oblique Aerial View"
468
+ },
464
469
  "panoramax": {
465
470
  "notfound": "There is no image available for this location.",
466
471
  "title": "Panoramax Viewer"
@@ -50,6 +50,7 @@
50
50
  "MeasureLineString": "Medir una línea",
51
51
  "MeasurePolygon": "Medir un polígono",
52
52
  "NewsPopup": "Noticias",
53
+ "ObliqueView": "",
53
54
  "Panoramax": "Panoramax",
54
55
  "Portal": "Portal",
55
56
  "PrintScreen3D": "Exportar ráster",
@@ -461,6 +462,10 @@
461
462
  "width": "Ancho",
462
463
  "windowtitle": "Entrada numérica"
463
464
  },
465
+ "obliqueview": {
466
+ "nodataset": "",
467
+ "title": ""
468
+ },
464
469
  "panoramax": {
465
470
  "notfound": "No hay imagen disponible para esta ubicación.",
466
471
  "title": "Visor Panoramax"
@@ -50,6 +50,7 @@
50
50
  "MeasureLineString": "Mittaa viiva",
51
51
  "MeasurePolygon": "Mittaa monikulmion",
52
52
  "NewsPopup": "",
53
+ "ObliqueView": "",
53
54
  "Panoramax": "",
54
55
  "Portal": "",
55
56
  "PrintScreen3D": "",
@@ -461,6 +462,10 @@
461
462
  "width": "",
462
463
  "windowtitle": ""
463
464
  },
465
+ "obliqueview": {
466
+ "nodataset": "",
467
+ "title": ""
468
+ },
464
469
  "panoramax": {
465
470
  "notfound": "",
466
471
  "title": ""
@@ -50,6 +50,7 @@
50
50
  "MeasureLineString": "Mesurer une ligne",
51
51
  "MeasurePolygon": "Mesurer un polygone",
52
52
  "NewsPopup": "Actualités",
53
+ "ObliqueView": "Vue aérienne oblique",
53
54
  "Panoramax": "Panoramax",
54
55
  "Portal": "Portail",
55
56
  "PrintScreen3D": "Export raster",
@@ -461,6 +462,10 @@
461
462
  "width": "Largeur",
462
463
  "windowtitle": "Entrée numérique"
463
464
  },
465
+ "obliqueview": {
466
+ "nodataset": "Aucune image aérienne oblique disponible",
467
+ "title": "Vue aérienne oblique"
468
+ },
464
469
  "panoramax": {
465
470
  "notfound": "Il n'y a pas d'image disponible pour cet emplacement.",
466
471
  "title": "Visionneuse Panoramax"
@@ -50,6 +50,7 @@
50
50
  "MeasureLineString": "Mérési vonal",
51
51
  "MeasurePolygon": "Mérési sokszög",
52
52
  "NewsPopup": "",
53
+ "ObliqueView": "",
53
54
  "Panoramax": "",
54
55
  "Portal": "",
55
56
  "PrintScreen3D": "",
@@ -461,6 +462,10 @@
461
462
  "width": "",
462
463
  "windowtitle": ""
463
464
  },
465
+ "obliqueview": {
466
+ "nodataset": "",
467
+ "title": ""
468
+ },
464
469
  "panoramax": {
465
470
  "notfound": "",
466
471
  "title": ""
@@ -50,6 +50,7 @@
50
50
  "MeasureLineString": "Misura una linea",
51
51
  "MeasurePolygon": "Misura un poligono",
52
52
  "NewsPopup": "Attualità",
53
+ "ObliqueView": "Vista aerea obliqua",
53
54
  "Panoramax": "Panoramax",
54
55
  "Portal": "Portale",
55
56
  "PrintScreen3D": "Esporta raster",
@@ -461,6 +462,10 @@
461
462
  "width": "Larghezza",
462
463
  "windowtitle": "Formulario numerico"
463
464
  },
465
+ "obliqueview": {
466
+ "nodataset": "Nessuna immagine aerea obliqua disponibile",
467
+ "title": "Vista aerea obliqua"
468
+ },
464
469
  "panoramax": {
465
470
  "notfound": "Nessun immagine disponibile per questa posizione",
466
471
  "title": "Visualizzatore Panoramax"
@@ -50,6 +50,7 @@
50
50
  "MeasureLineString": "ラインを測る",
51
51
  "MeasurePolygon": "ポリゴンを測る",
52
52
  "NewsPopup": "ニュース",
53
+ "ObliqueView": "",
53
54
  "Panoramax": "Panoramax",
54
55
  "Portal": "ポータル",
55
56
  "PrintScreen3D": "ラスタ・エクスポート",
@@ -461,6 +462,10 @@
461
462
  "width": "幅",
462
463
  "windowtitle": "数値入力"
463
464
  },
465
+ "obliqueview": {
466
+ "nodataset": "",
467
+ "title": ""
468
+ },
464
469
  "panoramax": {
465
470
  "notfound": "この場所には表示できる画像がありません。",
466
471
  "title": "Panoramax Viewer"
@@ -50,6 +50,7 @@
50
50
  "MeasureLineString": "lengte meten",
51
51
  "MeasurePolygon": "Oppervlakte meten",
52
52
  "NewsPopup": "",
53
+ "ObliqueView": "",
53
54
  "Panoramax": "",
54
55
  "Portal": "Portal",
55
56
  "PrintScreen3D": "",
@@ -461,6 +462,10 @@
461
462
  "width": "Breedte",
462
463
  "windowtitle": "Numerieke invoer"
463
464
  },
465
+ "obliqueview": {
466
+ "nodataset": "",
467
+ "title": ""
468
+ },
464
469
  "panoramax": {
465
470
  "notfound": "",
466
471
  "title": ""
@@ -50,6 +50,7 @@
50
50
  "MeasureLineString": "Måle en linje",
51
51
  "MeasurePolygon": "Måle en polygon",
52
52
  "NewsPopup": "",
53
+ "ObliqueView": "",
53
54
  "Panoramax": "",
54
55
  "Portal": "",
55
56
  "PrintScreen3D": "",
@@ -461,6 +462,10 @@
461
462
  "width": "",
462
463
  "windowtitle": ""
463
464
  },
465
+ "obliqueview": {
466
+ "nodataset": "",
467
+ "title": ""
468
+ },
464
469
  "panoramax": {
465
470
  "notfound": "",
466
471
  "title": ""
@@ -50,6 +50,7 @@
50
50
  "MeasureLineString": "Zmierzyć linię",
51
51
  "MeasurePolygon": "Zmierzyć wielokąt",
52
52
  "NewsPopup": "",
53
+ "ObliqueView": "",
53
54
  "Panoramax": "",
54
55
  "Portal": "",
55
56
  "PrintScreen3D": "",
@@ -461,6 +462,10 @@
461
462
  "width": "",
462
463
  "windowtitle": ""
463
464
  },
465
+ "obliqueview": {
466
+ "nodataset": "",
467
+ "title": ""
468
+ },
464
469
  "panoramax": {
465
470
  "notfound": "",
466
471
  "title": ""
@@ -50,6 +50,7 @@
50
50
  "MeasureLineString": "Medir uma linha",
51
51
  "MeasurePolygon": "Medir um polígono",
52
52
  "NewsPopup": "",
53
+ "ObliqueView": "",
53
54
  "Panoramax": "",
54
55
  "Portal": "",
55
56
  "PrintScreen3D": "",
@@ -461,6 +462,10 @@
461
462
  "width": "Largura",
462
463
  "windowtitle": "Título da janela"
463
464
  },
465
+ "obliqueview": {
466
+ "nodataset": "",
467
+ "title": ""
468
+ },
464
469
  "panoramax": {
465
470
  "notfound": "",
466
471
  "title": ""
@@ -50,6 +50,7 @@
50
50
  "MeasureLineString": "Medir Linha",
51
51
  "MeasurePolygon": "Medir Polígono",
52
52
  "NewsPopup": "",
53
+ "ObliqueView": "",
53
54
  "Panoramax": "",
54
55
  "Portal": "",
55
56
  "PrintScreen3D": "",
@@ -461,6 +462,10 @@
461
462
  "width": "Largura",
462
463
  "windowtitle": "Entrada Numérica"
463
464
  },
465
+ "obliqueview": {
466
+ "nodataset": "",
467
+ "title": ""
468
+ },
464
469
  "panoramax": {
465
470
  "notfound": "",
466
471
  "title": ""
@@ -50,6 +50,7 @@
50
50
  "MeasureLineString": "Măsoară o linie",
51
51
  "MeasurePolygon": "Măsoară un poligon",
52
52
  "NewsPopup": "",
53
+ "ObliqueView": "",
53
54
  "Panoramax": "",
54
55
  "Portal": "",
55
56
  "PrintScreen3D": "",
@@ -461,6 +462,10 @@
461
462
  "width": "Lățimea",
462
463
  "windowtitle": "Valori numerice"
463
464
  },
465
+ "obliqueview": {
466
+ "nodataset": "",
467
+ "title": ""
468
+ },
464
469
  "panoramax": {
465
470
  "notfound": "",
466
471
  "title": ""
@@ -50,6 +50,7 @@
50
50
  "MeasureLineString": "измерить линию",
51
51
  "MeasurePolygon": "измерить многоугольник",
52
52
  "NewsPopup": "",
53
+ "ObliqueView": "",
53
54
  "Panoramax": "",
54
55
  "Portal": "",
55
56
  "PrintScreen3D": "",
@@ -461,6 +462,10 @@
461
462
  "width": "",
462
463
  "windowtitle": ""
463
464
  },
465
+ "obliqueview": {
466
+ "nodataset": "",
467
+ "title": ""
468
+ },
464
469
  "panoramax": {
465
470
  "notfound": "",
466
471
  "title": ""
@@ -50,6 +50,7 @@
50
50
  "MeasureLineString": "Mäta en linje",
51
51
  "MeasurePolygon": "Mäta en polygon",
52
52
  "NewsPopup": "",
53
+ "ObliqueView": "",
53
54
  "Panoramax": "",
54
55
  "Portal": "",
55
56
  "PrintScreen3D": "",
@@ -461,6 +462,10 @@
461
462
  "width": "",
462
463
  "windowtitle": ""
463
464
  },
465
+ "obliqueview": {
466
+ "nodataset": "",
467
+ "title": ""
468
+ },
464
469
  "panoramax": {
465
470
  "notfound": "",
466
471
  "title": ""
@@ -50,6 +50,7 @@
50
50
  "MeasureLineString": "Çizgi Ölç",
51
51
  "MeasurePolygon": "Alan Ölç",
52
52
  "NewsPopup": "",
53
+ "ObliqueView": "",
53
54
  "Panoramax": "",
54
55
  "Portal": "Portal",
55
56
  "PrintScreen3D": "Görüntüyü ver",
@@ -461,6 +462,10 @@
461
462
  "width": "Genişlik",
462
463
  "windowtitle": "Sayısal giriş"
463
464
  },
465
+ "obliqueview": {
466
+ "nodataset": "",
467
+ "title": ""
468
+ },
464
469
  "panoramax": {
465
470
  "notfound": "",
466
471
  "title": ""
@@ -45,6 +45,7 @@
45
45
  "appmenu.items.MeasureLineString",
46
46
  "appmenu.items.MeasurePolygon",
47
47
  "appmenu.items.NewsPopup",
48
+ "appmenu.items.ObliqueView",
48
49
  "appmenu.items.ObjectList",
49
50
  "appmenu.items.Panoramax",
50
51
  "appmenu.items.Portal",
@@ -401,6 +402,8 @@
401
402
  "numericinput.side",
402
403
  "numericinput.width",
403
404
  "numericinput.windowtitle",
405
+ "obliqueview.nodataset",
406
+ "obliqueview.title",
404
407
  "panoramax.notfound",
405
408
  "panoramax.title",
406
409
  "pickfeature.querying",
@@ -50,6 +50,7 @@
50
50
  "MeasureLineString": "Поміряти відрізок",
51
51
  "MeasurePolygon": "Виміряти полігон",
52
52
  "NewsPopup": "",
53
+ "ObliqueView": "",
53
54
  "Panoramax": "",
54
55
  "Portal": "",
55
56
  "PrintScreen3D": "",
@@ -461,6 +462,10 @@
461
462
  "width": "",
462
463
  "windowtitle": ""
463
464
  },
465
+ "obliqueview": {
466
+ "nodataset": "",
467
+ "title": ""
468
+ },
464
469
  "panoramax": {
465
470
  "notfound": "",
466
471
  "title": ""
@@ -19,6 +19,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
19
19
  * LICENSE file in the root directory of this source tree.
20
20
  */
21
21
 
22
+ import cleanCords from '@turf/clean-coords';
22
23
  import geojsonBbox from 'geojson-bounding-box';
23
24
  import isEmpty from 'lodash.isempty';
24
25
  import { getDefaultImageStyle } from 'ol/format/KML';
@@ -74,8 +75,14 @@ var VectorLayerUtils = {
74
75
  })
75
76
  });
76
77
  }
77
- return VectorLayerUtils.simplifyFeature(feature);
78
- }).flat();
78
+ try {
79
+ return VectorLayerUtils.simplifyFeature(feature);
80
+ } catch (e) {
81
+ /* eslint-disable-next-line */
82
+ console.warn("Skipping invalid geometry");
83
+ return null;
84
+ }
85
+ }).filter(Boolean).flat();
79
86
  var _iterator2 = _createForOfIteratorHelper(features),
80
87
  _step2;
81
88
  try {
@@ -180,7 +187,7 @@ var VectorLayerUtils = {
180
187
  }));
181
188
  }).flat();
182
189
  } else if (feature.geometry.type === "Polygon") {
183
- return simplepolygon(feature).features.map(function (feat, idx, features) {
190
+ return simplepolygon(cleanCords(feature)).features.map(function (feat, idx, features) {
184
191
  if (feat.properties.parent >= 0) {
185
192
  features[feat.properties.parent].geometry.coordinates.push(feat.geometry.coordinates[0]);
186
193
  return null;