deeptwins-engine-3d 0.1.32 → 0.1.34
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/assets/Build/DeepTwins/Image/f_point.png +0 -0
- package/dist/esm/analyze/SubmergenceAnalysis.d.ts +19 -0
- package/dist/esm/analyze/SubmergenceAnalysis.js +137 -0
- package/dist/esm/constant.d.ts +29 -0
- package/dist/esm/constant.js +47 -0
- package/dist/esm/drawer/index.d.ts +56 -59
- package/dist/esm/drawer/index.js +380 -292
- package/dist/esm/drawer/shape/BaseShape.d.ts +33 -0
- package/dist/esm/drawer/shape/BaseShape.js +228 -0
- package/dist/esm/drawer/shape/Point.d.ts +44 -11
- package/dist/esm/drawer/shape/Point.js +299 -35
- package/dist/esm/drawer/shape/Polygon.d.ts +43 -9
- package/dist/esm/drawer/shape/Polygon.js +408 -56
- package/dist/esm/drawer/shape/Polyline.d.ts +41 -10
- package/dist/esm/drawer/shape/Polyline.js +373 -31
- package/dist/esm/drawer/utils.d.ts +1 -0
- package/dist/esm/drawer/utils.js +63 -0
- package/dist/esm/graphicLayer/BaseLayer.d.ts +1 -0
- package/dist/esm/graphicLayer/BaseLayer.js +8 -3
- package/dist/esm/graphicLayer/BaseSource.d.ts +1 -1
- package/dist/esm/graphicLayer/BaseSource.js +13 -3
- package/dist/esm/graphicLayer/GraphicLayerCollection.d.ts +2 -0
- package/dist/esm/graphicLayer/GraphicLayerCollection.js +46 -4
- package/dist/esm/graphicLayer/HtmlEntity.js +1 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +7 -4
- package/dist/esm/map/Map.d.ts +1 -0
- package/dist/esm/map/Map.js +10 -0
- package/dist/esm/measure/Area.d.ts +29 -0
- package/dist/esm/measure/{AreaMeasure.js → Area.js} +156 -65
- package/dist/esm/measure/BaseDraw.d.ts +13 -0
- package/dist/esm/measure/BaseDraw.js +70 -0
- package/dist/esm/measure/Distance.d.ts +23 -0
- package/dist/esm/measure/Distance.js +239 -0
- package/dist/esm/measure/index.d.ts +44 -5
- package/dist/esm/measure/index.js +278 -5
- package/dist/esm/measure/utils.d.ts +108 -14
- package/dist/esm/measure/utils.js +262 -20
- package/dist/esm/plot/create/CreateAssemble.d.ts +2 -0
- package/dist/esm/plot/create/CreateAssemble.js +63 -0
- package/dist/esm/plot/create/CreateAttackArrow.d.ts +5 -0
- package/dist/esm/plot/create/CreateAttackArrow.js +75 -0
- package/dist/esm/plot/create/CreateBillboard.d.ts +2 -0
- package/dist/esm/plot/create/CreateBillboard.js +47 -0
- package/dist/esm/plot/create/CreateBow.d.ts +2 -0
- package/dist/esm/plot/create/CreateBow.js +63 -0
- package/dist/esm/plot/create/CreateCircle.d.ts +2 -0
- package/dist/esm/plot/create/CreateCircle.js +68 -0
- package/dist/esm/plot/create/CreateCurve.d.ts +2 -0
- package/dist/esm/plot/create/CreateCurve.js +76 -0
- package/dist/esm/plot/create/CreateElliptic.d.ts +2 -0
- package/dist/esm/plot/create/CreateElliptic.js +69 -0
- package/dist/esm/plot/create/CreateFlag.d.ts +2 -0
- package/dist/esm/plot/create/CreateFlag.js +80 -0
- package/dist/esm/plot/create/CreateFormation.d.ts +2 -0
- package/dist/esm/plot/create/CreateFormation.js +65 -0
- package/dist/esm/plot/create/CreateFreeLine.d.ts +2 -0
- package/dist/esm/plot/create/CreateFreeLine.js +69 -0
- package/dist/esm/plot/create/CreateFreePolygon.d.ts +2 -0
- package/dist/esm/plot/create/CreateFreePolygon.js +65 -0
- package/dist/esm/plot/create/CreateLabel.d.ts +2 -0
- package/dist/esm/plot/create/CreateLabel.js +55 -0
- package/dist/esm/plot/create/CreateLineArrow.d.ts +2 -0
- package/dist/esm/plot/create/CreateLineArrow.js +79 -0
- package/dist/esm/plot/create/CreatePincerArrow.d.ts +5 -0
- package/dist/esm/plot/create/CreatePincerArrow.js +73 -0
- package/dist/esm/plot/create/CreatePoint.d.ts +2 -0
- package/dist/esm/plot/create/CreatePoint.js +47 -0
- package/dist/esm/plot/create/CreatePolygon.d.ts +2 -0
- package/dist/esm/plot/create/CreatePolygon.js +80 -0
- package/dist/esm/plot/create/CreatePolyline.d.ts +2 -0
- package/dist/esm/plot/create/CreatePolyline.js +70 -0
- package/dist/esm/plot/create/CreateRectangle.d.ts +2 -0
- package/dist/esm/plot/create/CreateRectangle.js +60 -0
- package/dist/esm/plot/create/CreateRegularPolygon.d.ts +2 -0
- package/dist/esm/plot/create/CreateRegularPolygon.js +75 -0
- package/dist/esm/plot/create/CreateRightAngleArrow.d.ts +5 -0
- package/dist/esm/plot/create/CreateRightAngleArrow.js +73 -0
- package/dist/esm/plot/create/CreateRoundRectangle.d.ts +2 -0
- package/dist/esm/plot/create/CreateRoundRectangle.js +63 -0
- package/dist/esm/plot/create/CreateSector.d.ts +2 -0
- package/dist/esm/plot/create/CreateSector.js +65 -0
- package/dist/esm/plot/create/CreateStraightArrow.d.ts +5 -0
- package/dist/esm/plot/create/CreateStraightArrow.js +65 -0
- package/dist/esm/plot/create/CreateSwallowtailArrow.d.ts +5 -0
- package/dist/esm/plot/create/CreateSwallowtailArrow.js +67 -0
- package/dist/esm/plot/create/index.d.ts +25 -0
- package/dist/esm/plot/create/index.js +25 -0
- package/dist/esm/plot/edit/EditAssemble.d.ts +8 -0
- package/dist/esm/plot/edit/EditAssemble.js +120 -0
- package/dist/esm/plot/edit/EditAttackArrow.d.ts +8 -0
- package/dist/esm/plot/edit/EditAttackArrow.js +182 -0
- package/dist/esm/plot/edit/EditBillboard.d.ts +7 -0
- package/dist/esm/plot/edit/EditBillboard.js +70 -0
- package/dist/esm/plot/edit/EditBow.d.ts +8 -0
- package/dist/esm/plot/edit/EditBow.js +119 -0
- package/dist/esm/plot/edit/EditCircle.d.ts +8 -0
- package/dist/esm/plot/edit/EditCircle.js +133 -0
- package/dist/esm/plot/edit/EditCurve.d.ts +8 -0
- package/dist/esm/plot/edit/EditCurve.js +180 -0
- package/dist/esm/plot/edit/EditElliptic.d.ts +8 -0
- package/dist/esm/plot/edit/EditElliptic.js +144 -0
- package/dist/esm/plot/edit/EditFlag.d.ts +8 -0
- package/dist/esm/plot/edit/EditFlag.js +121 -0
- package/dist/esm/plot/edit/EditFormation.d.ts +8 -0
- package/dist/esm/plot/edit/EditFormation.js +120 -0
- package/dist/esm/plot/edit/EditLabel.d.ts +7 -0
- package/dist/esm/plot/edit/EditLabel.js +100 -0
- package/dist/esm/plot/edit/EditLineArrow.d.ts +8 -0
- package/dist/esm/plot/edit/EditLineArrow.js +180 -0
- package/dist/esm/plot/edit/EditPincerArrow.d.ts +8 -0
- package/dist/esm/plot/edit/EditPincerArrow.js +121 -0
- package/dist/esm/plot/edit/EditPoint.d.ts +7 -0
- package/dist/esm/plot/edit/EditPoint.js +70 -0
- package/dist/esm/plot/edit/EditPolygon.d.ts +8 -0
- package/dist/esm/plot/edit/EditPolygon.js +181 -0
- package/dist/esm/plot/edit/EditPolyline.d.ts +8 -0
- package/dist/esm/plot/edit/EditPolyline.js +179 -0
- package/dist/esm/plot/edit/EditRectangle.d.ts +8 -0
- package/dist/esm/plot/edit/EditRectangle.js +119 -0
- package/dist/esm/plot/edit/EditRegularPolygon.d.ts +8 -0
- package/dist/esm/plot/edit/EditRegularPolygon.js +170 -0
- package/dist/esm/plot/edit/EditRightAngleArrow.d.ts +8 -0
- package/dist/esm/plot/edit/EditRightAngleArrow.js +143 -0
- package/dist/esm/plot/edit/EditRoundRectangle.d.ts +8 -0
- package/dist/esm/plot/edit/EditRoundRectangle.js +119 -0
- package/dist/esm/plot/edit/EditSector.d.ts +8 -0
- package/dist/esm/plot/edit/EditSector.js +120 -0
- package/dist/esm/plot/edit/EditStraightArrow.d.ts +8 -0
- package/dist/esm/plot/edit/EditStraightArrow.js +120 -0
- package/dist/esm/plot/edit/EditSwallowtailArrow.d.ts +8 -0
- package/dist/esm/plot/edit/EditSwallowtailArrow.js +121 -0
- package/dist/esm/plot/edit/index.d.ts +23 -0
- package/dist/esm/plot/edit/index.js +23 -0
- package/dist/esm/plot/utils/Algorithm.d.ts +2 -0
- package/dist/esm/plot/utils/Algorithm.js +316 -0
- package/dist/esm/plot/utils/Coordinate.d.ts +98 -0
- package/dist/esm/plot/utils/Coordinate.js +184 -0
- package/dist/esm/plot/utils/DomUtil.d.ts +34 -0
- package/dist/esm/plot/utils/DomUtil.js +100 -0
- package/dist/esm/plot/utils/PlotCommon.d.ts +101 -0
- package/dist/esm/plot/utils/PlotCommon.js +1412 -0
- package/dist/esm/plot/utils/ReminderTip.d.ts +10 -0
- package/dist/esm/plot/utils/ReminderTip.js +67 -0
- package/dist/esm/plot/utils/Tooltip.d.ts +3 -0
- package/dist/esm/plot/utils/Tooltip.js +97 -0
- package/dist/esm/plot/utils/plotUtil.d.ts +5 -0
- package/dist/esm/plot/utils/plotUtil.js +268 -0
- package/dist/esm/tool/utils.d.ts +8 -7
- package/dist/esm/tool/utils.js +20 -16
- package/dist/esm/toolTip/index.d.ts +2 -1
- package/dist/esm/toolTip/index.js +12 -6
- package/dist/esm/typings.d.ts +1 -0
- package/dist/umd/deeptwins-engine-3d.min.js +1 -1
- package/package.json +1 -1
- package/dist/esm/drawer/base.d.ts +0 -51
- package/dist/esm/drawer/base.js +0 -179
- package/dist/esm/drawer/painter.d.ts +0 -41
- package/dist/esm/drawer/painter.js +0 -115
- package/dist/esm/drawer/shape/Ellipse.d.ts +0 -10
- package/dist/esm/drawer/shape/Ellipse.js +0 -62
- package/dist/esm/drawer/shape/Rectangle.d.ts +0 -10
- package/dist/esm/drawer/shape/Rectangle.js +0 -85
- package/dist/esm/drawer/typings.d.ts +0 -106
- package/dist/esm/drawer/typings.js +0 -1
- package/dist/esm/measure/AreaMeasure.d.ts +0 -19
- package/dist/esm/measure/AreaSurfaceMeasure.d.ts +0 -30
- package/dist/esm/measure/AreaSurfaceMeasure.js +0 -151
- package/dist/esm/measure/DistanceMeasure.d.ts +0 -19
- package/dist/esm/measure/DistanceMeasure.js +0 -91
- package/dist/esm/measure/DistanceSurfaceMeasure.d.ts +0 -37
- package/dist/esm/measure/DistanceSurfaceMeasure.js +0 -122
- package/dist/esm/measure/Measure.d.ts +0 -111
- package/dist/esm/measure/Measure.js +0 -177
- package/dist/esm/tool/cesiumExtends/Subscriber/index.d.ts +0 -66
- package/dist/esm/tool/cesiumExtends/Subscriber/index.js +0 -246
- package/dist/esm/tool/kriging.d.ts +0 -10
- package/dist/esm/tool/kriging.js +0 -436
|
Binary file
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare class SubmergenceAnalysis {
|
|
2
|
+
private readonly _mapContext;
|
|
3
|
+
options: any;
|
|
4
|
+
isDestroyed: boolean;
|
|
5
|
+
extent: any;
|
|
6
|
+
private _layer;
|
|
7
|
+
private _timer;
|
|
8
|
+
private _currWaterHeight;
|
|
9
|
+
constructor(map: any, extent: any, options?: any);
|
|
10
|
+
private _canOperate;
|
|
11
|
+
getMap(): any;
|
|
12
|
+
private _createEntity;
|
|
13
|
+
flyTo(): void;
|
|
14
|
+
start(): void;
|
|
15
|
+
pause(): void;
|
|
16
|
+
stop(): void;
|
|
17
|
+
private destroy;
|
|
18
|
+
}
|
|
19
|
+
export default SubmergenceAnalysis;
|
|
@@ -0,0 +1,137 @@
|
|
|
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(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
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); }
|
|
8
|
+
import * as Cesium from 'deeptwins-cesium';
|
|
9
|
+
import { merge } from 'lodash';
|
|
10
|
+
import { DEFAULT_SUBMERGENCE_ANALYSIS_OPTIONS } from "../constant";
|
|
11
|
+
import TimerInterval from "../tool/TimerInterval";
|
|
12
|
+
import * as utils from "../tool/utils";
|
|
13
|
+
|
|
14
|
+
// 淹没分析
|
|
15
|
+
var SubmergenceAnalysis = /*#__PURE__*/function () {
|
|
16
|
+
function SubmergenceAnalysis(map, extent) {
|
|
17
|
+
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
18
|
+
_classCallCheck(this, SubmergenceAnalysis);
|
|
19
|
+
_defineProperty(this, "_mapContext", void 0);
|
|
20
|
+
_defineProperty(this, "options", void 0);
|
|
21
|
+
_defineProperty(this, "isDestroyed", false);
|
|
22
|
+
_defineProperty(this, "extent", void 0);
|
|
23
|
+
// 范围 geojson类型
|
|
24
|
+
_defineProperty(this, "_layer", void 0);
|
|
25
|
+
_defineProperty(this, "_timer", void 0);
|
|
26
|
+
_defineProperty(this, "_currWaterHeight", void 0);
|
|
27
|
+
this._mapContext = map._mapContext;
|
|
28
|
+
this.extent = extent;
|
|
29
|
+
this.options = merge(DEFAULT_SUBMERGENCE_ANALYSIS_OPTIONS(), options);
|
|
30
|
+
this._currWaterHeight = this.options.waterHeight;
|
|
31
|
+
this._createEntity();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// 是否能进行操作
|
|
35
|
+
_createClass(SubmergenceAnalysis, [{
|
|
36
|
+
key: "_canOperate",
|
|
37
|
+
value: function _canOperate() {
|
|
38
|
+
if (this.isDestroyed) {
|
|
39
|
+
utils.error('Drawer实例已销毁');
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
}, {
|
|
45
|
+
key: "getMap",
|
|
46
|
+
value: function getMap() {
|
|
47
|
+
return this._mapContext && this._mapContext.getMap();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
//创建淹没实体
|
|
51
|
+
}, {
|
|
52
|
+
key: "_createEntity",
|
|
53
|
+
value: function _createEntity() {
|
|
54
|
+
var _this = this;
|
|
55
|
+
if (!this._canOperate()) return;
|
|
56
|
+
this._layer = this.getMap().addGraphicLayer(this.extent, {
|
|
57
|
+
type: 'polygon',
|
|
58
|
+
style: {
|
|
59
|
+
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
|
60
|
+
perPositionHeight: false,
|
|
61
|
+
material: this.options.color,
|
|
62
|
+
extrudedHeight: new Cesium.CallbackProperty(function () {
|
|
63
|
+
return _this._currWaterHeight;
|
|
64
|
+
}, false)
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}, {
|
|
69
|
+
key: "flyTo",
|
|
70
|
+
value: function flyTo() {
|
|
71
|
+
if (!this._canOperate()) return;
|
|
72
|
+
this._layer && this._layer.flyTo();
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
//开始
|
|
76
|
+
}, {
|
|
77
|
+
key: "start",
|
|
78
|
+
value: function start() {
|
|
79
|
+
var _this2 = this;
|
|
80
|
+
if (!this._canOperate()) return;
|
|
81
|
+
this._timer = new TimerInterval(function () {
|
|
82
|
+
var sp = _this2.options.speed / 50;
|
|
83
|
+
if (_this2.options.changeType == 'up') {
|
|
84
|
+
_this2._currWaterHeight += sp;
|
|
85
|
+
if (_this2._currWaterHeight > _this2.options.targetHeight) {
|
|
86
|
+
_this2._currWaterHeight = _this2.options.targetHeight; //给个最大值
|
|
87
|
+
window.clearInterval(_this2._timer);
|
|
88
|
+
_this2.options.onComplete && _this2.options.onComplete();
|
|
89
|
+
}
|
|
90
|
+
} else {
|
|
91
|
+
_this2._currWaterHeight -= sp;
|
|
92
|
+
if (_this2._currWaterHeight < _this2.options.targetHeight) {
|
|
93
|
+
_this2._currWaterHeight = _this2.options.targetHeight; //给个最大值
|
|
94
|
+
window.clearInterval(_this2._timer);
|
|
95
|
+
_this2.options.onComplete && _this2.options.onComplete();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
_this2.options.onChange && _this2.options.onChange(_this2._currWaterHeight);
|
|
99
|
+
}, 20);
|
|
100
|
+
this._timer.start(true);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// 暂停
|
|
104
|
+
}, {
|
|
105
|
+
key: "pause",
|
|
106
|
+
value: function pause() {
|
|
107
|
+
if (!this._canOperate()) return;
|
|
108
|
+
this._timer && this._timer.stop();
|
|
109
|
+
this._timer = null;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// 停止
|
|
113
|
+
}, {
|
|
114
|
+
key: "stop",
|
|
115
|
+
value: function stop() {
|
|
116
|
+
if (!this._canOperate()) return;
|
|
117
|
+
this._timer && this._timer.stop();
|
|
118
|
+
this._timer = null;
|
|
119
|
+
this._currWaterHeight = this.options.waterHeight;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
//关闭
|
|
123
|
+
}, {
|
|
124
|
+
key: "destroy",
|
|
125
|
+
value: function destroy() {
|
|
126
|
+
if (!this._canOperate()) return;
|
|
127
|
+
this.isDestroyed = true;
|
|
128
|
+
this._timer && this._timer.stop();
|
|
129
|
+
this._timer = null;
|
|
130
|
+
this._currWaterHeight = null;
|
|
131
|
+
this._layer && this._layer.remove();
|
|
132
|
+
this._layer = null;
|
|
133
|
+
}
|
|
134
|
+
}]);
|
|
135
|
+
return SubmergenceAnalysis;
|
|
136
|
+
}();
|
|
137
|
+
export default SubmergenceAnalysis;
|
package/dist/esm/constant.d.ts
CHANGED
|
@@ -69,6 +69,27 @@ export declare const HTML_CONTAINER_ID = "deepHtmlContainer";
|
|
|
69
69
|
export declare const HEATMAP_CONTAINER_ID = "deepHeatMapContainer";
|
|
70
70
|
export declare const VIDEO_CONTAINER_ID = "deepVideoContainer";
|
|
71
71
|
export declare const PROPERTY_TYPE_TO_CLASS: any;
|
|
72
|
+
export declare const DEFAULT_DRAWER_OPTIONS: () => {
|
|
73
|
+
pointStyle: {
|
|
74
|
+
color: string;
|
|
75
|
+
pixelSize: number;
|
|
76
|
+
outlineColor: string;
|
|
77
|
+
outlineWidth: number;
|
|
78
|
+
};
|
|
79
|
+
polylineStyle: {
|
|
80
|
+
width: number;
|
|
81
|
+
material: string;
|
|
82
|
+
};
|
|
83
|
+
polygonStyle: {
|
|
84
|
+
fill: boolean;
|
|
85
|
+
material: string;
|
|
86
|
+
};
|
|
87
|
+
clampToGround: boolean;
|
|
88
|
+
};
|
|
89
|
+
export declare const DEFAULT_MEASURE_STYLE: () => {
|
|
90
|
+
clampToGround: boolean;
|
|
91
|
+
splitNum: number;
|
|
92
|
+
};
|
|
72
93
|
export declare const DEFAULT_HEATMAP_STYLE: () => {
|
|
73
94
|
radius: number;
|
|
74
95
|
opacity: number;
|
|
@@ -110,6 +131,14 @@ export declare const DEFAULT_VIDEO_TEXTURE_HLS: () => {
|
|
|
110
131
|
width: number;
|
|
111
132
|
height: number;
|
|
112
133
|
};
|
|
134
|
+
export declare const DEFAULT_SUBMERGENCE_ANALYSIS_OPTIONS: () => {
|
|
135
|
+
startHeight: number;
|
|
136
|
+
targetHeight: number;
|
|
137
|
+
waterHeight: number;
|
|
138
|
+
speed: number;
|
|
139
|
+
color: string;
|
|
140
|
+
changeType: string;
|
|
141
|
+
};
|
|
113
142
|
export declare const DEFAULT_BASE_LAYER_TYPE: any;
|
|
114
143
|
export declare const DEFAULT_BASE_LAYER: any;
|
|
115
144
|
export declare const LAYER_TYPE_TO_CLASS: any;
|
package/dist/esm/constant.js
CHANGED
|
@@ -113,6 +113,35 @@ export var PROPERTY_TYPE_TO_CLASS = {
|
|
|
113
113
|
callbackProperty: Cesium.CallbackProperty
|
|
114
114
|
};
|
|
115
115
|
|
|
116
|
+
// 默认绘制工具样式
|
|
117
|
+
export var DEFAULT_DRAWER_OPTIONS = function DEFAULT_DRAWER_OPTIONS() {
|
|
118
|
+
return {
|
|
119
|
+
pointStyle: {
|
|
120
|
+
color: '#1890FF',
|
|
121
|
+
pixelSize: 10,
|
|
122
|
+
outlineColor: '#ffffff',
|
|
123
|
+
outlineWidth: 2
|
|
124
|
+
},
|
|
125
|
+
polylineStyle: {
|
|
126
|
+
width: 2,
|
|
127
|
+
material: '#1890FF'
|
|
128
|
+
},
|
|
129
|
+
polygonStyle: {
|
|
130
|
+
fill: true,
|
|
131
|
+
material: 'rgba(24,144,255,0.5)'
|
|
132
|
+
},
|
|
133
|
+
clampToGround: false
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
// 默认测量样式
|
|
138
|
+
export var DEFAULT_MEASURE_STYLE = function DEFAULT_MEASURE_STYLE() {
|
|
139
|
+
return {
|
|
140
|
+
clampToGround: false,
|
|
141
|
+
splitNum: 20
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
|
|
116
145
|
// 默认热力样式
|
|
117
146
|
export var DEFAULT_HEATMAP_STYLE = function DEFAULT_HEATMAP_STYLE() {
|
|
118
147
|
return {
|
|
@@ -176,6 +205,23 @@ export var DEFAULT_VIDEO_TEXTURE_HLS = function DEFAULT_VIDEO_TEXTURE_HLS() {
|
|
|
176
205
|
};
|
|
177
206
|
};
|
|
178
207
|
|
|
208
|
+
// 默认淹没分析配置选项 SubmergenceAnalysis
|
|
209
|
+
export var DEFAULT_SUBMERGENCE_ANALYSIS_OPTIONS = function DEFAULT_SUBMERGENCE_ANALYSIS_OPTIONS() {
|
|
210
|
+
return {
|
|
211
|
+
startHeight: 0,
|
|
212
|
+
// 开始高度
|
|
213
|
+
targetHeight: 100,
|
|
214
|
+
// 目标高度
|
|
215
|
+
waterHeight: 0,
|
|
216
|
+
// 水面高度
|
|
217
|
+
speed: 1,
|
|
218
|
+
// 速度
|
|
219
|
+
color: '#409DFD',
|
|
220
|
+
// 颜色
|
|
221
|
+
changeType: 'up' // 变化类型 up/down
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
|
|
179
225
|
// 默认的底图类型
|
|
180
226
|
export var DEFAULT_BASE_LAYER_TYPE = {
|
|
181
227
|
GAO_DE_IMG: 'gd_img',
|
|
@@ -370,6 +416,7 @@ export var DEFAULT_POLYLINE_TRAIL_LINK_MATERIAL_STYLE = function DEFAULT_POLYLIN
|
|
|
370
416
|
image: utils.getDeepTwinsFile('Image/line.png')
|
|
371
417
|
};
|
|
372
418
|
};
|
|
419
|
+
|
|
373
420
|
// 动态墙材质默认的配置
|
|
374
421
|
export var DEFAULT_DYNAMIC_WALL_MATERIAL_STYLE = function DEFAULT_DYNAMIC_WALL_MATERIAL_STYLE() {
|
|
375
422
|
return {
|
|
@@ -1,62 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
export interface DrawContext {
|
|
2
|
+
options: any;
|
|
3
|
+
getMap: any;
|
|
4
|
+
setDrawerLayer: any;
|
|
5
|
+
_changeStatus: any;
|
|
6
|
+
_updateTooltip: any;
|
|
7
|
+
}
|
|
8
|
+
export declare const STATUS: {
|
|
9
|
+
readonly INIT: "INIT";
|
|
10
|
+
readonly START_DRAW: "START_DRAW";
|
|
11
|
+
readonly DRAWING: "DRAWING";
|
|
12
|
+
readonly END_DRAW: "END_DRAW";
|
|
13
|
+
readonly EDITING: "EDITING";
|
|
14
|
+
readonly END_EDIT: "END_EDIT";
|
|
15
|
+
};
|
|
16
|
+
export type Status = (typeof STATUS)[keyof typeof STATUS];
|
|
17
|
+
export declare const MULTI_POINT_SHAPE_TYPES: {
|
|
18
|
+
readonly POLYLINE: "polyline";
|
|
19
|
+
readonly POLYGON: "polygon";
|
|
20
|
+
};
|
|
21
|
+
export declare const MULTI_POINT_SHAPES: ("polygon" | "polyline")[];
|
|
22
|
+
declare class Drawer implements DrawContext {
|
|
23
|
+
private readonly _mapContext;
|
|
24
|
+
private readonly _drawContext;
|
|
25
|
+
options: any;
|
|
26
|
+
tooltip: any;
|
|
27
|
+
isDestroyed: boolean;
|
|
11
28
|
private _status;
|
|
12
|
-
private
|
|
13
|
-
private
|
|
14
|
-
private
|
|
15
|
-
private
|
|
16
|
-
private
|
|
17
|
-
private
|
|
18
|
-
private
|
|
19
|
-
private
|
|
20
|
-
private
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
private
|
|
26
|
-
private
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
private
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
END: any;
|
|
41
|
-
};
|
|
42
|
-
get isDestroyed(): boolean;
|
|
43
|
-
constructor(viewer: Viewer, options?: Partial<DrawOption>);
|
|
44
|
-
/**
|
|
45
|
-
* @param finalOptions
|
|
46
|
-
* @param dynamicOptions
|
|
47
|
-
*/
|
|
48
|
-
private _initPainter;
|
|
49
|
-
private _updateTips;
|
|
50
|
-
/**
|
|
51
|
-
* @desc 绘制函数,
|
|
52
|
-
* @param config 绘制配置,可以通过定义options直接改写结果而不再填第二个参数
|
|
53
|
-
* @param overrideFunc Entity 重写函数,用于重写绘制结果,如果 overrideFunc返回一个Entity,则将该Entity添加到Viewer中,否则结束函数无操作
|
|
54
|
-
* @returns
|
|
55
|
-
*/
|
|
56
|
-
start(config: StartOption, overrideFunc?: OverrideEntityFunc): void;
|
|
57
|
-
private _complete;
|
|
58
|
-
private _isSupport;
|
|
59
|
-
reset(): void;
|
|
60
|
-
pause(): void;
|
|
29
|
+
private _dragging;
|
|
30
|
+
private _eventLeftDown;
|
|
31
|
+
private _eventLeftUp;
|
|
32
|
+
private _eventClick;
|
|
33
|
+
private _eventMove;
|
|
34
|
+
private _eventDoubleClick;
|
|
35
|
+
private _eventRightClick;
|
|
36
|
+
private _instance;
|
|
37
|
+
private _drawLayers;
|
|
38
|
+
constructor(map: any, options?: any);
|
|
39
|
+
private _canOperate;
|
|
40
|
+
getMap(): any;
|
|
41
|
+
_isDragPoint(e: any): any;
|
|
42
|
+
private _createListeners;
|
|
43
|
+
private _destroyListeners;
|
|
44
|
+
_updateTooltip(): void;
|
|
45
|
+
_changeStatus(status: any): void;
|
|
46
|
+
dataTransformDraw(data: any): any[] | undefined;
|
|
47
|
+
startDraw(type: any, config?: any): any;
|
|
48
|
+
private _stopDraw;
|
|
49
|
+
startEdit(id: any): void;
|
|
50
|
+
endEdit(): void;
|
|
51
|
+
getDrawerLayer(id: any): any;
|
|
52
|
+
setDrawerLayer(id: any, value: any): void;
|
|
53
|
+
removeDrawerLayer(id: any): void;
|
|
54
|
+
getAllDrawerLayers(): unknown[] | undefined;
|
|
55
|
+
clearAllDrawerLayers(): void;
|
|
56
|
+
clear(): void;
|
|
61
57
|
destroy(): void;
|
|
62
58
|
}
|
|
59
|
+
export default Drawer;
|