deeptwins-engine-3d 0.1.43 → 0.1.45
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/dist/esm/graphicLayer/BaseSource.d.ts +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +4 -2
- package/dist/esm/lowAltitude/FlightPlanning.js +10 -25
- package/dist/esm/lowAltitude/FlightRiskEvaluation.d.ts +26 -0
- package/dist/esm/lowAltitude/FlightRiskEvaluation.js +552 -0
- package/dist/esm/tool/common.d.ts +1 -0
- package/dist/esm/tool/common.js +13 -1
- package/dist/esm/tool/fetch.d.ts +51 -0
- package/dist/esm/tool/fetch.js +222 -0
- package/dist/esm/videoFusion/BaseVideo.d.ts +1 -1
- package/dist/esm/videoFusion/BaseVideo.js +44 -1
- package/dist/esm/videoFusion/VideoProject.js +3 -0
- package/dist/esm/videoFusion/VideoTexture.js +3 -0
- package/dist/esm/visualization/PointCluster.js +40 -13
- package/dist/umd/deeptwins-engine-3d.min.js +1 -1
- package/package.json +2 -2
- package/dist/esm/lowAltitude/RiskEvaluation.d.ts +0 -0
- package/dist/esm/lowAltitude/RiskEvaluation.js +0 -0
|
@@ -15,7 +15,7 @@ export default class BaseSource {
|
|
|
15
15
|
remove(): void;
|
|
16
16
|
setData(data: any): this | undefined;
|
|
17
17
|
_toDestroy(): void;
|
|
18
|
-
static analysisSourceType(data: any): "
|
|
18
|
+
static analysisSourceType(data: any): "wkt" | "sourceId" | "sourceInstance" | "geoJson" | "other";
|
|
19
19
|
static wktToGeoJon(wkt: string): any;
|
|
20
20
|
static geoJsonToGeoCartesian3Array(geoJson: any): any[];
|
|
21
21
|
static handleFeaturePoint(feature: any): any;
|
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -21,6 +21,7 @@ import Drawer from "./drawer/index";
|
|
|
21
21
|
import "./global.css";
|
|
22
22
|
import BarrierLayer from "./lowAltitude/BarrierLayer";
|
|
23
23
|
import FlightPlanning from "./lowAltitude/FlightPlanning";
|
|
24
|
+
import FlightRiskEvaluation from "./lowAltitude/FlightRiskEvaluation";
|
|
24
25
|
import GridDraw from "./lowAltitude/GridDraw";
|
|
25
26
|
import PoiLayer from "./lowAltitude/PoiLayer";
|
|
26
27
|
import VisitLayer from "./lowAltitude/VisitLayer";
|
|
@@ -57,11 +58,11 @@ DEEP_TWINS_BASE_URL && (window.CESIUM_BASE_URL = DEEP_TWINS_BASE_URL);
|
|
|
57
58
|
// 全局加载css
|
|
58
59
|
loadCss(Cesium.buildModuleUrl('Widgets/widgets.css'));
|
|
59
60
|
// 打印版本信息
|
|
60
|
-
console.log('DeepTwinsEngine3D Version:', "0.1.
|
|
61
|
+
console.log('DeepTwinsEngine3D Version:', "0.1.45");
|
|
61
62
|
export var DeepTwinsEngine3D = /*#__PURE__*/_createClass(function DeepTwinsEngine3D() {
|
|
62
63
|
_classCallCheck(this, DeepTwinsEngine3D);
|
|
63
64
|
});
|
|
64
|
-
_defineProperty(DeepTwinsEngine3D, "Version", "0.1.
|
|
65
|
+
_defineProperty(DeepTwinsEngine3D, "Version", "0.1.45");
|
|
65
66
|
_defineProperty(DeepTwinsEngine3D, "Map", Map);
|
|
66
67
|
_defineProperty(DeepTwinsEngine3D, "GroundSkyBox", GroundSkyBox);
|
|
67
68
|
_defineProperty(DeepTwinsEngine3D, "RasterLayer", RasterLayer);
|
|
@@ -130,4 +131,5 @@ _defineProperty(DeepTwinsEngine3D, "ViewshedAnalysis", ViewshedAnalysis);
|
|
|
130
131
|
_defineProperty(DeepTwinsEngine3D, "VisitLayer", VisitLayer);
|
|
131
132
|
_defineProperty(DeepTwinsEngine3D, "PoiLayer", PoiLayer);
|
|
132
133
|
_defineProperty(DeepTwinsEngine3D, "FlightPlanning", FlightPlanning);
|
|
134
|
+
_defineProperty(DeepTwinsEngine3D, "FlightRiskEvaluation", FlightRiskEvaluation);
|
|
133
135
|
export default DeepTwinsEngine3D;
|
|
@@ -15,6 +15,7 @@ import * as Cesium from 'deeptwins-cesium';
|
|
|
15
15
|
import { merge } from 'lodash';
|
|
16
16
|
import { DEFAULT_FLIGHT_PLANNING_OPTIONS } from "../constant";
|
|
17
17
|
import { ShapeSection } from "../tool/common";
|
|
18
|
+
import fetch from "../tool/fetch";
|
|
18
19
|
import * as utils from "../tool/utils";
|
|
19
20
|
import GridDraw from "./GridDraw";
|
|
20
21
|
var FlightPlanning = /*#__PURE__*/function () {
|
|
@@ -57,46 +58,30 @@ var FlightPlanning = /*#__PURE__*/function () {
|
|
|
57
58
|
key: "createPlan",
|
|
58
59
|
value: function () {
|
|
59
60
|
var _createPlan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(value) {
|
|
60
|
-
var payload,
|
|
61
|
+
var payload, _yield$fetch$post, result, normalized, hasPoints;
|
|
61
62
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
62
63
|
while (1) switch (_context.prev = _context.next) {
|
|
63
64
|
case 0:
|
|
64
65
|
payload = this._buildPayload(value);
|
|
65
66
|
_context.next = 3;
|
|
66
|
-
return fetch(this.options.API_URL,
|
|
67
|
-
method: 'POST',
|
|
68
|
-
headers: {
|
|
69
|
-
'Content-Type': 'application/json'
|
|
70
|
-
},
|
|
71
|
-
body: JSON.stringify(payload)
|
|
72
|
-
});
|
|
67
|
+
return fetch.post(this.options.API_URL, payload);
|
|
73
68
|
case 3:
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
_context.next = 7;
|
|
77
|
-
break;
|
|
78
|
-
}
|
|
79
|
-
utils.error("\u63A5\u53E3\u8BF7\u6C42\u5931\u8D25\uFF0CHTTP ".concat(response.status));
|
|
80
|
-
return _context.abrupt("return");
|
|
81
|
-
case 7:
|
|
82
|
-
_context.next = 9;
|
|
83
|
-
return response.json();
|
|
84
|
-
case 9:
|
|
85
|
-
result = _context.sent;
|
|
69
|
+
_yield$fetch$post = _context.sent;
|
|
70
|
+
result = _yield$fetch$post.data;
|
|
86
71
|
if (!(result.code !== 0)) {
|
|
87
|
-
_context.next =
|
|
72
|
+
_context.next = 8;
|
|
88
73
|
break;
|
|
89
74
|
}
|
|
90
75
|
utils.error(result.message || '规划接口返回失败');
|
|
91
76
|
return _context.abrupt("return");
|
|
92
|
-
case
|
|
77
|
+
case 8:
|
|
93
78
|
if (result.data) {
|
|
94
|
-
_context.next =
|
|
79
|
+
_context.next = 11;
|
|
95
80
|
break;
|
|
96
81
|
}
|
|
97
82
|
utils.error('规划结果为空');
|
|
98
83
|
return _context.abrupt("return");
|
|
99
|
-
case
|
|
84
|
+
case 11:
|
|
100
85
|
normalized = this._normalizeRouteData(result.data);
|
|
101
86
|
if (this.options.isDraw) {
|
|
102
87
|
hasPoints = normalized && Array.isArray(normalized.points) && normalized.points.length > 0;
|
|
@@ -111,7 +96,7 @@ var FlightPlanning = /*#__PURE__*/function () {
|
|
|
111
96
|
}
|
|
112
97
|
}
|
|
113
98
|
return _context.abrupt("return", normalized);
|
|
114
|
-
case
|
|
99
|
+
case 14:
|
|
115
100
|
case "end":
|
|
116
101
|
return _context.stop();
|
|
117
102
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
declare class FlightRiskEvaluation {
|
|
2
|
+
private readonly _mapContext;
|
|
3
|
+
isDestroyed: boolean;
|
|
4
|
+
options: any;
|
|
5
|
+
routeSource: any;
|
|
6
|
+
routeResultSource: any;
|
|
7
|
+
routePointsLayer: any;
|
|
8
|
+
routePointsLabelLayer: any;
|
|
9
|
+
routePipelineLayer: any;
|
|
10
|
+
riskPointsLayer: any;
|
|
11
|
+
riskPointsLabelLayer: any;
|
|
12
|
+
gridsLayer: any;
|
|
13
|
+
constructor(map: any, options?: any);
|
|
14
|
+
private _canOperate;
|
|
15
|
+
getMap(): any;
|
|
16
|
+
start(geoJson?: any): Promise<void>;
|
|
17
|
+
private _createRoute;
|
|
18
|
+
private _clearRoute;
|
|
19
|
+
private _getSegmentColorFromEvaluation;
|
|
20
|
+
private _clusterRiskPoints;
|
|
21
|
+
private _createRiskPoints;
|
|
22
|
+
private _clearRiskPoints;
|
|
23
|
+
private _createGrids;
|
|
24
|
+
destroy(): void;
|
|
25
|
+
}
|
|
26
|
+
export default FlightRiskEvaluation;
|