cesium_dev_kit 1.1.22 → 1.1.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/CHANGELOG.md +90 -0
- package/README.md +299 -291
- package/README.zh-CN.md +279 -0
- package/SECURITY.md +21 -0
- package/dist/Analysis-BLpVrGfg.d.mts +143 -0
- package/dist/Analysis-DmO1gtgS.d.ts +143 -0
- package/dist/Base-DH8H9suE.d.mts +635 -0
- package/dist/Base-DH8H9suE.d.ts +635 -0
- package/dist/Base-_BOXyMdS.d.ts +43 -0
- package/dist/Base-skqjcPfo.d.mts +43 -0
- package/dist/Control-B7AMFmHe.d.ts +98 -0
- package/dist/Control-BrpRU7RP.d.mts +98 -0
- package/dist/CustomCesiumPlugin-BqgAvlhi.d.ts +29 -0
- package/dist/CustomCesiumPlugin-CKYQ-7i9.d.mts +29 -0
- package/dist/Draw-1NhPP8z3.d.mts +490 -0
- package/dist/Draw-DRh7yNzc.d.ts +490 -0
- package/dist/Graphics-CuFNsQ3b.d.ts +1565 -0
- package/dist/Graphics-QE3Gb43w.d.mts +1565 -0
- package/dist/Material-CeZ4l-tY.d.mts +165 -0
- package/dist/Material-Cqbyf2Pn.d.ts +165 -0
- package/dist/Math3d-0nO-vFbT.d.mts +179 -0
- package/dist/Math3d-t635PYzU.d.ts +179 -0
- package/dist/PassEffect-DEFyytQZ.d.ts +41 -0
- package/dist/PassEffect-DEgElnVk.d.mts +41 -0
- package/dist/Plugin-BPCX0zTu.d.mts +197 -0
- package/dist/Plugin-DnYT0bue.d.ts +197 -0
- package/dist/Primitive-BNXp-9_6.d.mts +199 -0
- package/dist/Primitive-UEAuUimH.d.ts +199 -0
- package/dist/ThreeJs-BAlEWxa1.d.mts +44 -0
- package/dist/ThreeJs-DpAcw_qf.d.ts +44 -0
- package/dist/analysis.cjs +145 -0
- package/dist/analysis.cjs.map +1 -0
- package/dist/analysis.d.mts +6 -0
- package/dist/analysis.d.ts +6 -0
- package/dist/analysis.mjs +145 -0
- package/dist/analysis.mjs.map +1 -0
- package/dist/control.cjs +140 -0
- package/dist/control.cjs.map +1 -0
- package/dist/control.d.mts +4 -0
- package/dist/control.d.ts +4 -0
- package/dist/control.mjs +140 -0
- package/dist/control.mjs.map +1 -0
- package/dist/custom-cesium-plugin.cjs +507 -0
- package/dist/custom-cesium-plugin.cjs.map +1 -0
- package/dist/custom-cesium-plugin.d.mts +4 -0
- package/dist/custom-cesium-plugin.d.ts +4 -0
- package/dist/custom-cesium-plugin.mjs +507 -0
- package/dist/custom-cesium-plugin.mjs.map +1 -0
- package/dist/default-static.cjs +3 -0
- package/dist/default-static.cjs.map +1 -0
- package/dist/default-static.d.mts +37 -0
- package/dist/default-static.d.ts +37 -0
- package/dist/default-static.mjs +3 -0
- package/dist/default-static.mjs.map +1 -0
- package/dist/draw.cjs +140 -0
- package/dist/draw.cjs.map +1 -0
- package/dist/draw.d.mts +6 -0
- package/dist/draw.d.ts +6 -0
- package/dist/draw.mjs +140 -0
- package/dist/draw.mjs.map +1 -0
- package/dist/graphics.cjs +140 -0
- package/dist/graphics.cjs.map +1 -0
- package/dist/graphics.d.mts +19 -0
- package/dist/graphics.d.ts +19 -0
- package/dist/graphics.mjs +140 -0
- package/dist/graphics.mjs.map +1 -0
- package/dist/index.cjs +1112 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.mts +674 -0
- package/dist/index.d.ts +674 -0
- package/dist/index.mjs +1112 -0
- package/dist/index.mjs.map +1 -0
- package/dist/material.cjs +391 -0
- package/dist/material.cjs.map +1 -0
- package/dist/material.d.mts +4 -0
- package/dist/material.d.ts +4 -0
- package/dist/material.mjs +391 -0
- package/dist/material.mjs.map +1 -0
- package/dist/pass-effect.cjs +416 -0
- package/dist/pass-effect.cjs.map +1 -0
- package/dist/pass-effect.d.mts +4 -0
- package/dist/pass-effect.d.ts +4 -0
- package/dist/pass-effect.mjs +416 -0
- package/dist/pass-effect.mjs.map +1 -0
- package/dist/plugin.cjs +141 -0
- package/dist/plugin.cjs.map +1 -0
- package/dist/plugin.d.mts +4 -0
- package/dist/plugin.d.ts +4 -0
- package/dist/plugin.mjs +141 -0
- package/dist/plugin.mjs.map +1 -0
- package/dist/primitive.cjs +370 -0
- package/dist/primitive.cjs.map +1 -0
- package/dist/primitive.d.mts +4 -0
- package/dist/primitive.d.ts +4 -0
- package/dist/primitive.mjs +370 -0
- package/dist/primitive.mjs.map +1 -0
- package/dist/three.cjs +140 -0
- package/dist/three.cjs.map +1 -0
- package/dist/three.d.mts +4 -0
- package/dist/three.d.ts +4 -0
- package/dist/three.mjs +140 -0
- package/dist/three.mjs.map +1 -0
- package/package.json +290 -46
- package/dist/index.js +0 -1
- package/dist/index.min.js +0 -1
- package/dist/index.umd.js +0 -1
- package/index.js +0 -37
|
@@ -0,0 +1,1565 @@
|
|
|
1
|
+
import { C as CesiumGlobal, S as StaticResourceConf, W as WGS84Type } from './Base-DH8H9suE.mjs';
|
|
2
|
+
|
|
3
|
+
/** 模块内部持有的 cesium 全局对象 */
|
|
4
|
+
/** 静态资源(defaultStatic)配置 */
|
|
5
|
+
/** Graphics 实例类型 */
|
|
6
|
+
/** Graphics 构造函数类型 */
|
|
7
|
+
/** 可作为材质的取值:颜色、图片地址或 Cesium 材质属性 */
|
|
8
|
+
type MaterialInput = any | string | any;
|
|
9
|
+
/** getPointGraphics 的参数 */
|
|
10
|
+
interface PointGraphicsOptions {
|
|
11
|
+
/** 点颜色 */
|
|
12
|
+
color?: any | string;
|
|
13
|
+
/** 点大小 */
|
|
14
|
+
pixelSize?: number;
|
|
15
|
+
/** 边线颜色 */
|
|
16
|
+
outlineColor?: any | string;
|
|
17
|
+
/** 边线宽 */
|
|
18
|
+
outlineWidth?: number;
|
|
19
|
+
}
|
|
20
|
+
/** getLabelGraphics 的参数 */
|
|
21
|
+
interface LabelGraphicsOptions {
|
|
22
|
+
/** 标签文字 */
|
|
23
|
+
l_text?: string;
|
|
24
|
+
/** 字体 */
|
|
25
|
+
l_font?: string;
|
|
26
|
+
/** 颜色 */
|
|
27
|
+
l_fillColor?: any | string;
|
|
28
|
+
/** 风格 */
|
|
29
|
+
l_style?: string;
|
|
30
|
+
/** 外边线颜色 */
|
|
31
|
+
l_outlineColor?: any | string;
|
|
32
|
+
/** 外边线宽度 */
|
|
33
|
+
l_outlineWidth?: number;
|
|
34
|
+
/** 是否显示背景颜色 */
|
|
35
|
+
l_showBackground?: boolean;
|
|
36
|
+
/** 背景颜色 */
|
|
37
|
+
l_backgroundColor?: any | string;
|
|
38
|
+
/** 垂直方向 */
|
|
39
|
+
l_verticalOrigin?: any;
|
|
40
|
+
/** 偏移 */
|
|
41
|
+
l_pixelOffset?: any;
|
|
42
|
+
/** 高程参照设置 */
|
|
43
|
+
l_heightReference?: any;
|
|
44
|
+
}
|
|
45
|
+
/** getBillboardGraphics 的参数 */
|
|
46
|
+
interface BillboardGraphicsOptions {
|
|
47
|
+
/** 背景图地址 */
|
|
48
|
+
b_img?: string;
|
|
49
|
+
/** 宽度 */
|
|
50
|
+
b_width?: number;
|
|
51
|
+
/** 高度 */
|
|
52
|
+
b_height?: number;
|
|
53
|
+
/** 贴地 */
|
|
54
|
+
b_clampToGround?: boolean;
|
|
55
|
+
/** 缩放比例 */
|
|
56
|
+
b_scale?: number;
|
|
57
|
+
/** 缩放远近距离 */
|
|
58
|
+
b_scaleByDistance?: any;
|
|
59
|
+
/** 偏移 */
|
|
60
|
+
b_pixelOffset?: any | number[];
|
|
61
|
+
/** 视角偏移设置 */
|
|
62
|
+
b_eyeOffset?: any;
|
|
63
|
+
/** 高程参照设置 */
|
|
64
|
+
b_heightReference?: any;
|
|
65
|
+
}
|
|
66
|
+
/** getPathGraphics 的参数 */
|
|
67
|
+
interface PathGraphicsOptions {
|
|
68
|
+
/** 采样频率 */
|
|
69
|
+
resolution?: number;
|
|
70
|
+
/** 发光强度 */
|
|
71
|
+
glowPower?: number;
|
|
72
|
+
/** 颜色 */
|
|
73
|
+
color?: any | string;
|
|
74
|
+
/** 宽度 */
|
|
75
|
+
width?: number;
|
|
76
|
+
}
|
|
77
|
+
/** getEllipseGraphics 的参数 */
|
|
78
|
+
interface EllipseGraphicsOptions {
|
|
79
|
+
/** 长半轴 */
|
|
80
|
+
e_semiMajorAxis?: number;
|
|
81
|
+
/** 短半轴 */
|
|
82
|
+
e_semiMinorAxis?: number;
|
|
83
|
+
/** 材质 */
|
|
84
|
+
e_metarial?: Record<string, unknown>;
|
|
85
|
+
/** 是否显示外边线 */
|
|
86
|
+
e_outline?: boolean;
|
|
87
|
+
}
|
|
88
|
+
/** getEllipsoidGraphics 的参数 */
|
|
89
|
+
interface EllipsoidGraphicsOptions {
|
|
90
|
+
/** 半径 */
|
|
91
|
+
radii?: number;
|
|
92
|
+
/** 内球半径 */
|
|
93
|
+
innerRadii?: number;
|
|
94
|
+
/** 椭圆最大角度 */
|
|
95
|
+
maximumCone?: number;
|
|
96
|
+
/** 垂直分段数 */
|
|
97
|
+
stackPartitions?: number;
|
|
98
|
+
/** 平行分段数 */
|
|
99
|
+
slicePartitions?: number;
|
|
100
|
+
/** 外边线宽度 */
|
|
101
|
+
outlineWidth?: number;
|
|
102
|
+
/** 外边线颜色 */
|
|
103
|
+
outlineColor?: any | string;
|
|
104
|
+
/** 是否显示外边线 */
|
|
105
|
+
outline?: boolean;
|
|
106
|
+
/** 是否填充 */
|
|
107
|
+
fill?: boolean;
|
|
108
|
+
/** 材质 */
|
|
109
|
+
material?: MaterialInput;
|
|
110
|
+
}
|
|
111
|
+
/** getPlaneGraphics 的参数 */
|
|
112
|
+
interface PlaneGraphicsOptions {
|
|
113
|
+
/** 面板垂直方向 */
|
|
114
|
+
plane?: any;
|
|
115
|
+
/** 面板长宽高 */
|
|
116
|
+
dimensions?: any | any | number[];
|
|
117
|
+
/** 材质 */
|
|
118
|
+
material?: MaterialInput;
|
|
119
|
+
}
|
|
120
|
+
/** getCylinderGraphics 的参数 */
|
|
121
|
+
interface CylinderGraphicsOptions {
|
|
122
|
+
/** 长度 */
|
|
123
|
+
length?: number;
|
|
124
|
+
/** 顶部半径 */
|
|
125
|
+
topRadius?: number;
|
|
126
|
+
/** 底部半径 */
|
|
127
|
+
bottomRadius?: number;
|
|
128
|
+
/** 材质 */
|
|
129
|
+
material?: MaterialInput;
|
|
130
|
+
/** 垂直分段数量 */
|
|
131
|
+
slices?: number;
|
|
132
|
+
}
|
|
133
|
+
/** createPointsGraphics 的参数 */
|
|
134
|
+
interface PointsGraphicsOptions {
|
|
135
|
+
/** 坐标数组 */
|
|
136
|
+
positions?: any[];
|
|
137
|
+
/** 图形名称 */
|
|
138
|
+
name?: string;
|
|
139
|
+
/** 原始id */
|
|
140
|
+
oid?: string;
|
|
141
|
+
/** 材质 */
|
|
142
|
+
material?: MaterialInput;
|
|
143
|
+
/** 标识是point图形 */
|
|
144
|
+
point?: boolean;
|
|
145
|
+
/** 绘制billboard图形的参数 */
|
|
146
|
+
billboard?: Record<string, unknown>;
|
|
147
|
+
/** 绘制label图形的参数 */
|
|
148
|
+
label?: Record<string, unknown>;
|
|
149
|
+
}
|
|
150
|
+
/** getLineGraphics 的参数 */
|
|
151
|
+
interface LineGraphicsOptions {
|
|
152
|
+
/** 绘制线图形的坐标数组 */
|
|
153
|
+
positions?: any[];
|
|
154
|
+
/** 配置线段材质 */
|
|
155
|
+
material?: MaterialInput;
|
|
156
|
+
/** 线宽 */
|
|
157
|
+
width?: number;
|
|
158
|
+
/** 是否贴地 */
|
|
159
|
+
clampToGround?: boolean;
|
|
160
|
+
}
|
|
161
|
+
/** createLineGraphics 的参数 */
|
|
162
|
+
interface LineGraphicsOptions {
|
|
163
|
+
/** 坐标数组 */
|
|
164
|
+
positions?: any[];
|
|
165
|
+
/** 图形名称 */
|
|
166
|
+
name?: string;
|
|
167
|
+
/** 原始id */
|
|
168
|
+
oid?: string;
|
|
169
|
+
/** 配置线段材质 */
|
|
170
|
+
material?: MaterialInput;
|
|
171
|
+
/** 线宽 */
|
|
172
|
+
width?: number;
|
|
173
|
+
/** 是否贴地 */
|
|
174
|
+
clampToGround?: boolean;
|
|
175
|
+
/** 绘制label图形的参数 */
|
|
176
|
+
label?: Record<string, unknown>;
|
|
177
|
+
}
|
|
178
|
+
/** getPolygonGraphics 的参数 */
|
|
179
|
+
interface PolygonGraphicsOptions {
|
|
180
|
+
/** 绘制线图形的坐标数组 */
|
|
181
|
+
positions?: any[];
|
|
182
|
+
/** 配置线段材质 */
|
|
183
|
+
material?: MaterialInput;
|
|
184
|
+
/** 是否贴地 */
|
|
185
|
+
clampToGround?: boolean;
|
|
186
|
+
}
|
|
187
|
+
/** createPolygonGraphics 的参数 */
|
|
188
|
+
interface PolygonGraphicsOptions {
|
|
189
|
+
/** 坐标数组 */
|
|
190
|
+
positions?: any[];
|
|
191
|
+
/** 配置线段材质 */
|
|
192
|
+
material?: MaterialInput;
|
|
193
|
+
/** 是否贴地 */
|
|
194
|
+
clampToGround?: boolean;
|
|
195
|
+
/** 是否贴s3m模型 */
|
|
196
|
+
clampToS3M?: boolean;
|
|
197
|
+
}
|
|
198
|
+
/** getBoxGraphics 的参数 */
|
|
199
|
+
interface BoxGraphicsOptions {
|
|
200
|
+
/** 是否显示 */
|
|
201
|
+
show?: boolean;
|
|
202
|
+
/** 盒子长宽高 */
|
|
203
|
+
dimensions?: any | any | number[];
|
|
204
|
+
/** 显示条件 */
|
|
205
|
+
distanceDisplayCondition?: any;
|
|
206
|
+
/** 外边线颜色 */
|
|
207
|
+
outlineColor?: any | string;
|
|
208
|
+
/** 是否显示外边线 */
|
|
209
|
+
outline?: boolean;
|
|
210
|
+
/** 是否填充 */
|
|
211
|
+
fill?: boolean;
|
|
212
|
+
/** 材质 */
|
|
213
|
+
material?: MaterialInput;
|
|
214
|
+
}
|
|
215
|
+
/** createBoxGraphics 的参数 */
|
|
216
|
+
interface BoxGraphicsOptions {
|
|
217
|
+
/** Cartesian3坐标 */
|
|
218
|
+
position?: any;
|
|
219
|
+
/** 是否显示 */
|
|
220
|
+
show?: boolean;
|
|
221
|
+
/** 名称 */
|
|
222
|
+
name?: string;
|
|
223
|
+
/** 盒子图形参数(不传则使用当前 options) */
|
|
224
|
+
box?: BoxGraphicsOptions;
|
|
225
|
+
/** 盒子长宽高 */
|
|
226
|
+
dimensions?: any | any | number[];
|
|
227
|
+
/** 显示条件 */
|
|
228
|
+
distanceDisplayCondition?: any;
|
|
229
|
+
/** 外边线颜色 */
|
|
230
|
+
outlineColor?: any | string;
|
|
231
|
+
/** 是否显示外边线 */
|
|
232
|
+
outline?: boolean;
|
|
233
|
+
/** 是否填充 */
|
|
234
|
+
fill?: boolean;
|
|
235
|
+
/** 材质 */
|
|
236
|
+
material?: MaterialInput;
|
|
237
|
+
}
|
|
238
|
+
/** getModelGraphics 的参数 */
|
|
239
|
+
interface ModelGraphicsOptions {
|
|
240
|
+
/** 模型url */
|
|
241
|
+
m_url?: string;
|
|
242
|
+
/** 模型url */
|
|
243
|
+
url?: string;
|
|
244
|
+
/** 缩放比例 */
|
|
245
|
+
m_scale?: number;
|
|
246
|
+
/** 缩放比例 */
|
|
247
|
+
scale?: number;
|
|
248
|
+
}
|
|
249
|
+
/** createModelGraphics 的参数 */
|
|
250
|
+
interface ModelGraphicsOptions {
|
|
251
|
+
/** Cartesian3坐标 */
|
|
252
|
+
position?: any;
|
|
253
|
+
/** 模型url */
|
|
254
|
+
m_url?: string;
|
|
255
|
+
/** 模型url */
|
|
256
|
+
url?: string;
|
|
257
|
+
/** 缩放比例 */
|
|
258
|
+
m_scale?: number;
|
|
259
|
+
/** 缩放比例 */
|
|
260
|
+
scale?: number;
|
|
261
|
+
}
|
|
262
|
+
/** craeteCorridorGraphics 的参数 */
|
|
263
|
+
interface CorridorGraphicsOptions {
|
|
264
|
+
/** 坐标数组 */
|
|
265
|
+
positions?: any[];
|
|
266
|
+
/** 高度 */
|
|
267
|
+
height?: number;
|
|
268
|
+
/** 宽度 */
|
|
269
|
+
width?: number;
|
|
270
|
+
/** 材质 */
|
|
271
|
+
material?: MaterialInput;
|
|
272
|
+
/** 是否显示外边线 */
|
|
273
|
+
outline?: boolean;
|
|
274
|
+
/** 拉伸高度 */
|
|
275
|
+
extrudedHeight?: number;
|
|
276
|
+
/** 转角类型 */
|
|
277
|
+
cornerType?: any;
|
|
278
|
+
}
|
|
279
|
+
/** craeteDynamicPolyLineGraphics 的参数 */
|
|
280
|
+
interface DynamicPolyLineGraphicsOptions {
|
|
281
|
+
/** 坐标数组 */
|
|
282
|
+
positions?: any[];
|
|
283
|
+
/** 材质 */
|
|
284
|
+
material?: MaterialInput;
|
|
285
|
+
/** 宽度 */
|
|
286
|
+
width?: number;
|
|
287
|
+
/** 是否贴地 */
|
|
288
|
+
clampToGround?: boolean;
|
|
289
|
+
}
|
|
290
|
+
/** craeteDynamicCylinderGraphics 的参数 */
|
|
291
|
+
interface DynamicCylinderGraphicsOptions {
|
|
292
|
+
/** 椎体对象(传给 getCylinderGraphics 的参数) */
|
|
293
|
+
cylinder?: CylinderGraphicsOptions;
|
|
294
|
+
/** entity实体 */
|
|
295
|
+
entity?: any;
|
|
296
|
+
/** 宽度 */
|
|
297
|
+
width?: number;
|
|
298
|
+
/** 是否贴地 */
|
|
299
|
+
clampToGround?: boolean;
|
|
300
|
+
}
|
|
301
|
+
/** createFadeCylinderGraphics 的参数 */
|
|
302
|
+
interface FadeCylinderGraphicsOptions {
|
|
303
|
+
/** Cartesian3坐标 */
|
|
304
|
+
position?: any;
|
|
305
|
+
/** 颜色 */
|
|
306
|
+
color?: any | string;
|
|
307
|
+
/** 持续时长 */
|
|
308
|
+
duration?: number;
|
|
309
|
+
/** 长度 */
|
|
310
|
+
length?: number;
|
|
311
|
+
/** 顶部半径 */
|
|
312
|
+
topRadius?: number;
|
|
313
|
+
/** 底部半径 */
|
|
314
|
+
bottomRadius?: number;
|
|
315
|
+
/** 垂直分段数量 */
|
|
316
|
+
slices?: number;
|
|
317
|
+
/** 材质(内部按 color/duration 生成渐变材质) */
|
|
318
|
+
material?: MaterialInput;
|
|
319
|
+
}
|
|
320
|
+
/** craeteRotateCylinderGraphics 的参数 */
|
|
321
|
+
interface RotateCylinderGraphicsOptions {
|
|
322
|
+
/** Cartesian3坐标 */
|
|
323
|
+
position?: any;
|
|
324
|
+
/** 长度 */
|
|
325
|
+
length?: number;
|
|
326
|
+
/** 顶部半径 */
|
|
327
|
+
topRadius?: number;
|
|
328
|
+
/** 底部半径 */
|
|
329
|
+
bottomRadius?: number;
|
|
330
|
+
/** 垂直分段数量 */
|
|
331
|
+
slices?: number;
|
|
332
|
+
/** 材质图片 */
|
|
333
|
+
img?: string;
|
|
334
|
+
/** 材质(与图片二选一) */
|
|
335
|
+
material?: MaterialInput;
|
|
336
|
+
}
|
|
337
|
+
/** craeteDynamicBlinkCircleGraphics 的参数 */
|
|
338
|
+
interface DynamicBlinkCircleGraphicsOptions {
|
|
339
|
+
/** Cartesian3坐标 */
|
|
340
|
+
position?: any;
|
|
341
|
+
/** 频率 */
|
|
342
|
+
alp?: number;
|
|
343
|
+
/** 显示雾气效果 */
|
|
344
|
+
flog?: boolean;
|
|
345
|
+
/** 高度 */
|
|
346
|
+
height?: number;
|
|
347
|
+
/** 短半轴 */
|
|
348
|
+
semiMinorAxis?: number;
|
|
349
|
+
/** 长半轴 */
|
|
350
|
+
semiMajorAxis?: number;
|
|
351
|
+
}
|
|
352
|
+
/** craeteDynamicCricleGraphics 的参数 */
|
|
353
|
+
interface DynamicCricleGraphicsOptions {
|
|
354
|
+
/** 中心坐标数组 */
|
|
355
|
+
center?: any | number[];
|
|
356
|
+
/** 半径 */
|
|
357
|
+
radius?: number;
|
|
358
|
+
/** 旋转频率 */
|
|
359
|
+
rotateAmount?: number;
|
|
360
|
+
/** 高度 */
|
|
361
|
+
height?: number;
|
|
362
|
+
/** 外圆缩放比例 */
|
|
363
|
+
scale?: number;
|
|
364
|
+
/** 内圆缩放比例 */
|
|
365
|
+
scale2?: number;
|
|
366
|
+
/** 材质图片 */
|
|
367
|
+
imge?: string;
|
|
368
|
+
/** 材质(与图片二选一) */
|
|
369
|
+
material?: MaterialInput;
|
|
370
|
+
}
|
|
371
|
+
/** craeteDynamicShadeWallGraphics 的参数 */
|
|
372
|
+
interface DynamicShadeWallGraphicsOptions {
|
|
373
|
+
/** 坐标数组 */
|
|
374
|
+
positions?: any[];
|
|
375
|
+
/** 透明比例 0~1 */
|
|
376
|
+
alp?: number;
|
|
377
|
+
/** 渐变步长 */
|
|
378
|
+
num?: number;
|
|
379
|
+
/** 速度 0~1 */
|
|
380
|
+
speed?: number;
|
|
381
|
+
/** 颜色 */
|
|
382
|
+
color?: any | string;
|
|
383
|
+
/** 材质图片 */
|
|
384
|
+
img?: string;
|
|
385
|
+
}
|
|
386
|
+
/** createCustomDefBillboardGraphics 的参数 */
|
|
387
|
+
interface CustomDefBillboardGraphicsOptions {
|
|
388
|
+
/** 坐标数组 */
|
|
389
|
+
position?: any;
|
|
390
|
+
/** 高度 */
|
|
391
|
+
height?: number;
|
|
392
|
+
/** 宽度 */
|
|
393
|
+
width?: number;
|
|
394
|
+
/** 文字 */
|
|
395
|
+
text?: string;
|
|
396
|
+
/** 气泡窗图片 */
|
|
397
|
+
image?: string | HTMLImageElement;
|
|
398
|
+
/** 偏移 */
|
|
399
|
+
b_pixelOffset?: any | number[];
|
|
400
|
+
/** 缩放比例 */
|
|
401
|
+
b_scale?: number;
|
|
402
|
+
/** 回调返回entity */
|
|
403
|
+
callback?: (...args: unknown[]) => unknown;
|
|
404
|
+
}
|
|
405
|
+
/** craeteRotatePlaneGraphics 的参数 */
|
|
406
|
+
interface RotatePlaneGraphicsOptions {
|
|
407
|
+
/** 坐标数组 */
|
|
408
|
+
positions?: any[];
|
|
409
|
+
/** 中心点(经纬度数组) */
|
|
410
|
+
center?: number[];
|
|
411
|
+
/** 长宽高 */
|
|
412
|
+
dimensions?: any | any | number[];
|
|
413
|
+
/** 图片 */
|
|
414
|
+
image?: string;
|
|
415
|
+
}
|
|
416
|
+
/** createVideoPlaneGraphics 的参数 */
|
|
417
|
+
interface VideoPlaneGraphicsOptions {
|
|
418
|
+
/** Cartesian3坐标 */
|
|
419
|
+
position?: any;
|
|
420
|
+
/** 长宽高 */
|
|
421
|
+
dimensions?: any | any | number[];
|
|
422
|
+
/** video绑定dom */
|
|
423
|
+
videoElement?: HTMLVideoElement;
|
|
424
|
+
/** 垂直方向 */
|
|
425
|
+
normal?: any;
|
|
426
|
+
}
|
|
427
|
+
/** createGifBillboardGraphics 的参数 */
|
|
428
|
+
interface GifBillboardGraphicsOptions {
|
|
429
|
+
/** Cartesian3坐标 */
|
|
430
|
+
position?: any;
|
|
431
|
+
/** 长宽高 */
|
|
432
|
+
dimensions?: any | any | number[];
|
|
433
|
+
/** 图片 */
|
|
434
|
+
url?: string;
|
|
435
|
+
/** 垂直方向 */
|
|
436
|
+
normal?: any;
|
|
437
|
+
}
|
|
438
|
+
/** 可携带朝向的 WGS84 坐标(旋转动画中会被逐帧修改) */
|
|
439
|
+
interface RotatePosition {
|
|
440
|
+
/** 经度 */
|
|
441
|
+
lng: number;
|
|
442
|
+
/** 纬度 */
|
|
443
|
+
lat: number;
|
|
444
|
+
/** 高度 */
|
|
445
|
+
alt?: number;
|
|
446
|
+
/** 朝向(角度) */
|
|
447
|
+
heading?: number;
|
|
448
|
+
/** 倾斜(角度) */
|
|
449
|
+
pitch?: number;
|
|
450
|
+
/** 翻滚(角度) */
|
|
451
|
+
roll?: number;
|
|
452
|
+
}
|
|
453
|
+
/** setGraphicsRotate 的参数 */
|
|
454
|
+
interface SetGraphicsRotateOptions {
|
|
455
|
+
/** wgs84坐标(含朝向) */
|
|
456
|
+
position?: RotatePosition;
|
|
457
|
+
/** 实体对象 */
|
|
458
|
+
entity?: any;
|
|
459
|
+
/** 旋转比例 */
|
|
460
|
+
rotateAmount?: number;
|
|
461
|
+
}
|
|
462
|
+
/** setGraphicsFloat 的参数 */
|
|
463
|
+
interface SetGraphicsFloatOptions {
|
|
464
|
+
/** 坐标数组 */
|
|
465
|
+
position?: any;
|
|
466
|
+
/** 实体对象 */
|
|
467
|
+
entity?: any;
|
|
468
|
+
/** 最大高度 */
|
|
469
|
+
maxHeiht?: number;
|
|
470
|
+
/** 最小高度 */
|
|
471
|
+
minHeiht?: number;
|
|
472
|
+
/** 原始位置(数组表示多点整体浮动) */
|
|
473
|
+
cartesians?: any[];
|
|
474
|
+
/** 速度 */
|
|
475
|
+
speed?: number;
|
|
476
|
+
}
|
|
477
|
+
/** createCanvasGraphics 的参数 */
|
|
478
|
+
interface CanvasGraphicsOptions {
|
|
479
|
+
/** 坐标数组 */
|
|
480
|
+
positions?: any[];
|
|
481
|
+
/** 图片 */
|
|
482
|
+
img?: string;
|
|
483
|
+
/** 宽度 */
|
|
484
|
+
cwidth?: number;
|
|
485
|
+
/** 高度 */
|
|
486
|
+
cheight?: number;
|
|
487
|
+
/** 回调 */
|
|
488
|
+
callback?: (...args: unknown[]) => unknown;
|
|
489
|
+
}
|
|
490
|
+
declare const Graphics: {
|
|
491
|
+
new (viewer?: any, cesiumGlobal?: CesiumGlobal, defaultStatic?: StaticResourceConf): {
|
|
492
|
+
_graphicsLayer: any;
|
|
493
|
+
_viewer: any;
|
|
494
|
+
_drawLayer: any;
|
|
495
|
+
/** 释放当前模块持有的监听器 / DataSource(幂等) */
|
|
496
|
+
destroy: () => void;
|
|
497
|
+
getDfSt: (attrArr: string[]) => string | undefined;
|
|
498
|
+
transformCartesianToWGS84: (cartesian: any) => WGS84Type | undefined;
|
|
499
|
+
transformWGS84ToCartesian: (position: WGS84Type, alt?: number) => any | undefined;
|
|
500
|
+
transformCartesianArrayToWGS84Array: (cartesianArr: any[]) => (WGS84Type | undefined)[] | undefined;
|
|
501
|
+
transformWGS84ArrayToCartesianArray: (WSG84Arr: WGS84Type[], alt: number) => any[] | undefined;
|
|
502
|
+
/**
|
|
503
|
+
*获取点图形
|
|
504
|
+
* @function
|
|
505
|
+
* @param {object} options
|
|
506
|
+
* @param {object} options.color - 点颜色
|
|
507
|
+
* @param {number} options.pixelSize - 点大小
|
|
508
|
+
* @param {number} options.outlineColor - 边线颜色
|
|
509
|
+
* @param {number} options.outlineWidth - 边线宽
|
|
510
|
+
* @example
|
|
511
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
512
|
+
* const graphicObj = new Graphics({
|
|
513
|
+
* cesiumGlobal: Cesium,
|
|
514
|
+
* containerId: 'cesiumContainer'
|
|
515
|
+
* })
|
|
516
|
+
* graphicObj.graphics.getPointGraphics({
|
|
517
|
+
* color:Cesium.Color.GREEN,
|
|
518
|
+
* pixelSize:5,
|
|
519
|
+
* outlineColor:Cesium.Color.WHITE,
|
|
520
|
+
* outlineWidth:1
|
|
521
|
+
* })
|
|
522
|
+
* @returns {PointGraphics} 返回PointGraphics实例
|
|
523
|
+
*/
|
|
524
|
+
getPointGraphics(options?: PointGraphicsOptions): any;
|
|
525
|
+
/**
|
|
526
|
+
*获取线图形
|
|
527
|
+
* @function
|
|
528
|
+
* @param {object} options
|
|
529
|
+
* @param {Array<Cartesian3>} options.positions - 绘制线图形的坐标数组
|
|
530
|
+
* @param {object} options.material - 配置线段材质
|
|
531
|
+
* @param {number} options.width - 线宽
|
|
532
|
+
* @param {boolean} options.clampToGround - 是否贴地
|
|
533
|
+
* @example
|
|
534
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
535
|
+
* const graphicObj = new Graphics({
|
|
536
|
+
* cesiumGlobal: Cesium,
|
|
537
|
+
* containerId: 'cesiumContainer'
|
|
538
|
+
* })
|
|
539
|
+
* graphicObj.graphics.getLineGraphics({
|
|
540
|
+
* positions:Cesium.Cartesian3.fromDegreesArray([
|
|
541
|
+
104.09816110606057,
|
|
542
|
+
30.659821965447698,
|
|
543
|
+
104.1120972824757,
|
|
544
|
+
30.65330300319938,
|
|
545
|
+
104.10758419863926,
|
|
546
|
+
30.64592470850288,
|
|
547
|
+
104.09351691196979,
|
|
548
|
+
30.652434826507452,
|
|
549
|
+
104.09816110606057,
|
|
550
|
+
30.659821965447698
|
|
551
|
+
]),
|
|
552
|
+
* material:Cesium.Color.RED.withAlpha(0.2),
|
|
553
|
+
* clampToGround:false,
|
|
554
|
+
* width:1
|
|
555
|
+
* })
|
|
556
|
+
* @returns {PolylineGraphics} 返回PolylineGraphics实例
|
|
557
|
+
*/
|
|
558
|
+
getLineGraphics(options?: LineGraphicsOptions): any;
|
|
559
|
+
/**
|
|
560
|
+
*获取面图形
|
|
561
|
+
* @function
|
|
562
|
+
* @param {object} options
|
|
563
|
+
* @param {Array<Cartesian3>} options.positions - 绘制线图形的坐标数组
|
|
564
|
+
* @param {object} options.material - 配置线段材质
|
|
565
|
+
* @param {boolean} options.clampToGround - 是否贴地
|
|
566
|
+
* @example
|
|
567
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
568
|
+
* const graphicObj = new Graphics({
|
|
569
|
+
* cesiumGlobal: Cesium,
|
|
570
|
+
* containerId: 'cesiumContainer'
|
|
571
|
+
* })
|
|
572
|
+
* graphicObj.graphics.getPolygonGraphics({
|
|
573
|
+
* positions:Cesium.Cartesian3.fromDegreesArray([
|
|
574
|
+
104.09816110606057,
|
|
575
|
+
30.659821965447698,
|
|
576
|
+
104.1120972824757,
|
|
577
|
+
30.65330300319938,
|
|
578
|
+
104.10758419863926,
|
|
579
|
+
30.64592470850288,
|
|
580
|
+
104.09351691196979,
|
|
581
|
+
30.652434826507452,
|
|
582
|
+
104.09816110606057,
|
|
583
|
+
30.659821965447698
|
|
584
|
+
]),
|
|
585
|
+
* material:Cesium.Color.RED.withAlpha(0.2),
|
|
586
|
+
* clampToGround:false
|
|
587
|
+
* })
|
|
588
|
+
* @returns {PolygonGraphics} 返回PolygonGraphics实例
|
|
589
|
+
*/
|
|
590
|
+
getPolygonGraphics(options?: PolygonGraphicsOptions): any;
|
|
591
|
+
/**
|
|
592
|
+
*获取标签图形
|
|
593
|
+
* @function
|
|
594
|
+
* @param {object} options
|
|
595
|
+
* @param {string} options.l_text - 标签文字
|
|
596
|
+
* @param {string} options.l_font - 字体
|
|
597
|
+
* @param {string} options.l_fillColor - 颜色
|
|
598
|
+
* @param {string} options.l_style - 风格
|
|
599
|
+
* @param {number} options.l_outlineColor - 外边线颜色
|
|
600
|
+
* @param {number} options.l_outlineWidth - 外边线宽度
|
|
601
|
+
* @param {boolean} options.l_showBackground - 是否显示背景颜色
|
|
602
|
+
* @param {object} options.l_backgroundColor - 背景颜色
|
|
603
|
+
* @param {string} options.l_verticalOrigin - 垂直方向
|
|
604
|
+
* @param {Cesium.Cartesian2} options.l_pixelOffset - 偏移
|
|
605
|
+
* @param {Cesium.HeightReference} options.l_heightReference - 高程参照设置
|
|
606
|
+
* @example
|
|
607
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
608
|
+
* const graphicObj = new Graphics({
|
|
609
|
+
* cesiumGlobal: Cesium,
|
|
610
|
+
* containerId: 'cesiumContainer'
|
|
611
|
+
* })
|
|
612
|
+
* graphicObj.graphics.getLabelGraphics({
|
|
613
|
+
l_text:"你好",
|
|
614
|
+
l_font : "14px sans-serif",
|
|
615
|
+
l_fillColor : Cesium.Color.GOLD,
|
|
616
|
+
l_style : Cesium.LabelStyle.FILL_AND_OUTLINE,
|
|
617
|
+
l_outlineWidth : 2,
|
|
618
|
+
l_showBackground: false,
|
|
619
|
+
l_backgroundColor : new Cesium.Color(0.165, 0.165, 0.165, 0.8),
|
|
620
|
+
l_verticalOrigin : Cesium.VerticalOrigin.BOTTOM,
|
|
621
|
+
l_pixelOffset: new Cesium.Cartesian2(0, -30),
|
|
622
|
+
l_heightReference: Cesium.HeightReference.RELATIVE_TO_TERRAIN
|
|
623
|
+
* })
|
|
624
|
+
* @returns {LabelGraphics} 返回LabelGraphics实例
|
|
625
|
+
*/
|
|
626
|
+
getLabelGraphics(options?: LabelGraphicsOptions): any;
|
|
627
|
+
/**
|
|
628
|
+
*获取广告牌图形
|
|
629
|
+
* @function
|
|
630
|
+
* @param {object} options
|
|
631
|
+
* @param {string} options.b_img - 背景图地址
|
|
632
|
+
* @param {number} options.b_width - 宽度
|
|
633
|
+
* @param {number} options.b_height - 高度
|
|
634
|
+
* @param {boolean} options.b_clampToGround - 贴地
|
|
635
|
+
* @param {number} options.b_scale - 缩放比例
|
|
636
|
+
* @param {string} options.b_scaleByDistance - 缩放远近距离
|
|
637
|
+
* @param {Cesium.Cartesian2} options.b_pixelOffset - 偏移
|
|
638
|
+
* @param {Cesium.Cartesian2} options.b_eyeOffset - 视角偏移设置
|
|
639
|
+
* @param {Cesium.HeightReference} options.b_heightReference - 高程参照设置
|
|
640
|
+
* @example
|
|
641
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
642
|
+
* const graphicObj = new Graphics({
|
|
643
|
+
* cesiumGlobal: Cesium,
|
|
644
|
+
* containerId: 'cesiumContainer'
|
|
645
|
+
* })
|
|
646
|
+
* graphicObj.graphics.getBillboardGraphics({
|
|
647
|
+
b_img: "images/bill.png",
|
|
648
|
+
b_width: 35,
|
|
649
|
+
b_height : 35,
|
|
650
|
+
b_clampToGround : true,
|
|
651
|
+
b_scale : 1,
|
|
652
|
+
b_pixelOffset :new Cesium.Cartesian2(0, -20),
|
|
653
|
+
b_scaleByDistance : new Cesium.NearFarScalar(1.5e2, 0.7, 1.5e7, 0.5),
|
|
654
|
+
b_eyeOffset: new Cesium.Cartesian2(0, -20),
|
|
655
|
+
b_heightReference: Cesium.HeightReference.RELATIVE_TO_TERRAIN
|
|
656
|
+
* })
|
|
657
|
+
* @returns {BillboardGraphics} 返回BillboardGraphics实例
|
|
658
|
+
*/
|
|
659
|
+
getBillboardGraphics(options?: BillboardGraphicsOptions): any;
|
|
660
|
+
/**
|
|
661
|
+
* 获取路径
|
|
662
|
+
* @function
|
|
663
|
+
* @param {object} options
|
|
664
|
+
* @param {number} options.resolution - 采样频率
|
|
665
|
+
* @param {number} options.glowPower - 发光强度
|
|
666
|
+
* @param {object} options.color - 颜色
|
|
667
|
+
* @param {number} options.width - 宽度
|
|
668
|
+
* @example
|
|
669
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
670
|
+
* const graphicObj = new Graphics({
|
|
671
|
+
* cesiumGlobal: Cesium,
|
|
672
|
+
* containerId: 'cesiumContainer'
|
|
673
|
+
* })
|
|
674
|
+
* graphicObj.graphics.getPathGraphics({
|
|
675
|
+
resolution:1,
|
|
676
|
+
glowPower:0.1,
|
|
677
|
+
color:Cesium.Color.YELLOW,
|
|
678
|
+
width:24
|
|
679
|
+
* })
|
|
680
|
+
* @returns {PathGraphics} 返回PathGraphics实例
|
|
681
|
+
*/
|
|
682
|
+
getPathGraphics(options?: PathGraphicsOptions): any;
|
|
683
|
+
/**
|
|
684
|
+
* 获取模型
|
|
685
|
+
* @function
|
|
686
|
+
* @param {object} options
|
|
687
|
+
* @param {string} options.m_url - 模型url
|
|
688
|
+
* @param {string} options.url - 模型url
|
|
689
|
+
* @param {number} options.m_scale - 缩放比例
|
|
690
|
+
* @param {number} options.scale - 缩放比例
|
|
691
|
+
* @example
|
|
692
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
693
|
+
* const graphicObj = new Graphics({
|
|
694
|
+
* cesiumGlobal: Cesium,
|
|
695
|
+
* containerId: 'cesiumContainer'
|
|
696
|
+
* })
|
|
697
|
+
* graphicObj.graphics.getModelGraphics({
|
|
698
|
+
url:"model/person.gltf",
|
|
699
|
+
scale:2
|
|
700
|
+
* })
|
|
701
|
+
* @returns {ModelGraphics} 返回ModelGraphics实例
|
|
702
|
+
*/
|
|
703
|
+
getModelGraphics(options?: ModelGraphicsOptions): any;
|
|
704
|
+
/**
|
|
705
|
+
* 获取椭圆
|
|
706
|
+
* @function
|
|
707
|
+
* @param {object} options
|
|
708
|
+
* @param {number} options.e_semiMajorAxis - 长半轴
|
|
709
|
+
* @param {number} options.e_semiMinorAxis - 短半轴
|
|
710
|
+
* @param {object} options.e_metarial - 材质
|
|
711
|
+
* @param {boolean} options.e_outline - 是否显示外边线
|
|
712
|
+
* @example
|
|
713
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
714
|
+
* const graphicObj = new Graphics({
|
|
715
|
+
* cesiumGlobal: Cesium,
|
|
716
|
+
* containerId: 'cesiumContainer'
|
|
717
|
+
* })
|
|
718
|
+
* graphicObj.graphics.getEllipseGraphics({
|
|
719
|
+
e_semiMajorAxis:1000080.0,
|
|
720
|
+
e_semiMinorAxis:1000000.0,
|
|
721
|
+
e_metarial:Cesium.Color.RED.withAlpha(0.5),
|
|
722
|
+
e_outline:true
|
|
723
|
+
* })
|
|
724
|
+
* @returns {EllipseGraphics} 返回EllipseGraphics实例
|
|
725
|
+
*/
|
|
726
|
+
getEllipseGraphics(options?: EllipseGraphicsOptions): any;
|
|
727
|
+
/**
|
|
728
|
+
* 获取球
|
|
729
|
+
* @function
|
|
730
|
+
* @param {object} options
|
|
731
|
+
* @param {number} options.radii - 半径
|
|
732
|
+
* @param {number} options.innerRadii - 内球半径
|
|
733
|
+
* @param {number} options.maximumCone - 椭圆最大角度
|
|
734
|
+
* @param {number} options.stackPartitions - 垂直分段数
|
|
735
|
+
* @param {number} options.slicePartitions - 平行分段数
|
|
736
|
+
* @param {number} options.outlineWidth -外边线宽度
|
|
737
|
+
* @param {object} options.outlineColor - 外边线颜色
|
|
738
|
+
* @param {boolean} options.outline - 是否显示外边线
|
|
739
|
+
* @param {boolean} options.fill - 是否填充
|
|
740
|
+
* @param {boolean} options.material - 材质
|
|
741
|
+
* @example
|
|
742
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
743
|
+
* const graphicObj = new Graphics({
|
|
744
|
+
* cesiumGlobal: Cesium,
|
|
745
|
+
* containerId: 'cesiumContainer'
|
|
746
|
+
* })
|
|
747
|
+
* graphicObj.graphics.getEllipsoidGraphics({
|
|
748
|
+
radii: 1000000.0, //单位 米
|
|
749
|
+
innerRadii: 50000.0,
|
|
750
|
+
maximumCone: Cesium.Math.PI_OVER_TWO,
|
|
751
|
+
stackPartitions: 56,
|
|
752
|
+
slicePartitions: 56,
|
|
753
|
+
outlineWidth: 2.0,
|
|
754
|
+
outlineColor: Cesium.Color.YELLOW,
|
|
755
|
+
outline: true,
|
|
756
|
+
fill: true,
|
|
757
|
+
material: Cesium.Color.RED.withAlpha(0.1),
|
|
758
|
+
* })
|
|
759
|
+
* @returns {EllipsoidGraphics} 返回EllipsoidGraphics实例
|
|
760
|
+
*/
|
|
761
|
+
getEllipsoidGraphics(options?: EllipsoidGraphicsOptions): any;
|
|
762
|
+
/**
|
|
763
|
+
* 获取盒子图形
|
|
764
|
+
* @function
|
|
765
|
+
* @param {object} options
|
|
766
|
+
* @param {boolean} options.show - 是否显示
|
|
767
|
+
* @param {object} options.dimensions - 盒子长宽高
|
|
768
|
+
* @param {object} options.distanceDisplayCondition - 显示条件
|
|
769
|
+
* @param {object} options.outlineColor - 外边线颜色
|
|
770
|
+
* @param {boolean} options.outline - 是否显示外边线
|
|
771
|
+
* @param {boolean} options.fill - 是否填充
|
|
772
|
+
* @param {boolean} options.material - 材质
|
|
773
|
+
* @example
|
|
774
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
775
|
+
* const graphicObj = new Graphics({
|
|
776
|
+
* cesiumGlobal: Cesium,
|
|
777
|
+
* containerId: 'cesiumContainer'
|
|
778
|
+
* })
|
|
779
|
+
* graphicObj.graphics.getBoxGraphics({
|
|
780
|
+
show:true,
|
|
781
|
+
dimensions:new Cesium.Cartesian3(400000.0, 300000.0, 500000.0),
|
|
782
|
+
outlineColor: Cesium.Color.YELLOW,
|
|
783
|
+
outline: true,
|
|
784
|
+
fill: true,
|
|
785
|
+
material:Cesium.Color.RED.withAlpha(0.5),
|
|
786
|
+
distanceDisplayCondition: new Cesium.DistanceDisplayCondition(2000.0, 4000.0)
|
|
787
|
+
* })
|
|
788
|
+
* @returns {BoxGraphics} 返回BoxGraphics实例
|
|
789
|
+
*/
|
|
790
|
+
getBoxGraphics(options?: BoxGraphicsOptions): any;
|
|
791
|
+
/**
|
|
792
|
+
* 获取面板图形
|
|
793
|
+
* @function
|
|
794
|
+
* @param {object} options
|
|
795
|
+
* @param {object} options.plane - 面板垂直方向
|
|
796
|
+
* @param {object} options.dimensions - 面板长宽高
|
|
797
|
+
* @param {boolean} options.material - 材质
|
|
798
|
+
* @example
|
|
799
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
800
|
+
* const graphicObj = new Graphics({
|
|
801
|
+
* cesiumGlobal: Cesium,
|
|
802
|
+
* containerId: 'cesiumContainer'
|
|
803
|
+
* })
|
|
804
|
+
* graphicObj.graphics.getPlaneGraphics({
|
|
805
|
+
* plane: new Cesium.Plane(Cesium.Cartesian3.UNIT_Y, 0.0),
|
|
806
|
+
dimensions:new Cesium.Cartesian2(170.0, 130.0),
|
|
807
|
+
material:Cesium.Color.BLUE
|
|
808
|
+
* })
|
|
809
|
+
* @returns {PlaneGraphics} 返回PlaneGraphics实例
|
|
810
|
+
*/
|
|
811
|
+
getPlaneGraphics(options?: PlaneGraphicsOptions): any;
|
|
812
|
+
/**
|
|
813
|
+
* 获取锥体图形
|
|
814
|
+
* @function
|
|
815
|
+
* @param {object} options
|
|
816
|
+
* @param {number} options.length - 长度
|
|
817
|
+
* @param {number} options.topRadius - 顶部半径
|
|
818
|
+
* @param {number} options.bottomRadius - 底部半径
|
|
819
|
+
* @param {boolean} options.material - 材质
|
|
820
|
+
* @param {number} options.slices - 垂直分段数量
|
|
821
|
+
* @example
|
|
822
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
823
|
+
* const graphicObj = new Graphics({
|
|
824
|
+
* cesiumGlobal: Cesium,
|
|
825
|
+
* containerId: 'cesiumContainer'
|
|
826
|
+
* })
|
|
827
|
+
* graphicObj.graphics.getCylinderGraphics({
|
|
828
|
+
length: 500 / 2,
|
|
829
|
+
topRadius: 130,
|
|
830
|
+
bottomRadius: 20,
|
|
831
|
+
material: new Cesium.Color(0, 1, 1, 0.4),
|
|
832
|
+
slices: 128,
|
|
833
|
+
* })
|
|
834
|
+
* @returns {CylinderGraphics} 返回CylinderGraphics实例
|
|
835
|
+
*/
|
|
836
|
+
getCylinderGraphics(options?: CylinderGraphicsOptions): any;
|
|
837
|
+
/**
|
|
838
|
+
* 创建点信息
|
|
839
|
+
* @function
|
|
840
|
+
* @param {object} options
|
|
841
|
+
* @param {Array<Cartesian3>} options.positions - 坐标数组
|
|
842
|
+
* @param {string} options.name - 图形名称
|
|
843
|
+
* @param {string} options.oid - 原始id
|
|
844
|
+
* @param {boolean} options.material - 材质
|
|
845
|
+
* @param {boolean} options.point - 标识是point图形
|
|
846
|
+
* @see {@link module:Graphics#getPointGraphics|getPointGraphics}
|
|
847
|
+
* @param {object} options.billboard - 绘制billboard图形的参数
|
|
848
|
+
* @see {@link module:Graphics#getBillboardGraphics|getBillboardGraphics}
|
|
849
|
+
* @param {object} options.label - 绘制label图形的参数
|
|
850
|
+
* @see {@link module:Graphics#getLabelGraphics|getLabelGraphics}
|
|
851
|
+
* @example
|
|
852
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
853
|
+
* const graphicObj = new Graphics({
|
|
854
|
+
* cesiumGlobal: Cesium,
|
|
855
|
+
* containerId: 'cesiumContainer'
|
|
856
|
+
* })
|
|
857
|
+
* graphicObj.graphics.createPointsGraphics({
|
|
858
|
+
* name:'cylinderObj',
|
|
859
|
+
* oid:'cylinderID',
|
|
860
|
+
positions: [Cesium.Cartesian3.fromDegrees(104.081701757991, 30.627042558105988, 400.0)],
|
|
861
|
+
billboard: {
|
|
862
|
+
b_img: 'static/data/images/Textures/billboard2.png',
|
|
863
|
+
b_width: 40,
|
|
864
|
+
b_height: 25,
|
|
865
|
+
b_scale: 1.5,
|
|
866
|
+
b_scaleByDistance: new Cesium.NearFarScalar(1.5e2, 2.0, 1.5e7, 0.5),
|
|
867
|
+
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND
|
|
868
|
+
},
|
|
869
|
+
label: {
|
|
870
|
+
l_text: '中科较大',
|
|
871
|
+
l_fillColor: Cesium.Color.YELLOW,
|
|
872
|
+
l_outlineColor: Cesium.Color.KHAKI,
|
|
873
|
+
}
|
|
874
|
+
* })
|
|
875
|
+
* @returns {Array} 返回实例数组
|
|
876
|
+
*/
|
|
877
|
+
createPointsGraphics(options?: PointsGraphicsOptions): any[] | undefined;
|
|
878
|
+
/**
|
|
879
|
+
* 创建线
|
|
880
|
+
* @function
|
|
881
|
+
* @param {object} options
|
|
882
|
+
* @param {Array<Cartesian3>} options.positions - 坐标数组
|
|
883
|
+
* @param {string} options.name - 图形名称
|
|
884
|
+
* @param {string} options.oid - 原始id
|
|
885
|
+
* @param {object} options.material - 配置线段材质
|
|
886
|
+
* @param {number} options.width - 线宽
|
|
887
|
+
* @param {boolean} options.clampToGround - 是否贴地
|
|
888
|
+
* @param {object} options.label - 绘制label图形的参数
|
|
889
|
+
* @see {@link module:Graphics#getLineGraphics|getLineGraphics}
|
|
890
|
+
* @example
|
|
891
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
892
|
+
* const graphicObj = new Graphics({
|
|
893
|
+
* cesiumGlobal: Cesium,
|
|
894
|
+
* containerId: 'cesiumContainer'
|
|
895
|
+
* })
|
|
896
|
+
* graphicObj.graphics.createLineGraphics({
|
|
897
|
+
* name:'pLine',
|
|
898
|
+
* oid:'pLineID',
|
|
899
|
+
positions: Cesium.Cartesian3.fromDegreesArray([
|
|
900
|
+
104.09816110606057,
|
|
901
|
+
30.659821965447698,
|
|
902
|
+
104.1120972824757,
|
|
903
|
+
30.65330300319938,
|
|
904
|
+
104.10758419863926,
|
|
905
|
+
30.64592470850288,
|
|
906
|
+
104.09351691196979,
|
|
907
|
+
30.652434826507452,
|
|
908
|
+
104.09816110606057,
|
|
909
|
+
30.659821965447698
|
|
910
|
+
]),
|
|
911
|
+
show: true,
|
|
912
|
+
material: Cesium.Color.YELLOW,
|
|
913
|
+
width:1,
|
|
914
|
+
clampToGround: false,
|
|
915
|
+
* })
|
|
916
|
+
* @returns {PolylineGraphics} 返回PolylineGraphics实例
|
|
917
|
+
*/
|
|
918
|
+
createLineGraphics(options?: LineGraphicsOptions): any;
|
|
919
|
+
/**
|
|
920
|
+
* 创建面
|
|
921
|
+
* @function
|
|
922
|
+
* @param {object} options
|
|
923
|
+
* @param {Array<Cartesian3>} options.positions - 坐标数组
|
|
924
|
+
* @param {object} options.material - 配置线段材质
|
|
925
|
+
* @param {boolean} options.clampToGround - 是否贴地
|
|
926
|
+
* @param {boolean} options.clampToS3M - 是否贴s3m模型
|
|
927
|
+
* @see {@link module:Graphics#getPolygonGraphics|getPolygonGraphics}
|
|
928
|
+
* @example
|
|
929
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
930
|
+
* const graphicObj = new Graphics({
|
|
931
|
+
* cesiumGlobal: Cesium,
|
|
932
|
+
* containerId: 'cesiumContainer'
|
|
933
|
+
* })
|
|
934
|
+
* graphicObj.graphics.createPolygonGraphics({
|
|
935
|
+
* positions:Cesium.Cartesian3.fromDegreesArray([
|
|
936
|
+
104.09816110606057,
|
|
937
|
+
30.659821965447698,
|
|
938
|
+
104.1120972824757,
|
|
939
|
+
30.65330300319938,
|
|
940
|
+
104.10758419863926,
|
|
941
|
+
30.64592470850288,
|
|
942
|
+
104.09351691196979,
|
|
943
|
+
30.652434826507452,
|
|
944
|
+
104.09816110606057,
|
|
945
|
+
30.659821965447698
|
|
946
|
+
]),
|
|
947
|
+
* material:Cesium.Color.RED.withAlpha(0.2),
|
|
948
|
+
* clampToGround:false,
|
|
949
|
+
* clampToS3M:false
|
|
950
|
+
* })
|
|
951
|
+
* @returns {PolygonGraphics} 返回PolygonGraphics实例
|
|
952
|
+
*/
|
|
953
|
+
createPolygonGraphics(options?: PolygonGraphicsOptions): any;
|
|
954
|
+
/**
|
|
955
|
+
* 创建Box
|
|
956
|
+
* @function
|
|
957
|
+
* @param {object} options
|
|
958
|
+
* @param {Cartesian3} options.position - Cartesian3坐标
|
|
959
|
+
* @param {boolean} options.show - 是否显示
|
|
960
|
+
* @param {string} options.name - 名称
|
|
961
|
+
* @param {object} options.dimensions - 盒子长宽高
|
|
962
|
+
* @param {object} options.distanceDisplayCondition - 显示条件
|
|
963
|
+
* @param {object} options.outlineColor - 外边线颜色
|
|
964
|
+
* @param {boolean} options.outline - 是否显示外边线
|
|
965
|
+
* @param {boolean} options.fill - 是否填充
|
|
966
|
+
* @param {boolean} options.material - 材质
|
|
967
|
+
* @see {@link module:Graphics#getBoxGraphics|getBoxGraphics}
|
|
968
|
+
* @example
|
|
969
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
970
|
+
* const graphicObj = new Graphics({
|
|
971
|
+
* cesiumGlobal: Cesium,
|
|
972
|
+
* containerId: 'cesiumContainer'
|
|
973
|
+
* })
|
|
974
|
+
* graphicObj.graphics.createBoxGraphics({
|
|
975
|
+
* name: 'boxG',
|
|
976
|
+
* position:Cesium.Cartesian3.fromDegrees(104.081701757991, 30.627042558105988, 200),
|
|
977
|
+
* material:Cesium.Color.RED.withAlpha(0.2),
|
|
978
|
+
* clampToGround:false,
|
|
979
|
+
* clampToS3M:false
|
|
980
|
+
* })
|
|
981
|
+
* @returns {BoxGraphics} 返回BoxGraphics实例
|
|
982
|
+
*/
|
|
983
|
+
createBoxGraphics(options?: BoxGraphicsOptions): any;
|
|
984
|
+
/**
|
|
985
|
+
* 创建模型
|
|
986
|
+
* @function
|
|
987
|
+
* @param {object} options
|
|
988
|
+
* @param {Cartesian3} options.position - Cartesian3坐标
|
|
989
|
+
* @param {string} options.m_url - 模型url
|
|
990
|
+
* @param {string} options.url - 模型url
|
|
991
|
+
* @param {number} options.m_scale - 缩放比例
|
|
992
|
+
* @param {number} options.scale - 缩放比例
|
|
993
|
+
* @see {@link module:Graphics#getModelGraphics|getModelGraphics}
|
|
994
|
+
* @example
|
|
995
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
996
|
+
* const graphicObj = new Graphics({
|
|
997
|
+
* cesiumGlobal: Cesium,
|
|
998
|
+
* containerId: 'cesiumContainer'
|
|
999
|
+
* })
|
|
1000
|
+
* graphicObj.graphics.createModelGraphics({
|
|
1001
|
+
* position:Cesium.Cartesian3.fromDegrees(104.081701757991, 30.627042558105988, 200),
|
|
1002
|
+
url:"model/person.gltf",
|
|
1003
|
+
scale:2
|
|
1004
|
+
* })
|
|
1005
|
+
* @returns {ModelGraphics} 返回ModelGraphics实例
|
|
1006
|
+
*/
|
|
1007
|
+
createModelGraphics(options?: ModelGraphicsOptions): any;
|
|
1008
|
+
/**
|
|
1009
|
+
* 创建地面指示
|
|
1010
|
+
* @function
|
|
1011
|
+
* @param {object} options
|
|
1012
|
+
* @param {Array<Cartesian3>} options.positions - 坐标数组
|
|
1013
|
+
* @param {number} options.height - 高度
|
|
1014
|
+
* @param {number} options.width - 宽度
|
|
1015
|
+
* @param {object} options.material - 材质
|
|
1016
|
+
* @param {boolean} options.outline - 是否显示外边线
|
|
1017
|
+
* @param {number} options.extrudedHeight - 拉伸高度
|
|
1018
|
+
* @param {string} options.cornerType - 转角类型
|
|
1019
|
+
* @see {@link WarnLinkMaterialProperty|WarnLinkMaterialProperty}
|
|
1020
|
+
* @example
|
|
1021
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
1022
|
+
* const graphicObj = new Graphics({
|
|
1023
|
+
* cesiumGlobal: Cesium,
|
|
1024
|
+
* containerId: 'cesiumContainer'
|
|
1025
|
+
* })
|
|
1026
|
+
* graphicObj.graphics.craeteCorridorGraphics({
|
|
1027
|
+
* positions: Cesium.Cartesian3.fromDegreesArray(
|
|
1028
|
+
* 110.16018735617934, 31.036076859828338,
|
|
1029
|
+
* 110.17845812703679,31.033686527335444,
|
|
1030
|
+
* 110.19261040403379, 31.02892781958261,
|
|
1031
|
+
* 110.20775152895165,31.02475678594998,
|
|
1032
|
+
* 110.2247484728178,31.019315371809977,
|
|
1033
|
+
* 110.24033095328579,31.017866033294506),
|
|
1034
|
+
width: 1500.0,
|
|
1035
|
+
height: 0,
|
|
1036
|
+
extrudedHeight: 50,
|
|
1037
|
+
cornerType: Cesium.CornerType.MITERED,
|
|
1038
|
+
outline: false,
|
|
1039
|
+
material:Cesium.Color.BLUE.withAlpha(0.4)
|
|
1040
|
+
* })
|
|
1041
|
+
* @returns {corridor} 返回corridor实例
|
|
1042
|
+
*/
|
|
1043
|
+
/** @deprecated 拼写有误,请使用 {@link createCorridorGraphics} */
|
|
1044
|
+
craeteCorridorGraphics(options?: CorridorGraphicsOptions): any;
|
|
1045
|
+
/**
|
|
1046
|
+
* 构建动态线
|
|
1047
|
+
* @function
|
|
1048
|
+
* @param {object} options
|
|
1049
|
+
* @param {Array<Cartesian3>} options.positions - 坐标数组
|
|
1050
|
+
* @param {object} options.material - 材质
|
|
1051
|
+
* @param {number} options.width - 宽度
|
|
1052
|
+
* @param {boolean} options.clampToGround - 是否贴地
|
|
1053
|
+
* @example
|
|
1054
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
1055
|
+
* const graphicObj = new Graphics({
|
|
1056
|
+
* cesiumGlobal: Cesium,
|
|
1057
|
+
* containerId: 'cesiumContainer'
|
|
1058
|
+
* })
|
|
1059
|
+
* graphicObj.graphics.craeteDynamicPolyLineGraphics({
|
|
1060
|
+
* positions:Cesium.Cartesian3.fromDegreesArray([
|
|
1061
|
+
104.09816110606057,
|
|
1062
|
+
30.659821965447698,
|
|
1063
|
+
104.1120972824757,
|
|
1064
|
+
30.65330300319938,
|
|
1065
|
+
104.10758419863926,
|
|
1066
|
+
30.64592470850288,
|
|
1067
|
+
104.09351691196979,
|
|
1068
|
+
30.652434826507452,
|
|
1069
|
+
104.09816110606057,
|
|
1070
|
+
30.659821965447698
|
|
1071
|
+
]),
|
|
1072
|
+
material: Cesium.Color.CHARTREUSE,
|
|
1073
|
+
width:5,
|
|
1074
|
+
clampToGround:false
|
|
1075
|
+
* })
|
|
1076
|
+
* @returns {polyline} 返回polyline实例
|
|
1077
|
+
*/
|
|
1078
|
+
/** @deprecated 拼写有误,请使用 {@link createDynamicPolyLineGraphics} */
|
|
1079
|
+
craeteDynamicPolyLineGraphics(options?: DynamicPolyLineGraphicsOptions): any;
|
|
1080
|
+
/**
|
|
1081
|
+
* 构建动态椎体
|
|
1082
|
+
* @function
|
|
1083
|
+
* @param {object} options
|
|
1084
|
+
* @param {CylinderGraphics} options.cylinder - 椎体对象
|
|
1085
|
+
* @param {Cesium.Entity} options.entity - entity实体
|
|
1086
|
+
* @param {number} options.width - 宽度
|
|
1087
|
+
* @param {boolean} options.clampToGround - 是否贴地
|
|
1088
|
+
* @see {@link module:Graphics#getCylinderGraphics|getCylinderGraphics}
|
|
1089
|
+
* @example
|
|
1090
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
1091
|
+
* const graphicObj = new Graphics({
|
|
1092
|
+
* cesiumGlobal: Cesium,
|
|
1093
|
+
* containerId: 'cesiumContainer'
|
|
1094
|
+
* })
|
|
1095
|
+
* graphicObj.graphics.craeteDynamicCylinderGraphics({
|
|
1096
|
+
* entity: new Cesium.Entity({positions:Cesium.Cartesian3.fromDegrees(104.081701757991, 30.627042558105988, 200)}),
|
|
1097
|
+
* cylinder:{
|
|
1098
|
+
length: 500 / 2,
|
|
1099
|
+
topRadius: 130,
|
|
1100
|
+
bottomRadius: 20,
|
|
1101
|
+
material: new Cesium.Color(0, 1, 1, 0.4),
|
|
1102
|
+
slices: 128,
|
|
1103
|
+
* }
|
|
1104
|
+
* })
|
|
1105
|
+
* @returns {Cesium.CylinderGraphics} 返回cylinder实例
|
|
1106
|
+
*/
|
|
1107
|
+
/** @deprecated 拼写有误,请使用 {@link createDynamicCylinderGraphics} */
|
|
1108
|
+
craeteDynamicCylinderGraphics(options?: DynamicCylinderGraphicsOptions): {
|
|
1109
|
+
cylinder: any;
|
|
1110
|
+
position: any;
|
|
1111
|
+
} | undefined;
|
|
1112
|
+
/**
|
|
1113
|
+
* 创建渐变锥体
|
|
1114
|
+
* @function
|
|
1115
|
+
* @param {object} options
|
|
1116
|
+
* @param {Cartesian3} options.position - Cartesian3坐标
|
|
1117
|
+
* @param {string} options.color - 颜色
|
|
1118
|
+
* @param {number} options.duration - 持续时长
|
|
1119
|
+
* @param {number} options.length - 长度
|
|
1120
|
+
* @param {number} options.topRadius - 顶部半径
|
|
1121
|
+
* @param {number} options.bottomRadius - 底部半径
|
|
1122
|
+
* @param {number} options.slices - 垂直分段数量
|
|
1123
|
+
* @see {@link module:Graphics#getCylinderGraphics|getCylinderGraphics}
|
|
1124
|
+
* @see {@link CircleFadeMaterialProperty|CircleFadeMaterialProperty}
|
|
1125
|
+
* @example
|
|
1126
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
1127
|
+
* const graphicObj = new Graphics({
|
|
1128
|
+
* cesiumGlobal: Cesium,
|
|
1129
|
+
* containerId: 'cesiumContainer'
|
|
1130
|
+
* })
|
|
1131
|
+
* graphicObj.graphics.createFadeCylinderGraphics({
|
|
1132
|
+
* position:Cesium.Cartesian3.fromDegrees(104.081701757991, 30.627042558105988, 200),
|
|
1133
|
+
length: 500 / 2,
|
|
1134
|
+
topRadius: 130,
|
|
1135
|
+
bottomRadius: 20,
|
|
1136
|
+
color: new Cesium.Color(0, 1, 1, 0.4),
|
|
1137
|
+
slices: 128,
|
|
1138
|
+
duration:5
|
|
1139
|
+
* })
|
|
1140
|
+
* @returns {Cesium.CylinderGraphics} 返回cylinder实例
|
|
1141
|
+
*/
|
|
1142
|
+
createFadeCylinderGraphics(options?: FadeCylinderGraphicsOptions): any;
|
|
1143
|
+
/**
|
|
1144
|
+
* 创建旋转圆柱
|
|
1145
|
+
* @function
|
|
1146
|
+
* @param {object} options
|
|
1147
|
+
* @param {Cartesian3} options.position - Cartesian3坐标
|
|
1148
|
+
* @param {number} options.length - 长度
|
|
1149
|
+
* @param {number} options.topRadius - 顶部半径
|
|
1150
|
+
* @param {number} options.bottomRadius - 底部半径
|
|
1151
|
+
* @param {number} options.slices - 垂直分段数量
|
|
1152
|
+
* @param {string} options.img - 材质图片
|
|
1153
|
+
* @param {object} options.material - 材质(与图片二选一)
|
|
1154
|
+
* @see {@link module:Graphics#setGraphicsRotate|setGraphicsRotate}
|
|
1155
|
+
* @example
|
|
1156
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
1157
|
+
* const graphicObj = new Graphics({
|
|
1158
|
+
* cesiumGlobal: Cesium,
|
|
1159
|
+
* containerId: 'cesiumContainer'
|
|
1160
|
+
* })
|
|
1161
|
+
* graphicObj.graphics.craeteRotateCylinderGraphics({
|
|
1162
|
+
* position:Cesium.Cartesian3.fromDegrees(104.081701757991, 30.627042558105988, 200),
|
|
1163
|
+
length: 500,
|
|
1164
|
+
topRadius: 500,
|
|
1165
|
+
bottomRadius: 500,,
|
|
1166
|
+
material: new Cesium.ImageMaterialProperty({
|
|
1167
|
+
image:"static/data/images/file/cc2.png",
|
|
1168
|
+
transparent: true,
|
|
1169
|
+
repeat: {x: 1,y: -1},
|
|
1170
|
+
}),
|
|
1171
|
+
slices: 128,
|
|
1172
|
+
* })
|
|
1173
|
+
* @returns {Cesium.CylinderGraphics} 返回cylinder实例
|
|
1174
|
+
*/
|
|
1175
|
+
/** @deprecated 拼写有误,请使用 {@link createRotateCylinderGraphics} */
|
|
1176
|
+
craeteRotateCylinderGraphics(options?: RotateCylinderGraphicsOptions): any;
|
|
1177
|
+
/**
|
|
1178
|
+
* 创建闪烁圆
|
|
1179
|
+
* @function
|
|
1180
|
+
* @param {object} options
|
|
1181
|
+
* @param {Cartesian3} options.position - Cartesian3坐标
|
|
1182
|
+
* @param {number} options.alp - 频率
|
|
1183
|
+
* @param {boolean} options.flog - 显示雾气效果
|
|
1184
|
+
* @param {number} options.height - 高度
|
|
1185
|
+
* @param {number} options.semiMinorAxis - 短半轴
|
|
1186
|
+
* @param {number} options.semiMajorAxis - 长半轴
|
|
1187
|
+
* @example
|
|
1188
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
1189
|
+
* const graphicObj = new Graphics({
|
|
1190
|
+
* cesiumGlobal: Cesium,
|
|
1191
|
+
* containerId: 'cesiumContainer'
|
|
1192
|
+
* })
|
|
1193
|
+
* graphicObj.graphics.craeteDynamicBlinkCircleGraphics({
|
|
1194
|
+
* position:Cesium.Cartesian3.fromDegrees(104.081701757991, 30.627042558105988, 200),
|
|
1195
|
+
semiMinorAxis: 2000.0,
|
|
1196
|
+
semiMajorAxis: 2000.0,
|
|
1197
|
+
height: 10,
|
|
1198
|
+
alp:2,
|
|
1199
|
+
flog:true
|
|
1200
|
+
* })
|
|
1201
|
+
* @returns {Cesium.EllipseGraphics} 返回ellipse实例
|
|
1202
|
+
*/
|
|
1203
|
+
/** @deprecated 拼写有误,请使用 {@link createDynamicBlinkCircleGraphics} */
|
|
1204
|
+
craeteDynamicBlinkCircleGraphics(options?: DynamicBlinkCircleGraphicsOptions): any;
|
|
1205
|
+
/**
|
|
1206
|
+
* 创建动态旋转圆
|
|
1207
|
+
* @function
|
|
1208
|
+
* @param {object} options
|
|
1209
|
+
* @param {object} options.center - 中心坐标数组
|
|
1210
|
+
* @param {number} options.radius - 半径
|
|
1211
|
+
* @param {number} options.rotateAmount - 旋转频率
|
|
1212
|
+
* @param {number} options.height - 高度
|
|
1213
|
+
* @param {number} options.scale - 外圆缩放比例
|
|
1214
|
+
* @param {number} options.scale2 - 内圆缩放比例
|
|
1215
|
+
* @param {string} options.imge - 材质图片
|
|
1216
|
+
* @param {object} options.material - 材质(与图片二选一)
|
|
1217
|
+
* @see {@link module:Base#transformWGS84ToCartesian|transformWGS84ToCartesian}
|
|
1218
|
+
* @example
|
|
1219
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
1220
|
+
* const graphicObj = new Graphics({
|
|
1221
|
+
* cesiumGlobal: Cesium,
|
|
1222
|
+
* containerId: 'cesiumContainer'
|
|
1223
|
+
* })
|
|
1224
|
+
* graphicObj.graphics.craeteDynamicCricleGraphics({
|
|
1225
|
+
* center:{ lng: 104.081701757991, lat: 30.627042558105988, alt: 1 },,
|
|
1226
|
+
* imge: "static/data/images/Textures/circle_bg.png",
|
|
1227
|
+
radius : 800,
|
|
1228
|
+
rotateAmount: 0.05,
|
|
1229
|
+
height : 1,
|
|
1230
|
+
scale:1500,
|
|
1231
|
+
scale2:800
|
|
1232
|
+
* })
|
|
1233
|
+
* @returns {Cesium.EllipseGraphics} 返回ellipse实例
|
|
1234
|
+
*/
|
|
1235
|
+
/** @deprecated 拼写有误,请使用 {@link createDynamicCircleGraphics} */
|
|
1236
|
+
craeteDynamicCricleGraphics(options?: DynamicCricleGraphicsOptions): any;
|
|
1237
|
+
/**
|
|
1238
|
+
* 动态渐变墙
|
|
1239
|
+
* @function
|
|
1240
|
+
* @param {object} options
|
|
1241
|
+
* @param {Array<Cartesian3>} options.positions - 坐标数组
|
|
1242
|
+
* @param {number} options.alp - 透明比例 0~1
|
|
1243
|
+
* @param {number} options.num - 渐变步长
|
|
1244
|
+
* @param {number} options.speed - 速度 0~1
|
|
1245
|
+
* @param {object} options.color - 颜色
|
|
1246
|
+
* @param {string} options.img - 材质图片
|
|
1247
|
+
* @example
|
|
1248
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
1249
|
+
* const graphicObj = new Graphics({
|
|
1250
|
+
* cesiumGlobal: Cesium,
|
|
1251
|
+
* containerId: 'cesiumContainer'
|
|
1252
|
+
* })
|
|
1253
|
+
* graphicObj.graphics.craeteDynamicShadeWallGraphics({
|
|
1254
|
+
* positions: Cesium.Cartesian3.fromDegreesArray(
|
|
1255
|
+
* 110.16018735617934, 31.036076859828338,
|
|
1256
|
+
* 110.17845812703679,31.033686527335444,
|
|
1257
|
+
* 110.19261040403379, 31.02892781958261,
|
|
1258
|
+
* 110.20775152895165,31.02475678594998,
|
|
1259
|
+
* 110.2247484728178,31.019315371809977,
|
|
1260
|
+
* 110.24033095328579,31.017866033294506),
|
|
1261
|
+
* img: "static/data/images/Textures/circle_bg.png",
|
|
1262
|
+
alp:1,
|
|
1263
|
+
num :20,
|
|
1264
|
+
color: Cesium.Color.RED,
|
|
1265
|
+
speed:0.003;
|
|
1266
|
+
* })
|
|
1267
|
+
* @returns {Cesium.WallGraphics} 返回wall实例
|
|
1268
|
+
*/
|
|
1269
|
+
/** @deprecated 拼写有误,请使用 {@link createDynamicShadeWallGraphics} */
|
|
1270
|
+
craeteDynamicShadeWallGraphics(options?: DynamicShadeWallGraphicsOptions): any;
|
|
1271
|
+
/**
|
|
1272
|
+
* 自定义标牌气泡框
|
|
1273
|
+
* @function
|
|
1274
|
+
* @param {object} options
|
|
1275
|
+
* @param {Cartesian3} options.position - 坐标数组
|
|
1276
|
+
* @param {number} options.height - 高度
|
|
1277
|
+
* @param {number} options.width - 宽度
|
|
1278
|
+
* @param {string} options.text - 文字
|
|
1279
|
+
* @param {string} options.image - 气泡窗图片
|
|
1280
|
+
* @param {Cartesian2} options.b_pixelOffset - 偏移
|
|
1281
|
+
* @param {number} options.b_scale - 缩放比例
|
|
1282
|
+
* @param {function} options.callback - 回调返回entity
|
|
1283
|
+
* @see {@link module:Graphics#getBillboardGraphics|getBillboardGraphics}
|
|
1284
|
+
* @example
|
|
1285
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
1286
|
+
* const graphicObj = new Graphics({
|
|
1287
|
+
* cesiumGlobal: Cesium,
|
|
1288
|
+
* containerId: 'cesiumContainer'
|
|
1289
|
+
* })
|
|
1290
|
+
* graphicObj.graphics.createCustomDefBillboardGraphics({
|
|
1291
|
+
* position: Cesium.Cartesian3.fromDegrees(110.16018735617934, 31.036076859828338),
|
|
1292
|
+
* image: "static/data/images/Textures/circle_bg.png",
|
|
1293
|
+
width : 150;
|
|
1294
|
+
height:80;
|
|
1295
|
+
text: "建工集团",
|
|
1296
|
+
b_pixelOffset:new Cesium.Cartesian2(80, -35),
|
|
1297
|
+
b_scale : 1.5,
|
|
1298
|
+
* })
|
|
1299
|
+
*/
|
|
1300
|
+
createCustomDefBillboardGraphics(options?: CustomDefBillboardGraphicsOptions): void;
|
|
1301
|
+
/**
|
|
1302
|
+
* 旋转面
|
|
1303
|
+
* @function
|
|
1304
|
+
* @param {object} options
|
|
1305
|
+
* @param {Array<Cartesian3>} options.positions - 坐标数组
|
|
1306
|
+
* @param {Cartesian2} options.dimensions - 长宽高
|
|
1307
|
+
* @param {string} options.image - 图片
|
|
1308
|
+
* @example
|
|
1309
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
1310
|
+
* const graphicObj = new Graphics({
|
|
1311
|
+
* cesiumGlobal: Cesium,
|
|
1312
|
+
* containerId: 'cesiumContainer'
|
|
1313
|
+
* })
|
|
1314
|
+
* graphicObj.graphics.craeteRotatePlaneGraphics({
|
|
1315
|
+
* positions: Cesium.Cartesian3.fromDegreesArray([
|
|
1316
|
+
104.09816110606057,
|
|
1317
|
+
30.659821965447698,
|
|
1318
|
+
104.1120972824757,
|
|
1319
|
+
30.65330300319938,
|
|
1320
|
+
104.10758419863926,
|
|
1321
|
+
30.64592470850288),
|
|
1322
|
+
* image: "static/data/images/Textures/circle_bg.png",
|
|
1323
|
+
dimensions:new Cesium.Cartesian2(200.0, 150.0),
|
|
1324
|
+
* })
|
|
1325
|
+
* @returns {Cesium.PlaneGraphics} 返回plane实例
|
|
1326
|
+
*/
|
|
1327
|
+
/** @deprecated 拼写有误,请使用 {@link createRotatePlaneGraphics} */
|
|
1328
|
+
craeteRotatePlaneGraphics(options?: RotatePlaneGraphicsOptions): any;
|
|
1329
|
+
/**
|
|
1330
|
+
* 视频投放
|
|
1331
|
+
* @function
|
|
1332
|
+
* @param {object} options
|
|
1333
|
+
* @param {Cartesian3} options.position - Cartesian3坐标
|
|
1334
|
+
* @param {Cartesian2} options.dimensions - 长宽高
|
|
1335
|
+
* @param {HTMLElement} options.videoElement - video绑定dom
|
|
1336
|
+
* @param {Cartesian3} options.normal - 垂直方向
|
|
1337
|
+
* @example
|
|
1338
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
1339
|
+
* const graphicObj = new Graphics({
|
|
1340
|
+
* cesiumGlobal: Cesium,
|
|
1341
|
+
* containerId: 'cesiumContainer'
|
|
1342
|
+
* })
|
|
1343
|
+
* graphicObj.graphics.createVideoPlaneGraphics({
|
|
1344
|
+
position: Cesium.Cartesian3.fromDegrees(104.081701757991, 30.627042558105988, 200),
|
|
1345
|
+
videoElement: videoDom,
|
|
1346
|
+
dimensions: new Cesium.Cartesian2(400.0, 200.0),
|
|
1347
|
+
* })
|
|
1348
|
+
* @returns {plane} 返回plane实例
|
|
1349
|
+
*/
|
|
1350
|
+
createVideoPlaneGraphics(options?: VideoPlaneGraphicsOptions): any;
|
|
1351
|
+
/**
|
|
1352
|
+
* gif 图片投影
|
|
1353
|
+
* @function
|
|
1354
|
+
* @param {object} options
|
|
1355
|
+
* @param {Cartesian3} options.position - Cartesian3坐标
|
|
1356
|
+
* @param {Cartesian2} options.dimensions - 长宽高
|
|
1357
|
+
* @param {string} options.url - 图片
|
|
1358
|
+
* @param {Cartesian3} options.normal - 垂直方向
|
|
1359
|
+
* @example
|
|
1360
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
1361
|
+
* const graphicObj = new Graphics({
|
|
1362
|
+
* cesiumGlobal: Cesium,
|
|
1363
|
+
* containerId: 'cesiumContainer'
|
|
1364
|
+
* })
|
|
1365
|
+
* graphicObj.graphics.createGifBillboardGraphics({
|
|
1366
|
+
position: Cesium.Cartesian3.fromDegrees(104.081701757991, 30.627042558105988, 200),
|
|
1367
|
+
url: 'static/data/file/scene1.gif'
|
|
1368
|
+
* })
|
|
1369
|
+
* @returns {Cesium.BillboardGraphics} 返回entity实例
|
|
1370
|
+
*/
|
|
1371
|
+
createGifBillboardGraphics(options?: GifBillboardGraphicsOptions): Promise<any>;
|
|
1372
|
+
/**
|
|
1373
|
+
* 设置图形旋转
|
|
1374
|
+
* @function
|
|
1375
|
+
* @param {object} options
|
|
1376
|
+
* @param {object} options.position - wgs84坐标
|
|
1377
|
+
* @param {Entity} options.entity - 实体对象
|
|
1378
|
+
* @param {number} options.rotateAmount - 旋转比例
|
|
1379
|
+
* @see {@link module:Base#transformWGS84ToCartesian|transformWGS84ToCartesian}
|
|
1380
|
+
* @example
|
|
1381
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
1382
|
+
* const graphicObj = new Graphics({
|
|
1383
|
+
* cesiumGlobal: Cesium,
|
|
1384
|
+
* containerId: 'cesiumContainer'
|
|
1385
|
+
* });
|
|
1386
|
+
* const billboardGraphics = graphicObj.graphics.getBillboardGraphics({
|
|
1387
|
+
b_img: "images/bill.png",
|
|
1388
|
+
b_width: 35,
|
|
1389
|
+
b_height : 35,
|
|
1390
|
+
b_clampToGround : true,
|
|
1391
|
+
b_scale : 1,
|
|
1392
|
+
b_pixelOffset :new Cesium.Cartesian2(0, -20),
|
|
1393
|
+
b_scaleByDistance : new Cesium.NearFarScalar(1.5e2, 0.7, 1.5e7, 0.5),
|
|
1394
|
+
* });
|
|
1395
|
+
* graphicObj.graphics.setGraphicsRotate({
|
|
1396
|
+
entity:billboardGraphics ,
|
|
1397
|
+
position: { lng: 104.081701757991, lat: 30.627042558105988, alt: 1 },
|
|
1398
|
+
rotateAmount: 4,
|
|
1399
|
+
* })
|
|
1400
|
+
*/
|
|
1401
|
+
setGraphicsRotate(options?: SetGraphicsRotateOptions): void;
|
|
1402
|
+
/**
|
|
1403
|
+
* 图形浮动
|
|
1404
|
+
* @function
|
|
1405
|
+
* @param {object} options
|
|
1406
|
+
* @param {Cartesian3} options.position - 坐标数组
|
|
1407
|
+
* @param {Entity} options.entity - 实体对象
|
|
1408
|
+
* @param {number} options.maxHeiht - 最大高度
|
|
1409
|
+
* @param {number} options.minHeiht - 最小高度
|
|
1410
|
+
* @param {Cartesian} options.cartesians - 原始位置
|
|
1411
|
+
* @param {Cartesian} options.speed - 速度
|
|
1412
|
+
* @see {@link module:Base#transformWGS84ToCartesian|transformWGS84ToCartesian}
|
|
1413
|
+
* @see {@link module:Base#transformCartesianToWGS84|transformCartesianToWGS84}
|
|
1414
|
+
* @see {@link module:Base#transformCartesianArrayToWGS84Array|transformCartesianArrayToWGS84Array}
|
|
1415
|
+
* @see {@link module:Base#transformWGS84ArrayToCartesianArray|transformWGS84ArrayToCartesianArray}
|
|
1416
|
+
* @example
|
|
1417
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
1418
|
+
* const graphicObj = new Graphics({
|
|
1419
|
+
* cesiumGlobal: Cesium,
|
|
1420
|
+
* containerId: 'cesiumContainer'
|
|
1421
|
+
* })
|
|
1422
|
+
* const billboardGraphics = graphicObj.graphics.getBillboardGraphics({
|
|
1423
|
+
b_img: "images/bill.png",
|
|
1424
|
+
b_width: 35,
|
|
1425
|
+
b_height : 35,
|
|
1426
|
+
b_clampToGround : true,
|
|
1427
|
+
b_scale : 1,
|
|
1428
|
+
b_pixelOffset :new Cesium.Cartesian2(0, -20),
|
|
1429
|
+
b_scaleByDistance : new Cesium.NearFarScalar(1.5e2, 0.7, 1.5e7, 0.5),
|
|
1430
|
+
* });
|
|
1431
|
+
* graphicObj.graphics.setGraphicsRotate({
|
|
1432
|
+
entity: billboardGraphics,
|
|
1433
|
+
cartesians: Cesium.Cartesian3.fromDegrees(104.081701757991, 30.627042558105988, 200),
|
|
1434
|
+
minHeiht : 5,
|
|
1435
|
+
maxHeiht:100,
|
|
1436
|
+
speed:0.06,
|
|
1437
|
+
* })
|
|
1438
|
+
*/
|
|
1439
|
+
setGraphicsFloat(options?: SetGraphicsFloatOptions): void;
|
|
1440
|
+
/**
|
|
1441
|
+
* canvas 贴图
|
|
1442
|
+
* @function
|
|
1443
|
+
* @param {object} options
|
|
1444
|
+
* @param {Array<Cartesian3>} options.positions - 坐标数组
|
|
1445
|
+
* @param {string} options.img - 图片
|
|
1446
|
+
* @param {number} options.cwidth - 宽度
|
|
1447
|
+
* @param {number} options.cheight - 高度
|
|
1448
|
+
* @param {function} options.callback - 回调
|
|
1449
|
+
* @example
|
|
1450
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
1451
|
+
* const graphicObj = new Graphics({
|
|
1452
|
+
* cesiumGlobal: Cesium,
|
|
1453
|
+
* containerId: 'cesiumContainer'
|
|
1454
|
+
* })
|
|
1455
|
+
* graphicObj.graphics.createCanvasGraphics({
|
|
1456
|
+
positions:Cesium.Cartesian3.fromDegreesArray(
|
|
1457
|
+
* 110.16018735617934, 31.036076859828338,
|
|
1458
|
+
* 110.17845812703679,31.033686527335444,
|
|
1459
|
+
* 110.19261040403379, 31.02892781958261,
|
|
1460
|
+
* 110.20775152895165,31.02475678594998,
|
|
1461
|
+
* 110.2247484728178,31.019315371809977,
|
|
1462
|
+
* 110.24033095328579,31.017866033294506)
|
|
1463
|
+
img : "images/ysCesium/logo.png"
|
|
1464
|
+
cwidth : 500,
|
|
1465
|
+
cheight:200,
|
|
1466
|
+
speed:0.06,
|
|
1467
|
+
callback:res=>{console.log(res)}
|
|
1468
|
+
* })
|
|
1469
|
+
*@returns {Cesium.RectangleGraphics} 返回rectangle实例
|
|
1470
|
+
*/
|
|
1471
|
+
createCanvasGraphics(options?: CanvasGraphicsOptions): void;
|
|
1472
|
+
/**
|
|
1473
|
+
* 创建扇形
|
|
1474
|
+
* @function
|
|
1475
|
+
* @param {object} options
|
|
1476
|
+
* @param {Object} options.viewer - cesium 视图对象
|
|
1477
|
+
* @param {Material} options.custMaterial - 自定义材质
|
|
1478
|
+
* @param {Number} options.speed - 运动速度
|
|
1479
|
+
* @param {Number} options.longitude - 纬度
|
|
1480
|
+
* @param {Number} options.latitude - 经度
|
|
1481
|
+
* @param {Number} options.alt - 高度(z轴)
|
|
1482
|
+
* @param {String} options.direction - 扫描方向("-"顺时针,"+"逆时针)
|
|
1483
|
+
* @example
|
|
1484
|
+
* import { Graphics } from 'cesium_dev_kit'
|
|
1485
|
+
* const graphicObj = new Graphics({
|
|
1486
|
+
* cesiumGlobal: Cesium,
|
|
1487
|
+
* containerId: 'cesiumContainer'
|
|
1488
|
+
* })
|
|
1489
|
+
* graphicObj.graphics.createFanShape({
|
|
1490
|
+
viewer: this.viewer,
|
|
1491
|
+
longitude: 104.06417395476578,
|
|
1492
|
+
latitude: 30.636185094244944,
|
|
1493
|
+
alt: 700,
|
|
1494
|
+
speed: 2.0,
|
|
1495
|
+
direction: '+',
|
|
1496
|
+
custMaterial: Cesium.Color.AQUAMARINE.withAlpha(0.5)
|
|
1497
|
+
* })
|
|
1498
|
+
* @returns {Cesium.WallGraphics} 返回wall实例
|
|
1499
|
+
*
|
|
1500
|
+
*/
|
|
1501
|
+
createFanShape({ viewer, longitude, latitude, alt, custMaterial, speed, direction }: {
|
|
1502
|
+
viewer: any;
|
|
1503
|
+
longitude: number;
|
|
1504
|
+
latitude: number;
|
|
1505
|
+
alt: number;
|
|
1506
|
+
custMaterial: any;
|
|
1507
|
+
speed?: number;
|
|
1508
|
+
direction?: string;
|
|
1509
|
+
}): any;
|
|
1510
|
+
/**
|
|
1511
|
+
* 根据两个点 开始角度、夹角度 求取立面的扇形
|
|
1512
|
+
* @private
|
|
1513
|
+
* @param {Array} x1 第一个点x轴
|
|
1514
|
+
* @param {Array} y1 第一个点y轴
|
|
1515
|
+
* @param {Array} x2 第二个点x轴
|
|
1516
|
+
* @param {Array} y2 第二个点y轴
|
|
1517
|
+
* @param {number} fx 扇形起始角度
|
|
1518
|
+
* @param {number} angle 扇形角度
|
|
1519
|
+
* @returns {object} entity
|
|
1520
|
+
*/
|
|
1521
|
+
_computeCirclularFlight(x1: number, y1: number, x2: number, y2: number, fx: number, angle: number): any[];
|
|
1522
|
+
/**
|
|
1523
|
+
* 判断对象是否有某个属性
|
|
1524
|
+
* @private
|
|
1525
|
+
* @param {object} obj 对象
|
|
1526
|
+
* @param {string} field 属性字段
|
|
1527
|
+
* @param {string} defVal 默认返回
|
|
1528
|
+
* @returns {string}
|
|
1529
|
+
*/
|
|
1530
|
+
_objHasOwnProperty<T>(obj: object | undefined, field: string, defVal: T): T;
|
|
1531
|
+
/**
|
|
1532
|
+
* 根据第一个点 偏移距离 角度 求取第二个点的坐标
|
|
1533
|
+
* @private
|
|
1534
|
+
* @param {Array} x1 x轴
|
|
1535
|
+
* @param {Array} y1 y轴
|
|
1536
|
+
* @param {number} radius 弧度
|
|
1537
|
+
* @param {number} heading 朝向
|
|
1538
|
+
* @returns {object} entity
|
|
1539
|
+
*/
|
|
1540
|
+
_calcPoints(x1: number, y1: number, radius: number, heading: number): any[];
|
|
1541
|
+
/** 创建走廊(参数同 {@link craeteCorridorGraphics}) */
|
|
1542
|
+
createCorridorGraphics(options?: CorridorGraphicsOptions): any;
|
|
1543
|
+
/** 创建动态线(参数同 {@link craeteDynamicPolyLineGraphics}) */
|
|
1544
|
+
createDynamicPolyLineGraphics(options?: DynamicPolyLineGraphicsOptions): any;
|
|
1545
|
+
/** 创建动态圆柱(参数同 {@link craeteDynamicCylinderGraphics}) */
|
|
1546
|
+
createDynamicCylinderGraphics(options?: DynamicCylinderGraphicsOptions): {
|
|
1547
|
+
cylinder: any;
|
|
1548
|
+
position: any;
|
|
1549
|
+
} | undefined;
|
|
1550
|
+
/** 创建旋转圆柱(参数同 {@link craeteRotateCylinderGraphics}) */
|
|
1551
|
+
createRotateCylinderGraphics(options?: RotateCylinderGraphicsOptions): any;
|
|
1552
|
+
/** 创建闪烁圆(参数同 {@link craeteDynamicBlinkCircleGraphics}) */
|
|
1553
|
+
createDynamicBlinkCircleGraphics(options?: DynamicBlinkCircleGraphicsOptions): any;
|
|
1554
|
+
/** 创建动态圆(参数同 {@link craeteDynamicCricleGraphics}) */
|
|
1555
|
+
createDynamicCircleGraphics(options?: DynamicCricleGraphicsOptions): any;
|
|
1556
|
+
/** 创建渐变墙(参数同 {@link craeteDynamicShadeWallGraphics}) */
|
|
1557
|
+
createDynamicShadeWallGraphics(options?: DynamicShadeWallGraphicsOptions): any;
|
|
1558
|
+
/** 创建旋转面(参数同 {@link craeteRotatePlaneGraphics}) */
|
|
1559
|
+
createRotatePlaneGraphics(options?: RotatePlaneGraphicsOptions): any;
|
|
1560
|
+
createGraphics(): any;
|
|
1561
|
+
};
|
|
1562
|
+
};
|
|
1563
|
+
type GraphicsInstance = InstanceType<typeof Graphics>;
|
|
1564
|
+
|
|
1565
|
+
export type { GraphicsInstance as G };
|