ino-cesium 0.0.14 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/ino-cesium.d.ts +2631 -0
  2. package/package.json +9 -11
@@ -0,0 +1,2631 @@
1
+ import * as Cesium from 'cesium';
2
+ export { Cesium };
3
+ import { FeatureCollection as FeatureCollection$1, Point as Point$1, Polygon as Polygon$1, MultiPolygon as MultiPolygon$1, GeoJsonProperties as GeoJsonProperties$1, LineString as LineString$1, MultiLineString as MultiLineString$1, Feature as Feature$1 } from 'geojson';
4
+
5
+ interface ISetViewByLngLatOptions {
6
+ lng: number;
7
+ lat: number;
8
+ height?: number;
9
+ viewer: Cesium.Viewer;
10
+ }
11
+ interface ISetViewByPositionOptions {
12
+ position: Cesium.Cartesian3;
13
+ viewer: Cesium.Viewer;
14
+ }
15
+ interface ICamearView {
16
+ destination: Cesium.Cartesian3;
17
+ orientation: {
18
+ heading: number;
19
+ pitch: number;
20
+ roll: number;
21
+ };
22
+ }
23
+ interface ICesiumEventListener {
24
+ LEFT_CLICK?: (e: any) => void;
25
+ LEFT_POSITION?: (e: any) => void;
26
+ MOVE_POSITION?: (e: any) => void;
27
+ PICK_FEATURE?: (pickModel: any, feature: any) => void;
28
+ MOVE_PICK_FEATURE?: (pickModel: any, feature: any) => void;
29
+ }
30
+ type DeepPartial<T> = {
31
+ [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
32
+ };
33
+
34
+ interface ISkyBoxSources {
35
+ positiveX: string;
36
+ negativeX: string;
37
+ positiveY: string;
38
+ negativeY: string;
39
+ positiveZ: string;
40
+ negativeZ: string;
41
+ }
42
+ interface ISkyBoxOptions {
43
+ viewer: Cesium.Viewer;
44
+ sources?: ISkyBoxSources;
45
+ }
46
+ interface ISkyBoxOnGroundOptions extends ISkyBoxOptions {
47
+ height?: number;
48
+ }
49
+ interface IYawPitchRoll {
50
+ yaw: number;
51
+ pitch: number;
52
+ roll: number;
53
+ offsetYaw?: number;
54
+ }
55
+
56
+ type types$4_DeepPartial<T> = DeepPartial<T>;
57
+ type types$4_ICamearView = ICamearView;
58
+ type types$4_ICesiumEventListener = ICesiumEventListener;
59
+ type types$4_ISetViewByLngLatOptions = ISetViewByLngLatOptions;
60
+ type types$4_ISetViewByPositionOptions = ISetViewByPositionOptions;
61
+ type types$4_ISkyBoxOnGroundOptions = ISkyBoxOnGroundOptions;
62
+ type types$4_ISkyBoxOptions = ISkyBoxOptions;
63
+ type types$4_ISkyBoxSources = ISkyBoxSources;
64
+ type types$4_IYawPitchRoll = IYawPitchRoll;
65
+ declare namespace types$4 {
66
+ export type { types$4_DeepPartial as DeepPartial, types$4_ICamearView as ICamearView, types$4_ICesiumEventListener as ICesiumEventListener, types$4_ISetViewByLngLatOptions as ISetViewByLngLatOptions, types$4_ISetViewByPositionOptions as ISetViewByPositionOptions, types$4_ISkyBoxOnGroundOptions as ISkyBoxOnGroundOptions, types$4_ISkyBoxOptions as ISkyBoxOptions, types$4_ISkyBoxSources as ISkyBoxSources, types$4_IYawPitchRoll as IYawPitchRoll };
67
+ }
68
+
69
+ /**
70
+ * 初始化Cesium
71
+ * @param eleId DOM元素ID
72
+ * @param options Viewer.ConstructorOptions
73
+ */
74
+ declare const initCesium: (eleId: string, options?: Cesium.Viewer.ConstructorOptions & {
75
+ token?: string;
76
+ }) => Cesium.Viewer;
77
+ /**
78
+ * 修改地球透明度
79
+ * @param value 0-1
80
+ * @param viewer
81
+ */
82
+ declare const setGlobeOpatity: (value: number, viewer: Cesium.Viewer) => void;
83
+ declare const setCesiumForAutoFitScale: (value: number) => void;
84
+ declare const getCesiumForAutoFitScale: () => number;
85
+ declare const DefaultViewerOptions: Cesium.Viewer.ConstructorOptions;
86
+
87
+ /**
88
+ * 设置中心点
89
+ * @param options.lng 精度
90
+ * @param options.lat 纬度
91
+ * @param options.height 高度
92
+ * @param options.viewer Cesium Viewer 实例
93
+ */
94
+ declare const setViewToLnglat: (options: ISetViewByLngLatOptions) => void;
95
+ /**
96
+ * 飞行至中心点
97
+ * @param options.lng 精度
98
+ * @param options.lat 纬度
99
+ * @param options.height 高度
100
+ * @param options.viewer Cesium Viewer 实例
101
+ */
102
+ declare const flyToLnglat: (options: ISetViewByLngLatOptions) => void;
103
+ /**
104
+ * 飞行至中心点
105
+ * @param options.lng 精度
106
+ * @param options.lat 纬度
107
+ * @param options.height 高度
108
+ * @param options.viewer Cesium Viewer 实例
109
+ */
110
+ declare const flyToPosition: (options: ISetViewByPositionOptions) => void;
111
+ /**
112
+ * 获取相机视图
113
+ * @param viewer
114
+ * @returns camearView
115
+ *
116
+ * camearView: {
117
+ * destination: Cartesian3,
118
+ * orientation: {
119
+ * heading: number
120
+ * pitch: number
121
+ * roll: number
122
+ * }
123
+ * }
124
+ */
125
+ declare function getCameraView(viewer: Cesium.Viewer): ICamearView;
126
+ /**
127
+ *
128
+ * @param camearView
129
+ * camearView: {
130
+ * destination: Cartesian3
131
+ * orientation: {
132
+ * heading: number
133
+ * pitch: number
134
+ * roll: number
135
+ * }
136
+ * }
137
+ * @param viewer
138
+ */
139
+ declare function flyToCameraView(camearView: ICamearView, viewer: Cesium.Viewer): void;
140
+ /**
141
+ * 飞行至数据源
142
+ * @param dataScourceId 数据源id
143
+ * @param viewer Cesium Viewer 实例
144
+ */
145
+ declare function flyToDataSource(dataScourceId: string, viewer: Cesium.Viewer): void;
146
+ /**
147
+ * 飞行至影像图层
148
+ * @param imagery 影像图层
149
+ * @param viewer Cesium Viewer 实例
150
+ */
151
+ declare function flyToImagery(imagery: Cesium.ImageryLayer, viewer: Cesium.Viewer): void;
152
+ /**
153
+ * 飞行至3dtile
154
+ * @param {}tileset 3dtile
155
+ * @param viewer Cesium Viewer 实例
156
+ */
157
+ declare function flyToCesium3DTile(tileset: Cesium.Cesium3DTileset, viewer: Cesium.Viewer): void;
158
+ /**
159
+ * 飞行至球体
160
+ * @param sphere 球体
161
+ * @param viewer
162
+ */
163
+ declare function flyToFromSphere(sphere: number[], viewer: Cesium.Viewer): void;
164
+ /**
165
+ * 闪烁模型
166
+ * @param model
167
+ */
168
+ declare function twinkleModel(model: any): void;
169
+
170
+ /**
171
+ * 初始化cesium事件
172
+ * @param viewer
173
+ * @param eventListener
174
+ */
175
+ declare const initCesiumEvent: (viewer: Cesium.Viewer, eventListener: ICesiumEventListener) => void;
176
+
177
+ declare const numberId: () => string;
178
+ declare const setInoCesiumBaseUrl: (url: string) => void;
179
+ declare const getInoCesiumBaseUrl: () => string;
180
+
181
+ declare class Tooltip {
182
+ static tooltip: Tooltip | null;
183
+ private _title;
184
+ private _div;
185
+ private _message;
186
+ constructor(viewer: Cesium.Viewer);
187
+ showAt(position: Cesium.Cartesian2, message: string): void;
188
+ setVisible(visible: boolean): void;
189
+ static createToolTip(viewer: Cesium.Viewer): Tooltip;
190
+ destroy(): void;
191
+ }
192
+
193
+ declare class Popup {
194
+ static popup: Popup | null;
195
+ private _div;
196
+ private viewer;
197
+ private offset;
198
+ private position;
199
+ constructor(viewer: Cesium.Viewer, element: HTMLElement, offset?: Cesium.Cartesian2);
200
+ showAt(position: Cesium.Cartesian3): void;
201
+ setVisible(visible: boolean): void;
202
+ renderPosition(): void;
203
+ static createPupup(viewer: Cesium.Viewer, element: HTMLElement, offset?: Cesium.Cartesian2): Popup;
204
+ destroy(): void;
205
+ }
206
+
207
+ // Note: as of the RFC 7946 version of GeoJSON, Coordinate Reference Systems
208
+ // are no longer supported. (See https://tools.ietf.org/html/rfc7946#appendix-B)}
209
+
210
+
211
+
212
+ /**
213
+ * The value values for the "type" property of GeoJSON Objects.
214
+ * https://tools.ietf.org/html/rfc7946#section-1.4
215
+ */
216
+ type GeoJsonTypes = GeoJSON$1["type"];
217
+
218
+ /**
219
+ * Bounding box
220
+ * https://tools.ietf.org/html/rfc7946#section-5
221
+ */
222
+ type BBox = [number, number, number, number] | [number, number, number, number, number, number];
223
+
224
+ /**
225
+ * A Position is an array of coordinates.
226
+ * https://tools.ietf.org/html/rfc7946#section-3.1.1
227
+ * Array should contain between two and three elements.
228
+ * The previous GeoJSON specification allowed more elements (e.g., which could be used to represent M values),
229
+ * but the current specification only allows X, Y, and (optionally) Z to be defined.
230
+ *
231
+ * Note: the type will not be narrowed down to `[number, number] | [number, number, number]` due to
232
+ * marginal benefits and the large impact of breaking change.
233
+ *
234
+ * See previous discussions on the type narrowing:
235
+ * - {@link https://github.com/DefinitelyTyped/DefinitelyTyped/pull/21590|Nov 2017}
236
+ * - {@link https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/67773|Dec 2023}
237
+ * - {@link https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/71441| Dec 2024}
238
+ *
239
+ * One can use a
240
+ * {@link https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates|user-defined type guard that returns a type predicate}
241
+ * to determine if a position is a 2D or 3D position.
242
+ *
243
+ * @example
244
+ * import type { Position } from 'geojson';
245
+ *
246
+ * type StrictPosition = [x: number, y: number] | [x: number, y: number, z: number]
247
+ *
248
+ * function isStrictPosition(position: Position): position is StrictPosition {
249
+ * return position.length === 2 || position.length === 3
250
+ * };
251
+ *
252
+ * let position: Position = [-116.91, 45.54];
253
+ *
254
+ * let x: number;
255
+ * let y: number;
256
+ * let z: number | undefined;
257
+ *
258
+ * if (isStrictPosition(position)) {
259
+ * // `tsc` would throw an error if we tried to destructure a fourth parameter
260
+ * [x, y, z] = position;
261
+ * } else {
262
+ * throw new TypeError("Position is not a 2D or 3D point");
263
+ * }
264
+ */
265
+ type Position = number[];
266
+
267
+ /**
268
+ * The base GeoJSON object.
269
+ * https://tools.ietf.org/html/rfc7946#section-3
270
+ * The GeoJSON specification also allows foreign members
271
+ * (https://tools.ietf.org/html/rfc7946#section-6.1)
272
+ * Developers should use "&" type in TypeScript or extend the interface
273
+ * to add these foreign members.
274
+ */
275
+ interface GeoJsonObject {
276
+ // Don't include foreign members directly into this type def.
277
+ // in order to preserve type safety.
278
+ // [key: string]: any;
279
+ /**
280
+ * Specifies the type of GeoJSON object.
281
+ */
282
+ type: GeoJsonTypes;
283
+ /**
284
+ * Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.
285
+ * The value of the bbox member is an array of length 2*n where n is the number of dimensions
286
+ * represented in the contained geometries, with all axes of the most southwesterly point
287
+ * followed by all axes of the more northeasterly point.
288
+ * The axes order of a bbox follows the axes order of geometries.
289
+ * https://tools.ietf.org/html/rfc7946#section-5
290
+ */
291
+ bbox?: BBox | undefined;
292
+ }
293
+
294
+ /**
295
+ * Union of GeoJSON objects.
296
+ */
297
+ type GeoJSON$1<G extends Geometry | null = Geometry, P = GeoJsonProperties> =
298
+ | G
299
+ | Feature<G, P>
300
+ | FeatureCollection<G, P>;
301
+
302
+ /**
303
+ * Geometry object.
304
+ * https://tools.ietf.org/html/rfc7946#section-3
305
+ */
306
+ type Geometry = Point | MultiPoint | LineString | MultiLineString | Polygon | MultiPolygon | GeometryCollection;
307
+
308
+ /**
309
+ * Point geometry object.
310
+ * https://tools.ietf.org/html/rfc7946#section-3.1.2
311
+ */
312
+ interface Point extends GeoJsonObject {
313
+ type: "Point";
314
+ coordinates: Position;
315
+ }
316
+
317
+ /**
318
+ * MultiPoint geometry object.
319
+ * https://tools.ietf.org/html/rfc7946#section-3.1.3
320
+ */
321
+ interface MultiPoint extends GeoJsonObject {
322
+ type: "MultiPoint";
323
+ coordinates: Position[];
324
+ }
325
+
326
+ /**
327
+ * LineString geometry object.
328
+ * https://tools.ietf.org/html/rfc7946#section-3.1.4
329
+ */
330
+ interface LineString extends GeoJsonObject {
331
+ type: "LineString";
332
+ coordinates: Position[];
333
+ }
334
+
335
+ /**
336
+ * MultiLineString geometry object.
337
+ * https://tools.ietf.org/html/rfc7946#section-3.1.5
338
+ */
339
+ interface MultiLineString extends GeoJsonObject {
340
+ type: "MultiLineString";
341
+ coordinates: Position[][];
342
+ }
343
+
344
+ /**
345
+ * Polygon geometry object.
346
+ * https://tools.ietf.org/html/rfc7946#section-3.1.6
347
+ */
348
+ interface Polygon extends GeoJsonObject {
349
+ type: "Polygon";
350
+ coordinates: Position[][];
351
+ }
352
+
353
+ /**
354
+ * MultiPolygon geometry object.
355
+ * https://tools.ietf.org/html/rfc7946#section-3.1.7
356
+ */
357
+ interface MultiPolygon extends GeoJsonObject {
358
+ type: "MultiPolygon";
359
+ coordinates: Position[][][];
360
+ }
361
+
362
+ /**
363
+ * Geometry Collection
364
+ * https://tools.ietf.org/html/rfc7946#section-3.1.8
365
+ */
366
+ interface GeometryCollection<G extends Geometry = Geometry> extends GeoJsonObject {
367
+ type: "GeometryCollection";
368
+ geometries: G[];
369
+ }
370
+
371
+ type GeoJsonProperties = { [name: string]: any } | null;
372
+
373
+ /**
374
+ * A feature object which contains a geometry and associated properties.
375
+ * https://tools.ietf.org/html/rfc7946#section-3.2
376
+ */
377
+ interface Feature<G extends Geometry | null = Geometry, P = GeoJsonProperties> extends GeoJsonObject {
378
+ type: "Feature";
379
+ /**
380
+ * The feature's geometry
381
+ */
382
+ geometry: G;
383
+ /**
384
+ * A value that uniquely identifies this feature in a
385
+ * https://tools.ietf.org/html/rfc7946#section-3.2.
386
+ */
387
+ id?: string | number | undefined;
388
+ /**
389
+ * Properties associated with this feature.
390
+ */
391
+ properties: P;
392
+ }
393
+
394
+ /**
395
+ * A collection of feature objects.
396
+ * https://tools.ietf.org/html/rfc7946#section-3.3
397
+ */
398
+ interface FeatureCollection<G extends Geometry | null = Geometry, P = GeoJsonProperties> extends GeoJsonObject {
399
+ type: "FeatureCollection";
400
+ features: Array<Feature<G, P>>;
401
+ }
402
+
403
+ /**
404
+ * 生成随机点输入geojosn 格式
405
+ * @param count 点数量
406
+ * @param lngRange 精度范围
407
+ * @param latRange 纬度范围
408
+ * @returns
409
+ */
410
+ declare const randomPointToGeoJson: (count: number, lngRange?: number[], latRange?: number[]) => FeatureCollection<Point, GeoJsonProperties>;
411
+ declare function randomColor(): string;
412
+ declare const randomPolylineToGeoJson: (count: number, lngRange?: number[], latRange?: number[]) => FeatureCollection<LineString, GeoJsonProperties>;
413
+ declare const randomPolygonToGeoJson: (count: number, lngRange?: number[], latRange?: number[]) => FeatureCollection<Polygon, GeoJsonProperties>;
414
+
415
+ /**
416
+ * 创建鹰眼图
417
+ * @param eleId
418
+ * @param mainViewer
419
+ */
420
+ declare const createEagleEye: (eleId: string, mainViewer: Cesium.Viewer) => {
421
+ viewer: Cesium.Viewer;
422
+ open: () => void;
423
+ close: () => void;
424
+ };
425
+
426
+ /**
427
+ * 计算空间距离
428
+ * @param {Cartesian3} start - 起始点
429
+ * @param {Cartesian3} end - 结束点
430
+ * @returns {number} - 两点之间的空间距离
431
+ */
432
+ declare const calcSpaceDistance: (start: Cesium.Cartesian3, end: Cesium.Cartesian3) => number;
433
+ /**
434
+ * 计算空间距离-多点
435
+ * @param {Cartesian3[]} positions - 点集
436
+ */
437
+ declare function calcSpaceDistances(positions: Cesium.Cartesian3[]): number;
438
+ /**
439
+ * 计算贴地距离-两点
440
+ * @param {Cartesian3} start - 起始点
441
+ * @param {Cartesian3} end - 结束点
442
+ * @param {ellipsoid} Cesium.Ellipsoid
443
+ */
444
+ declare function calcGeodesicDistance(start: Cesium.Cartesian3, end: Cesium.Cartesian3, ellipsoid?: Cesium.Ellipsoid): number;
445
+ /**
446
+ * 计算贴地距离-多点
447
+ * @param {Cartesian3[]} positions - 点集
448
+ * @returns {number} - 总距离
449
+ */
450
+ declare function calcGeodesicDistances(positions: Cesium.Cartesian3[]): number;
451
+ /**
452
+ * 计算质心
453
+ * turf Centroid
454
+ * @param {Cartesian3[]} positions - 点集
455
+ * @returns {Cartesian3} - 质心点
456
+ */
457
+ declare const calcPoistionCenter: (positions: Cesium.Cartesian3[]) => Cesium.Cartesian3;
458
+ /**
459
+ * 计算面积
460
+ * @param {Cartesian3[]} positions - 点集
461
+ * @returns {number} - 面积 单位:平方米
462
+ */
463
+ declare function calcArea(positions: Array<Cesium.Cartesian3>): number;
464
+ /**
465
+ * 计算三角形面积
466
+ * @param {Cartesian3} vertexA - 三角形顶点A
467
+ * @param {Cartesian3} vertexB - 三角形顶点B
468
+ * @param {Cartesian3} vertexC - 三角形顶点C
469
+ * @returns {number} - 三角形面积
470
+ */
471
+ declare const calcTriangleArea: (vertexA: Cesium.Cartesian3, vertexB: Cesium.Cartesian3, vertexC: Cesium.Cartesian3) => number;
472
+ /**
473
+ * 计算地形高度
474
+ * @param {TerrainProvider} terrainProvider - 地形提供者
475
+ * @param {Cartesian3[]} positions - 点集
476
+ * @returns {Cartesian3[]} - 地形高度点集
477
+ */
478
+ declare const calcTerrainHeightFromPositions: (terrainProvider: Cesium.TerrainProvider, positions: Cesium.Cartesian3[]) => Promise<Cesium.Cartographic[]>;
479
+ /**
480
+ * 计算场景高度
481
+ * @param {TerrainProvider} viewer
482
+ * @param {Cartesian3[]} positions - 点集
483
+ * @returns {Cartesian3[]} - 地形高度点集
484
+ */
485
+ declare const calcSceneHeightFromPositions: (viewer: Cesium.Viewer, positions: Cesium.Cartesian3[]) => Promise<Cesium.Cartesian3[]>;
486
+ /**
487
+ * 计算抛物线点集,
488
+ * @param {Cartesian3} startPoint - 开始节点
489
+ * @param {Cartesian3} endPoint - 结束节点
490
+ * @param {number} angularityFactor - 曲率
491
+ * @param {number} numOfSingleLine - 点集数量
492
+ * @returns {Cartesian3[]} - 点集
493
+ */
494
+ declare const clacPositionsForParabola: (startPoint: Cesium.Cartesian3, endPoint: Cesium.Cartesian3, angularityFactor: number, numOfSingleLine: number) => Cesium.Cartesian3[];
495
+ /**
496
+ * 计算缩放级别,
497
+ * 把当前相机高度转为缩放级别
498
+ * @param {Camera} camera - 相机
499
+ */
500
+ declare const calcZoomFromCameraHeight: (camera: Cesium.Camera) => number;
501
+ /**
502
+ * 计算相机高度
503
+ * 把缩放级别转为相机高度
504
+ * @无效
505
+ */
506
+ declare const calcCameraHeightFromZoom: (zoom: number) => number;
507
+ /**
508
+ * 计算插值点集
509
+ * @param positions Cartesian3[]
510
+ * @param number 插值点数量
511
+ * @returns Cartesian3[]
512
+ */
513
+ declare const calcLerpPosition: (positions: Cesium.Cartesian3[], number: number) => Cesium.Cartesian3[];
514
+
515
+ declare abstract class BasePrimitive<T> {
516
+ protected _primitive: CusPrimitive;
517
+ protected _promise: Promise<T>;
518
+ protected appearance: Cesium.Appearance | undefined;
519
+ protected geometryInstance: Cesium.Appearance | undefined;
520
+ protected drawCommand: any;
521
+ needUpdate: boolean;
522
+ constructor();
523
+ update(frameState: any): void;
524
+ then(onFulfilled?: any): Promise<T>;
525
+ catch(onRejected?: any): Promise<T>;
526
+ abstract getPrimitive(): CusPrimitive;
527
+ isDestroyed(): boolean;
528
+ destroy(): void;
529
+ }
530
+ type CusPrimitive = Cesium.Primitive | Cesium.GroundPrimitive | Cesium.PointPrimitiveCollection | Cesium.GroundPolylinePrimitive | Cesium.LabelCollection | Cesium.PrimitiveCollection | undefined;
531
+
532
+ /**
533
+ * 线材质基类
534
+ */
535
+ declare abstract class BaseMaterialProperty {
536
+ protected _definitionChanged: Cesium.Event<(...args: any[]) => void>;
537
+ get definitionChanged(): Cesium.Event<(...args: any[]) => void>;
538
+ get isConstant(): boolean;
539
+ abstract getType(): string;
540
+ abstract getValue(time: Cesium.JulianDate, result: any): any;
541
+ abstract equals(other: any): boolean;
542
+ abstract init(): void;
543
+ }
544
+
545
+ /**
546
+ * 把点集合转为顺时针
547
+ */
548
+ declare const makePositionsForClockwise: (positions: Cesium.Cartesian3[]) => Cesium.Cartesian3[];
549
+ /**
550
+ * 把点集合转为逆时针
551
+ */
552
+ declare const makePositionsForAntiClockwise: (positions: Cesium.Cartesian3[]) => Cesium.Cartesian3[];
553
+ /**
554
+ * 把笛卡尔坐标数组转为经纬度数组
555
+ */
556
+ declare const makePositionsToLnglats: (positions: Cesium.Cartesian3[]) => Cesium.Cartographic[];
557
+ /**
558
+ * 把笛卡尔坐标转为经纬度
559
+ */
560
+ declare const makePositiontoLnglat: (position: Cesium.Cartesian3) => Cesium.Cartographic;
561
+ /**
562
+ * 把经纬度数组转为笛卡尔坐标数组
563
+ */
564
+ declare const makeLnglatsToPositions: (lnglats: Cesium.Cartographic[]) => Cesium.Cartesian3[];
565
+ /**
566
+ * 把经纬度转为笛卡尔坐标
567
+ */
568
+ declare const makeLnglatToPosition: (lnglat: Cesium.Cartographic) => Cesium.Cartesian3;
569
+ /**
570
+ * 点集闭合成面 首位相接
571
+ */
572
+ declare const makePositionsClose: (positions: Cesium.Cartesian3[]) => Cesium.Cartesian3[];
573
+ /**
574
+ * 把经纬度数组转为点数据的geojson集合
575
+ * @param lnglats
576
+ * @returns GeoJSON.FeatureCollection
577
+ */
578
+ declare const makeLnglatsToPointGeojson: (lnglats: Cesium.Cartographic[]) => GeoJSON.FeatureCollection;
579
+ /**
580
+ * 把经纬度数组转为线数据的geojson集合
581
+ * @param lnglats
582
+ * @returns GeoJSON.FeatureCollection
583
+ */
584
+ declare const makeLnglatsToLineGeojson: (lnglats: Cesium.Cartographic[]) => GeoJSON.FeatureCollection;
585
+ /**
586
+ * 把经纬度数组转为面数据的geojson集合
587
+ * @param lnglats
588
+ * @returns GeoJSON.FeatureCollection
589
+ */
590
+ declare const makeLnglatsToPolygonGeojson: (lnglats: Cesium.Cartographic[]) => GeoJSON.FeatureCollection;
591
+ /**
592
+ * 把yawPitchRoll转为headingPitchRoll
593
+ * 航空中的参数和cesium中的参数有区别 角度转弧度
594
+ * @param yawPitchRoll
595
+ */
596
+ declare const makeYawPitchRollToHeadingPitchRoll: (yawPitchRoll: IYawPitchRoll) => {
597
+ heading: number;
598
+ pitch: number;
599
+ roll: number;
600
+ };
601
+
602
+ /**
603
+ * 创建天空盒
604
+ * @param options
605
+ */
606
+ declare const createSkyBox: (options: ISkyBoxOptions) => Cesium.SkyBox;
607
+ /**
608
+ * 创建近地天空盒
609
+ * @param options
610
+ */
611
+ declare const createSkyBoxOnGround: (options: ISkyBoxOnGroundOptions) => void;
612
+
613
+ /**
614
+ * 漫游控制器
615
+ * @param viewer Cesium Viewer
616
+ *
617
+ */
618
+ declare const createRoamHandler: (viewer: Cesium.Viewer) => IRoamHandler;
619
+ interface IRoamOptions {
620
+ /**
621
+ * 唯一id, 默认为随机生成
622
+ */
623
+ id?: string;
624
+ /**
625
+ * 漫游路径
626
+ */
627
+ positions: Cesium.Cartesian3[];
628
+ /**
629
+ * 飞行器参数
630
+ */
631
+ flyParams: {
632
+ /**
633
+ * 漫游时间数组 以时间计算飞行速度 数组长度必须与漫游路径点数组长度相同
634
+ * 与spped二者取其一 时间优先
635
+ */
636
+ times?: number[];
637
+ /**
638
+ * 漫游速度 公里/每小时
639
+ * 与times二者取其一
640
+ */
641
+ speed?: number;
642
+ /**
643
+ * 飞行器的heading pitch roll
644
+ */
645
+ hpr?: IRoamItemHPR[];
646
+ };
647
+ /**
648
+ * 漫游目标 可跟随物体和漫游路线设置
649
+ */
650
+ entity: Cesium.Entity;
651
+ /**
652
+ * 是否循环
653
+ */
654
+ loop: boolean;
655
+ /**
656
+ * 漫游目标属性信息
657
+ */
658
+ attrs?: any;
659
+ }
660
+ /**
661
+ * 漫游控制器
662
+ */
663
+ interface IRoamHandler {
664
+ set: (options: IRoamOptions) => IRoamItem;
665
+ /**
666
+ * 漫游目标跟随
667
+ * @param roamItem
668
+ * @param isLock 是否锁定视角
669
+ */
670
+ tracked: (roamItem: IRoamItem, isLock: boolean) => void;
671
+ /**
672
+ * 通过entityId 设置漫游目标跟随
673
+ * @param id
674
+ * @param isLock 是否锁定视角
675
+ */
676
+ trackedByEntityId: (id: string, isLock: boolean) => void;
677
+ /**
678
+ * 停止漫游目标跟随
679
+ */
680
+ stopTracked: () => void;
681
+ remove: (roamItem: IRoamItem) => void;
682
+ frameRoam: (roamItem: IRoamItem, time: Cesium.JulianDate) => void;
683
+ removeAll: () => void;
684
+ Event: IRoamEvent;
685
+ lockCameraView: (roamItem: IRoamItem) => void;
686
+ /**
687
+ * 更新漫游目标姿态
688
+ * @param roamItem
689
+ * @param flyAttitude
690
+ */
691
+ updateRoamAttitude: (roamItem: IRoamItem, flyAttitude: FlyAttitude) => void;
692
+ }
693
+ interface IRoamItem extends IRoamOptions {
694
+ /**
695
+ * 漫游路径
696
+ */
697
+ property: Cesium.SampledPositionProperty;
698
+ /**
699
+ * 开始时间
700
+ */
701
+ startTime: Cesium.JulianDate | undefined;
702
+ /**
703
+ * 结束时间
704
+ */
705
+ stopTime: Cesium.JulianDate | undefined;
706
+ /**
707
+ * 漫游状态
708
+ */
709
+ status: RoamStatus;
710
+ }
711
+ interface IRoaming {
712
+ time: Cesium.JulianDate;
713
+ position: Cesium.Cartesian3 | undefined;
714
+ }
715
+ interface IRoamEvent {
716
+ /**
717
+ * 漫游开始
718
+ * @param roamItem
719
+ */
720
+ start?: (roamItem: IRoamItem) => void;
721
+ /**
722
+ * 漫游重新开始 调用reStart方法时或触发循环式触发
723
+ * @param roamItem
724
+ */
725
+ reStart?: (roamItem: IRoamItem) => void;
726
+ /**
727
+ * 漫游中
728
+ * @param roamItem
729
+ * @param roaming
730
+ */
731
+ roaming?: (roamItem: IRoamItem, roaming: IRoaming) => void;
732
+ /**
733
+ * 漫游结束
734
+ * @param roamItem
735
+ */
736
+ end?: (roamItem: IRoamItem) => void;
737
+ }
738
+ declare enum FlyAttitude {
739
+ UP = "UP",
740
+ DOWN = "DOWN",
741
+ LEFT = "left",
742
+ RIGHT = "right",
743
+ FRONT = "front",
744
+ BACK = "back"
745
+ }
746
+ declare enum RoamStatus {
747
+ END = "END",
748
+ START = "START",
749
+ ROAMING = "ROAMING"
750
+ }
751
+ interface IRoamItemHPR {
752
+ time: number;
753
+ heading: number;
754
+ pitch: number;
755
+ roll: number;
756
+ }
757
+
758
+ declare const createBottomStatusBar: (options: IBottomStatusBarOptions) => void;
759
+ interface IBottomStatusBarOptions {
760
+ viewer: Cesium.Viewer;
761
+ /**
762
+ * 显示方向角、俯仰角、侧翻角
763
+ */
764
+ hpr?: boolean;
765
+ /**
766
+ * 开启点击复制
767
+ * 复制当前中心经纬度和高度,相机视角
768
+ */
769
+ clickCopy?: boolean;
770
+ }
771
+
772
+ declare const createOpenAnim: (options: IOpenAnimOptions) => Promise<unknown>;
773
+ interface IOpenAnimOptions {
774
+ viewer: Cesium.Viewer;
775
+ center: {
776
+ lat: number;
777
+ lng: number;
778
+ height: number;
779
+ };
780
+ }
781
+
782
+ /**
783
+ * 网格8个顶点生成盒子面
784
+ * @param cartesianVertices 8个顶点
785
+ * @param color 网格颜色
786
+ * @param gridId 网格id
787
+ */
788
+ declare const makeGridToInstanceForBox: (cartesianVertices: any, color: Cesium.Color, gridId: string) => Cesium.GeometryInstance;
789
+ /**
790
+ * 网格8个顶点生成盒子边线
791
+ * @param cartesianVertices 8个顶点
792
+ * @param color 网格颜色
793
+ * @param gridId 网格id
794
+ */
795
+ declare const makeGridToInstanceForLine: (cartesianVertices: any, color: Cesium.Color, gridId: string) => Cesium.GeometryInstance;
796
+ /**
797
+ * 使用顶点极值创建盒子的八个点
798
+ * @param maxPoint
799
+ * @param minPoint
800
+ */
801
+ declare const makeGridFromElevationExtrema: (maxPoint: Cesium.Cartographic, minPoint: Cesium.Cartographic) => Cesium.Cartesian3[];
802
+ /**
803
+ * 使用底面和高度创建网格
804
+ * @param topLeft
805
+ * @param topRight
806
+ * @param bottomRight
807
+ * @param bottomLeft
808
+ * @param minHeight
809
+ * @param maxHeight
810
+ */
811
+ declare const mekeGridPolygonAndHeight: (topLeft: number, topRight: number, bottomRight: number, bottomLeft: number, minHeight: number, maxHeight: number) => Cesium.Cartesian3[];
812
+
813
+ /**
814
+ * 坐标转换工具库 - 实现了WGS84、GCJ02(火星坐标)和BD09(百度坐标)之间的相互转换
815
+ */
816
+ /**
817
+ * 坐标点接口定义
818
+ */
819
+ interface CoordinatePoint {
820
+ lng: number;
821
+ lat: number;
822
+ }
823
+ /**
824
+ * 坐标转换工具类
825
+ */
826
+ declare class CoordinateTransformer {
827
+ /**
828
+ * WGS84坐标转换为GCJ02坐标
829
+ * @param point WGS84坐标点
830
+ * @returns GCJ02坐标点
831
+ */
832
+ static wgs84ToGcj02(point: CoordinatePoint): CoordinatePoint;
833
+ /**
834
+ * GCJ02坐标转换为WGS84坐标
835
+ * @param point GCJ02坐标点
836
+ * @returns WGS84坐标点
837
+ */
838
+ static gcj02ToWgs84(point: CoordinatePoint): CoordinatePoint;
839
+ /**
840
+ * GCJ02坐标转换为BD09坐标
841
+ * @param point GCJ02坐标点
842
+ * @returns BD09坐标点
843
+ */
844
+ static gcj02ToBd09(point: CoordinatePoint): CoordinatePoint;
845
+ /**
846
+ * BD09坐标转换为GCJ02坐标
847
+ * @param point BD09坐标点
848
+ * @returns GCJ02坐标点
849
+ */
850
+ static bd09ToGcj02(point: CoordinatePoint): CoordinatePoint;
851
+ /**
852
+ * BD09坐标转换为WGS84坐标
853
+ * @param point BD09坐标点
854
+ * @returns WGS84坐标点
855
+ */
856
+ static bd09ToWgs84(point: CoordinatePoint): CoordinatePoint;
857
+ /**
858
+ * WGS84坐标转换为BD09坐标
859
+ * @param point WGS84坐标点
860
+ * @returns BD09坐标点
861
+ */
862
+ static wgs84ToBd09(point: CoordinatePoint): CoordinatePoint;
863
+ }
864
+
865
+ /**
866
+ *
867
+ * vec:矢量底图、cva:矢量标注、img:影像底图、cia:影像标注
868
+ * ter:地形晕渲、cta:地形标注、eva:矢量英文标注、eia:影像英文标注
869
+ * @param viewer
870
+ * @param token
871
+ */
872
+ declare const loadTianDiTu: (option: ILoadTiandituOptions) => {
873
+ layers: Cesium.ImageryLayer[];
874
+ remove: () => void;
875
+ };
876
+ interface ILoadTiandituOptions {
877
+ viewer: Cesium.Viewer;
878
+ token: string;
879
+ zIndex?: number;
880
+ }
881
+
882
+ declare const load3dTiles: (lOptions: ILoad3dtilesOptions) => Promise<{
883
+ tileset: Cesium.Cesium3DTileset;
884
+ setHeightOffset: (heightOffset: number) => void;
885
+ remove: () => void;
886
+ flyTo: () => void;
887
+ }>;
888
+ /**
889
+ * 设置3dTiles的偏移高度
890
+ * @param tileset
891
+ * @param heightOffset
892
+ */
893
+ declare const setHeightOffsetFor3dTiles: (tileset: Cesium.Cesium3DTileset, heightOffset: number) => void;
894
+ declare const getAllFeaturesFrom3dTiles: (tileset: Cesium.Cesium3DTileset) => Promise<unknown>;
895
+ declare const getAllTilesFrom3dTiles: (tileset: Cesium.Cesium3DTileset) => Promise<unknown>;
896
+ interface ILoad3dtilesOptions {
897
+ viewer: Cesium.Viewer;
898
+ url: string;
899
+ options: Cesium.Cesium3DTileset.ConstructorOptions;
900
+ }
901
+ /**
902
+ * 3dTiles的坐标变换
903
+ * 平移、缩放、旋转
904
+ */
905
+ declare const TransformsFor3dtiles: {
906
+ translate: (tileset: Cesium.Cesium3DTileset, translate: Cesium.Cartesian3) => void;
907
+ scale: (tileset: Cesium.Cesium3DTileset, scale: Cesium.Cartesian3) => void;
908
+ rotate: (tileset: Cesium.Cesium3DTileset, rotate: Cesium.Cartesian3) => void;
909
+ };
910
+
911
+ /**
912
+ * 加载地形
913
+ * @param url 地形地址
914
+ */
915
+ declare const loadTerrain: (options: ILoadTerrainOptions) => Promise<{
916
+ terrainProvider: Cesium.CesiumTerrainProvider;
917
+ remove: () => void;
918
+ }>;
919
+ /**
920
+ * 移除地形
921
+ * @param viewer
922
+ */
923
+ declare const removeTerrain: (viewer: Cesium.Viewer) => void;
924
+ declare const loadTerrainFromCesium: () => Promise<Cesium.CesiumTerrainProvider>;
925
+ interface ILoadTerrainOptions {
926
+ viewer: Cesium.Viewer;
927
+ url: string;
928
+ }
929
+
930
+ declare const loadModel: () => void;
931
+
932
+ /**
933
+ * 加载超图s3m图层
934
+ * 先配置插件地址
935
+ */
936
+ declare const loads3m: () => void;
937
+
938
+ declare const loadI3s: (lOptions: ILoadI3sOptions) => Promise<{
939
+ i3sData: Cesium.I3SDataProvider;
940
+ setHeightOffset: (heightOffset: number) => void;
941
+ remove: () => void;
942
+ flyTo: () => void;
943
+ }>;
944
+ interface ILoadI3sOptions {
945
+ viewer: Cesium.Viewer;
946
+ url: string;
947
+ options: Cesium.I3SDataProvider.ConstructorOptions;
948
+ }
949
+
950
+ declare const createHighLightStage: (viewer: Cesium.Viewer, color?: Cesium.Color) => {
951
+ stage: Cesium.PostProcessStage | Cesium.PostProcessStageComposite;
952
+ remove: () => void;
953
+ };
954
+ interface IHighLightStageOptions {
955
+ viewer: Cesium.Viewer;
956
+ color?: Cesium.Color;
957
+ }
958
+
959
+ declare const createSkylineStage: (viewer: Cesium.Viewer) => {
960
+ stage: Cesium.PostProcessStageComposite;
961
+ remove: () => void;
962
+ };
963
+
964
+ declare const createOutlineStage: (viewer: Cesium.Viewer, color?: Cesium.Color) => {
965
+ stage: Cesium.PostProcessStage | Cesium.PostProcessStageComposite;
966
+ remove: () => void;
967
+ };
968
+
969
+ declare const createSnowCoverStage: (options: ISnowCoverStageOptions) => {
970
+ stage: Cesium.PostProcessStage;
971
+ remove: () => void;
972
+ };
973
+ interface ISnowCoverStageOptions {
974
+ /**
975
+ * 应用积雪效果的 Cesium Viewer 实例。
976
+ */
977
+ viewer: Cesium.Viewer;
978
+ /**
979
+ * 要应用积雪效果的模型。
980
+ */
981
+ selected?: [];
982
+ /**
983
+ * 控制积雪效果的强度。
984
+ * 如果未提供,默认值为 0.8。
985
+ */
986
+ intensity?: number;
987
+ }
988
+
989
+ /**
990
+ * 创建下雪特效
991
+ * @param options.viewer
992
+ * @param options.scale 雪的密度
993
+ * @param options.speed 雪的移动速度
994
+ */
995
+ declare const createSnowStage: (options: ISnowStageOptions) => {
996
+ stage: Cesium.PostProcessStage | Cesium.PostProcessStageComposite;
997
+ remove: () => void;
998
+ };
999
+ /**
1000
+ * 下雪特效参数
1001
+ */
1002
+ interface ISnowStageOptions {
1003
+ viewer: Cesium.Viewer;
1004
+ /**
1005
+ * 雪的密度
1006
+ */
1007
+ scale?: number;
1008
+ /**
1009
+ * 雪的移动速度
1010
+ */
1011
+ speed?: number;
1012
+ }
1013
+
1014
+ declare const createHeightFogStage: (options: IHeightFogStageOptions) => {
1015
+ stage: Cesium.PostProcessStage | Cesium.PostProcessStageComposite;
1016
+ remove: () => void;
1017
+ };
1018
+ interface IHeightFogStageOptions {
1019
+ viewer: Cesium.Viewer;
1020
+ height?: number;
1021
+ alpha?: number;
1022
+ EPSILON12?: number;
1023
+ centerToleranceSquared?: number;
1024
+ oneOverRadii?: number;
1025
+ oneOverRadiiSquared?: number;
1026
+ }
1027
+
1028
+ declare const createFogStage: (options: IFogStageOptions) => {
1029
+ stage: Cesium.PostProcessStage | Cesium.PostProcessStageComposite;
1030
+ remove: () => void;
1031
+ };
1032
+ interface IFogStageOptions {
1033
+ viewer: Cesium.Viewer;
1034
+ fogColor?: Cesium.Color;
1035
+ fogByDistance?: Cesium.Cartesian4;
1036
+ }
1037
+
1038
+ declare const createBloomTargetStage: (viewer: Cesium.Viewer) => {
1039
+ stage: Cesium.PostProcessStage | Cesium.PostProcessStageComposite;
1040
+ remove: () => void;
1041
+ };
1042
+
1043
+ declare const createRainStage: (options: IRainStageOptions) => {
1044
+ stage: Cesium.PostProcessStage | Cesium.PostProcessStageComposite;
1045
+ remove: () => void;
1046
+ };
1047
+ interface IRainStageOptions {
1048
+ viewer: Cesium.Viewer;
1049
+ speed?: number;
1050
+ size?: number;
1051
+ direction?: number;
1052
+ }
1053
+
1054
+ declare const createRainCoverStage: (options: IRainCoverStage) => {
1055
+ stage: Cesium.PostProcessStage;
1056
+ remove: () => void;
1057
+ };
1058
+ interface IRainCoverStage {
1059
+ viewer: Cesium.Viewer;
1060
+ }
1061
+
1062
+ /**
1063
+ * 创建闪电特效
1064
+ * @param options
1065
+ */
1066
+ declare const createLightningStage: (options: ILightningStageOptions) => {
1067
+ stage: Cesium.PostProcessStage | Cesium.PostProcessStageComposite;
1068
+ remove: () => void;
1069
+ };
1070
+ interface ILightningStageOptions {
1071
+ viewer: Cesium.Viewer;
1072
+ /**
1073
+ * 混合系数0-1之间的数
1074
+ */
1075
+ mixFactor?: number;
1076
+ /**
1077
+ * 时间间隔 0-1之间的数
1078
+ */
1079
+ fallInterval?: number;
1080
+ }
1081
+
1082
+ declare const createLightBandCustomShader: (options: ILightBandStageOptions) => Cesium.CustomShader;
1083
+ interface ILightBandStageOptions {
1084
+ /**
1085
+ * 建筑最高值,用于计算光带的位置比例
1086
+ */
1087
+ maxValue?: number;
1088
+ /**
1089
+ * 建筑最低值,用于计算光带的位置比例
1090
+ */
1091
+ minValue?: number;
1092
+ /**
1093
+ * 建筑颜色
1094
+ */
1095
+ color?: Cesium.Color;
1096
+ /**
1097
+ * 光带的移动速度 默认为1 越大越慢
1098
+ */
1099
+ speed?: number;
1100
+ /**
1101
+ * 光带的宽度 默认为1 越大越宽
1102
+ */
1103
+ lineWidth?: number;
1104
+ }
1105
+
1106
+ declare const createDroneAnimCustomShader: (options: IDroneAnimOptions) => Cesium.CustomShader;
1107
+ interface IDroneAnimOptions {
1108
+ /**
1109
+ * 颜色
1110
+ */
1111
+ color?: Cesium.Color;
1112
+ }
1113
+
1114
+ declare const createOutLineEffect: (viewer: Cesium.Viewer) => {
1115
+ stage: Cesium.PostProcessStage | Cesium.PostProcessStageComposite;
1116
+ remove: () => void;
1117
+ };
1118
+
1119
+ declare class MeasurePrimitive extends BasePrimitive<any> {
1120
+ private drawData;
1121
+ private labelCollection;
1122
+ private measureDivs;
1123
+ private cesiumWidget;
1124
+ private viewer;
1125
+ constructor(drawData: IDrawAttrInfo, viewer: Cesium.Viewer);
1126
+ getPrimitive(): Cesium.LabelCollection | undefined;
1127
+ updateUnit(unit: string[]): void;
1128
+ updatePointDivLabel(): void;
1129
+ renderDivPosition(): void;
1130
+ destroy(): void;
1131
+ setAppearance(): void;
1132
+ clearAllDiv(): void;
1133
+ createDiv(key: string, text: string, height?: number): HTMLDivElement;
1134
+ }
1135
+
1136
+ /**
1137
+ * 绘制事件类型
1138
+ */
1139
+ declare enum DrawEventType {
1140
+ /**
1141
+ * 绘制添加事件
1142
+ */
1143
+ DRAW_ADD = "drawAdd",
1144
+ /**
1145
+ * 绘制移动事件
1146
+ */
1147
+ DRAW_MOVE = "drawMove",
1148
+ /**
1149
+ * 绘制拾取事件
1150
+ */
1151
+ DRAW_PICK = "drawPick",
1152
+ /**
1153
+ * 绘制双击事件
1154
+ */
1155
+ DRAW_DB_CLICK = "drawDbClick",
1156
+ /**
1157
+ * 绘制右键点击事件
1158
+ */
1159
+ DRAW_RIGHT_CLICK = "drawRightClick"
1160
+ }
1161
+ /**
1162
+ * 绘制事件处理函数类型
1163
+ * @param type 事件类型
1164
+ * @param data 事件数据
1165
+ */
1166
+ type DrawEvent = (type: string, data: any) => void;
1167
+ /**
1168
+ * 绘制处理器事件接口
1169
+ */
1170
+ interface IDrawHandlerEvent {
1171
+ /**
1172
+ * 绘制开始事件
1173
+ * @param drawData 绘制属性信息
1174
+ */
1175
+ drawStart?: (drawData: IDrawAttrInfo) => void;
1176
+ /**
1177
+ * 绘制结束事件
1178
+ * @param drawData 绘制属性信息
1179
+ */
1180
+ drawEnd?: (drawData: IDrawAttrInfo) => void;
1181
+ /**
1182
+ * 绘制添加事件
1183
+ * @param positions 绘制点的位置数组
1184
+ * @param drawData 绘制属性信息
1185
+ */
1186
+ drawAdd?: (positions: Cesium.Cartesian3, drawData: IDrawAttrInfo) => void;
1187
+ /**
1188
+ * 绘制移动事件
1189
+ * @param positions 绘制点的位置数组
1190
+ * @param drawData 绘制属性信息
1191
+ */
1192
+ drawMove?: (positions: Cesium.Cartesian3, drawData: IDrawAttrInfo) => void;
1193
+ /**
1194
+ * 绘制编辑开始事件
1195
+ * @param drawData 绘制属性信息
1196
+ */
1197
+ drawEditStart?: (drawData: IDrawAttrInfo) => void;
1198
+ /**
1199
+ * 绘制编辑结束事件
1200
+ * @param drawData 绘制属性信息
1201
+ */
1202
+ drawEditEnd?: (drawData: IDrawAttrInfo) => void;
1203
+ /**
1204
+ * 绘制移除事件
1205
+ * @param drawData 绘制属性信息
1206
+ */
1207
+ drawRemove?: (drawData: IDrawAttrInfo) => void;
1208
+ }
1209
+ /**
1210
+ * 绘制属性信息接口
1211
+ */
1212
+ interface IDrawAttrInfo {
1213
+ /**
1214
+ * 绘制对象的唯一标识符
1215
+ */
1216
+ id: string;
1217
+ /**
1218
+ * 是否可编辑
1219
+ */
1220
+ edit: boolean;
1221
+ /**
1222
+ * 是否测量
1223
+ */
1224
+ measure: boolean;
1225
+ /**
1226
+ * 是否显示测量标签
1227
+ */
1228
+ measureLabel: boolean;
1229
+ /**
1230
+ * 测量单位数组
1231
+ */
1232
+ measureUnit: string[];
1233
+ /**
1234
+ * 是否正在编辑
1235
+ */
1236
+ isEditing?: boolean;
1237
+ /**
1238
+ * 是否禁止添加
1239
+ */
1240
+ isDisAdd?: boolean;
1241
+ /**
1242
+ * 是否禁用深度测试
1243
+ */
1244
+ disDepthFail?: boolean;
1245
+ /**
1246
+ * 绘制形状
1247
+ */
1248
+ shape: DrawShape;
1249
+ /**
1250
+ * 是否贴地
1251
+ */
1252
+ clampToGround?: boolean;
1253
+ /**
1254
+ * 绘制点的位置数组
1255
+ */
1256
+ positions: Cesium.Cartesian3[];
1257
+ /**
1258
+ * 形状点的位置数组
1259
+ */
1260
+ shapePositions?: Cesium.Cartesian3[];
1261
+ /**
1262
+ * 点图元集合
1263
+ */
1264
+ pointPrimitives: Cesium.PointPrimitiveCollection;
1265
+ /**
1266
+ * 测量图元集合
1267
+ */
1268
+ measurePrimitive?: MeasurePrimitive;
1269
+ /**
1270
+ * 图元集合
1271
+ */
1272
+ primitives: Cesium.PrimitiveCollection;
1273
+ /**
1274
+ * 测量结果数组
1275
+ */
1276
+ measureResult?: IMeasureResult[];
1277
+ }
1278
+ /**
1279
+ * 事件动作类型
1280
+ */
1281
+ type IEventActions = {
1282
+ [key in DrawEventType]: (data: IEventData) => void;
1283
+ };
1284
+ /**
1285
+ * 事件数据接口
1286
+ */
1287
+ interface IEventData {
1288
+ /**
1289
+ * 事件位置
1290
+ */
1291
+ position: Cesium.Cartesian3;
1292
+ /**
1293
+ * 拾取的图元
1294
+ */
1295
+ pickPrimitive?: Cesium.Primitive;
1296
+ /**
1297
+ * 窗口位置
1298
+ */
1299
+ windowPosition: Cesium.Cartesian2;
1300
+ }
1301
+ /**
1302
+ * 绘制处理器接口
1303
+ */
1304
+ interface IDrawHandler {
1305
+ /**
1306
+ * 开始绘制
1307
+ */
1308
+ draw: (options: IDrawOptions) => void;
1309
+ /**
1310
+ * 移除方法
1311
+ * @param drawData 绘制属性信息
1312
+ */
1313
+ remove: (drawData: IDrawAttrInfo) => void;
1314
+ /**
1315
+ * 移除所有方法
1316
+ */
1317
+ removeAll: () => void;
1318
+ /**
1319
+ * 更新测量单位方法
1320
+ * @param drawData 绘制属性信息
1321
+ * @param measureUnit 测量单位数组
1322
+ */
1323
+ updateMeasureUnit: (drawData: IDrawAttrInfo, measureUnit: string[]) => void;
1324
+ /**
1325
+ * 设置绘制样式方法
1326
+ * @param drawStyle 绘制样式
1327
+ */
1328
+ setDrawStyle: (drawStyle: DeepPartial<IDrawStyle>) => void;
1329
+ /**
1330
+ * 事件处理器
1331
+ */
1332
+ Event: IDrawHandlerEvent;
1333
+ }
1334
+ /**
1335
+ * 绘制选项接口
1336
+ */
1337
+ interface IDrawOptions {
1338
+ /**
1339
+ * 绘制形状
1340
+ */
1341
+ shape: DrawShape;
1342
+ /**
1343
+ * 是否可编辑
1344
+ */
1345
+ edit?: boolean;
1346
+ /**
1347
+ * 是否测量
1348
+ */
1349
+ measure?: boolean;
1350
+ /**
1351
+ * 测量单位数组
1352
+ */
1353
+ measureUnit?: string[];
1354
+ /**
1355
+ * 是否显示测量标签
1356
+ */
1357
+ measureLabel?: boolean;
1358
+ /**
1359
+ * 是否贴地
1360
+ */
1361
+ clampToGround?: boolean;
1362
+ /**
1363
+ * 是否禁用深度
1364
+ */
1365
+ disDepthFail?: boolean;
1366
+ /**
1367
+ * 绘制样式
1368
+ */
1369
+ drawStyle?: DeepPartial<IDrawStyle>;
1370
+ }
1371
+ /**
1372
+ * 测量选项接口
1373
+ */
1374
+ interface IMeasureOptions extends IDrawOptions {
1375
+ /**
1376
+ * 是否测量
1377
+ */
1378
+ measure?: boolean;
1379
+ /**
1380
+ * 测量单位数组
1381
+ */
1382
+ measureUnit?: string[];
1383
+ /**
1384
+ * 是否显示测量标签
1385
+ */
1386
+ measureLabel?: boolean;
1387
+ }
1388
+ /**
1389
+ * 绘制编辑事件接口
1390
+ */
1391
+ interface IDrawEditEvent {
1392
+ /**
1393
+ * 绘制编辑添加事件
1394
+ * @param pointPrimitive 点图元
1395
+ */
1396
+ drawEditAdd: (pointPrimitive: Cesium.PointPrimitive) => void;
1397
+ /**
1398
+ * 绘制编辑移动事件
1399
+ * @param pointPrimitive 点图元
1400
+ */
1401
+ drawEditMove: (pointPrimitive: Cesium.PointPrimitive) => void;
1402
+ /**
1403
+ * 绘制编辑移除事件
1404
+ * @param pointPrimitive 点图元
1405
+ */
1406
+ drawEditRemove: (pointPrimitive: Cesium.PointPrimitive) => void;
1407
+ /**
1408
+ * 绘制删除事件
1409
+ * @param pointPrimitive 点图元
1410
+ */
1411
+ drawDelete: (pointPrimitive: Cesium.PointPrimitive) => void;
1412
+ }
1413
+ /**
1414
+ * 测量结果接口
1415
+ */
1416
+ interface IMeasureResult {
1417
+ /**
1418
+ * 测量值
1419
+ */
1420
+ value: number;
1421
+ /**
1422
+ * 测量单位
1423
+ */
1424
+ unit: string;
1425
+ /**
1426
+ * 测量位置
1427
+ */
1428
+ position: Cesium.Cartesian3;
1429
+ /**
1430
+ * 测量点的位置数组
1431
+ */
1432
+ positions: Cesium.Cartesian3[];
1433
+ /**
1434
+ * 前缀文本,默认为空 用来做测量标识
1435
+ */
1436
+ prefixText?: string;
1437
+ }
1438
+ /**
1439
+ * 绘制形状类型
1440
+ */
1441
+ type DrawShape = 'polyline' | 'polygon' | 'point' | 'circle' | 'rectangle' | 'vertical-line' | 'vertical-surface-line';
1442
+ /**
1443
+ * 绘制样式接口
1444
+ */
1445
+ interface IDrawStyle {
1446
+ /**
1447
+ * 点样式
1448
+ */
1449
+ point: {
1450
+ /**
1451
+ * 点颜色
1452
+ */
1453
+ color: string;
1454
+ /**
1455
+ * 点像素大小
1456
+ */
1457
+ pixelSize: number;
1458
+ /**
1459
+ * 点轮廓颜色
1460
+ */
1461
+ outlineColor: string;
1462
+ /**
1463
+ * 点轮廓宽度
1464
+ */
1465
+ outlineWidth: number;
1466
+ /**
1467
+ * 禁用深度测试距离
1468
+ */
1469
+ disableDepthTestDistance?: number;
1470
+ };
1471
+ /**
1472
+ * 折线样式
1473
+ */
1474
+ polyline: {
1475
+ /**
1476
+ * 折线宽度
1477
+ */
1478
+ width: number;
1479
+ /**
1480
+ * 折线颜色
1481
+ */
1482
+ color: string;
1483
+ /**
1484
+ * 深度失败颜色
1485
+ */
1486
+ depthFailColor: string;
1487
+ };
1488
+ /**
1489
+ * 多边形样式
1490
+ */
1491
+ polygon: {
1492
+ /**
1493
+ * 多边形颜色
1494
+ */
1495
+ color: string;
1496
+ /**
1497
+ * 深度失败颜色
1498
+ */
1499
+ depthFailColor: string;
1500
+ };
1501
+ }
1502
+
1503
+ type types$3_DrawEvent = DrawEvent;
1504
+ type types$3_DrawEventType = DrawEventType;
1505
+ declare const types$3_DrawEventType: typeof DrawEventType;
1506
+ type types$3_DrawShape = DrawShape;
1507
+ type types$3_IDrawAttrInfo = IDrawAttrInfo;
1508
+ type types$3_IDrawEditEvent = IDrawEditEvent;
1509
+ type types$3_IDrawHandler = IDrawHandler;
1510
+ type types$3_IDrawHandlerEvent = IDrawHandlerEvent;
1511
+ type types$3_IDrawOptions = IDrawOptions;
1512
+ type types$3_IDrawStyle = IDrawStyle;
1513
+ type types$3_IEventActions = IEventActions;
1514
+ type types$3_IEventData = IEventData;
1515
+ type types$3_IMeasureOptions = IMeasureOptions;
1516
+ type types$3_IMeasureResult = IMeasureResult;
1517
+ declare namespace types$3 {
1518
+ export { types$3_DrawEventType as DrawEventType };
1519
+ export type { types$3_DrawEvent as DrawEvent, types$3_DrawShape as DrawShape, types$3_IDrawAttrInfo as IDrawAttrInfo, types$3_IDrawEditEvent as IDrawEditEvent, types$3_IDrawHandler as IDrawHandler, types$3_IDrawHandlerEvent as IDrawHandlerEvent, types$3_IDrawOptions as IDrawOptions, types$3_IDrawStyle as IDrawStyle, types$3_IEventActions as IEventActions, types$3_IEventData as IEventData, types$3_IMeasureOptions as IMeasureOptions, types$3_IMeasureResult as IMeasureResult };
1520
+ }
1521
+
1522
+ /**
1523
+ * 创建绘制工具
1524
+ * @param viewer
1525
+ */
1526
+ declare const createDrawHandler: (viewer: Cesium.Viewer) => IDrawHandler;
1527
+
1528
+ interface IPolylineTrailMaterialOptions {
1529
+ name?: string;
1530
+ color?: string;
1531
+ speed?: number;
1532
+ image: string;
1533
+ }
1534
+ interface IPolylineFlowMaterialOptions {
1535
+ /**
1536
+ * 颜色
1537
+ */
1538
+ color?: string;
1539
+ speed?: number;
1540
+ image: string;
1541
+ repeatCount?: number;
1542
+ blendColor?: boolean;
1543
+ }
1544
+ interface ICircleWaveMaterialOptions {
1545
+ name?: string;
1546
+ color?: string;
1547
+ speed?: number;
1548
+ count?: number;
1549
+ gradient?: number;
1550
+ }
1551
+ interface ICircleRaderWaveMaterialOptions {
1552
+ name?: string;
1553
+ color?: string;
1554
+ speed?: number;
1555
+ }
1556
+ interface ICircleRaderFanMaterialOptions {
1557
+ name?: string;
1558
+ color?: string;
1559
+ speed?: number;
1560
+ }
1561
+ interface ICircleApertureMaterialOptions {
1562
+ color?: string;
1563
+ /**
1564
+ * 速度
1565
+ */
1566
+ speed?: number;
1567
+ }
1568
+ interface ILightWallMaterialOptions {
1569
+ image: string;
1570
+ color?: string;
1571
+ count?: number;
1572
+ /**
1573
+ * 时间 单位为秒
1574
+ */
1575
+ duration?: number;
1576
+ /**
1577
+ * 0为水平 1为垂直 默认为1
1578
+ */
1579
+ vertical?: number;
1580
+ /**
1581
+ * 1由下到上 0由上到下 默认为0
1582
+ */
1583
+ direction?: number;
1584
+ }
1585
+ /**
1586
+ * 电弧球体
1587
+ */
1588
+ interface IEllipsoidElectricMaterialOptions {
1589
+ color?: string;
1590
+ /**
1591
+ * 速度
1592
+ */
1593
+ speed?: number;
1594
+ }
1595
+ /**
1596
+ * 扫描球体
1597
+ */
1598
+ interface IEllipsoidScanMaterialOptions {
1599
+ color?: string;
1600
+ /**
1601
+ * 速度
1602
+ */
1603
+ speed?: number;
1604
+ }
1605
+ /**
1606
+ * 雷达扫描材质
1607
+ * @param selectColor 选中颜色
1608
+ * @param bgColor 背景颜色
1609
+ * @param width 宽度
1610
+ * @param count 光圈个数
1611
+ * @param offset 光晕偏移量
1612
+ */
1613
+ interface IRadarScanMaterialOptions {
1614
+ /**
1615
+ * 扇区颜色
1616
+ */
1617
+ sectorColor?: string;
1618
+ /**
1619
+ * 扇区宽度
1620
+ */
1621
+ width?: number;
1622
+ /**
1623
+ * 背景颜色
1624
+ */
1625
+ bgColor?: string;
1626
+ /**
1627
+ * 光圈个数
1628
+ */
1629
+ count?: number;
1630
+ /**
1631
+ * 光晕偏移量
1632
+ */
1633
+ offset?: number;
1634
+ }
1635
+ interface ICorridorMaterialOptions {
1636
+ }
1637
+ /**
1638
+ * 闪电材质,
1639
+ * https://www.shadertoy.com/view/XXyGzh
1640
+ */
1641
+ interface IZapsMaterialOptions {
1642
+ color?: string;
1643
+ speed: number;
1644
+ }
1645
+
1646
+ type types$2_ICircleApertureMaterialOptions = ICircleApertureMaterialOptions;
1647
+ type types$2_ICircleRaderFanMaterialOptions = ICircleRaderFanMaterialOptions;
1648
+ type types$2_ICircleRaderWaveMaterialOptions = ICircleRaderWaveMaterialOptions;
1649
+ type types$2_ICircleWaveMaterialOptions = ICircleWaveMaterialOptions;
1650
+ type types$2_ICorridorMaterialOptions = ICorridorMaterialOptions;
1651
+ type types$2_IEllipsoidElectricMaterialOptions = IEllipsoidElectricMaterialOptions;
1652
+ type types$2_IEllipsoidScanMaterialOptions = IEllipsoidScanMaterialOptions;
1653
+ type types$2_ILightWallMaterialOptions = ILightWallMaterialOptions;
1654
+ type types$2_IPolylineFlowMaterialOptions = IPolylineFlowMaterialOptions;
1655
+ type types$2_IPolylineTrailMaterialOptions = IPolylineTrailMaterialOptions;
1656
+ type types$2_IRadarScanMaterialOptions = IRadarScanMaterialOptions;
1657
+ type types$2_IZapsMaterialOptions = IZapsMaterialOptions;
1658
+ declare namespace types$2 {
1659
+ export type { types$2_ICircleApertureMaterialOptions as ICircleApertureMaterialOptions, types$2_ICircleRaderFanMaterialOptions as ICircleRaderFanMaterialOptions, types$2_ICircleRaderWaveMaterialOptions as ICircleRaderWaveMaterialOptions, types$2_ICircleWaveMaterialOptions as ICircleWaveMaterialOptions, types$2_ICorridorMaterialOptions as ICorridorMaterialOptions, types$2_IEllipsoidElectricMaterialOptions as IEllipsoidElectricMaterialOptions, types$2_IEllipsoidScanMaterialOptions as IEllipsoidScanMaterialOptions, types$2_ILightWallMaterialOptions as ILightWallMaterialOptions, types$2_IPolylineFlowMaterialOptions as IPolylineFlowMaterialOptions, types$2_IPolylineTrailMaterialOptions as IPolylineTrailMaterialOptions, types$2_IRadarScanMaterialOptions as IRadarScanMaterialOptions, types$2_IZapsMaterialOptions as IZapsMaterialOptions };
1660
+ }
1661
+
1662
+ /**
1663
+ * 尾迹线材质类
1664
+ */
1665
+ declare class PolylineTrailMaterialProperty extends BaseMaterialProperty {
1666
+ private speed;
1667
+ private color;
1668
+ private name;
1669
+ private image;
1670
+ constructor(options: IPolylineTrailMaterialOptions);
1671
+ get isConstant(): boolean;
1672
+ get definitionChanged(): Cesium.Event<(...args: any[]) => void>;
1673
+ getType(): string;
1674
+ getValue(time: Cesium.JulianDate, result: any): any;
1675
+ equals(other: PolylineTrailMaterialProperty): any;
1676
+ init(): void;
1677
+ createPropertyDescriptors(): void;
1678
+ }
1679
+ declare const createTrailMaterial: (options: IPolylineTrailMaterialOptions) => Cesium.Material;
1680
+
1681
+ /**
1682
+ * 线流动材质
1683
+ * @classdesc 线流动材质
1684
+ * @param {IPolylineFlowMaterialOptions} options - 线流动材质参数
1685
+ */
1686
+ declare class PolylineFlowMaterialProperty extends BaseMaterialProperty {
1687
+ private repeatCount;
1688
+ private image;
1689
+ private speed;
1690
+ private color;
1691
+ private blend;
1692
+ private name;
1693
+ constructor(options: IPolylineFlowMaterialOptions);
1694
+ get isConstant(): boolean;
1695
+ get definitionChanged(): Cesium.Event<(...args: any[]) => void>;
1696
+ getType(): string;
1697
+ getValue(time: Cesium.JulianDate, result: any): any;
1698
+ equals(other: PolylineFlowMaterialProperty): boolean;
1699
+ init(): void;
1700
+ createPropertyDescriptors(): void;
1701
+ }
1702
+ declare const createPoylineFlowMaterial: (options: IPolylineFlowMaterialOptions) => Cesium.Material;
1703
+
1704
+ /**
1705
+ * 波浪圆
1706
+ */
1707
+ declare class CircleWaveMaterialProperty extends BaseMaterialProperty {
1708
+ private count;
1709
+ private speed;
1710
+ private gradient;
1711
+ private color;
1712
+ private name;
1713
+ constructor(options?: ICircleWaveMaterialOptions);
1714
+ get isConstant(): boolean;
1715
+ get definitionChanged(): Cesium.Event<(...args: any[]) => void>;
1716
+ getType(): string;
1717
+ getValue(time: Cesium.JulianDate, result: any): any;
1718
+ equals(other: CircleWaveMaterialProperty): any;
1719
+ init(): void;
1720
+ }
1721
+ declare const createCircleWaveMaterial: (options?: ICircleWaveMaterialOptions) => {
1722
+ material: Cesium.Material;
1723
+ };
1724
+
1725
+ /**
1726
+ *雷达波纹圆
1727
+ */
1728
+ declare class CircleRaderWaveMaterialProperty extends BaseMaterialProperty {
1729
+ private speed;
1730
+ private color;
1731
+ private name;
1732
+ constructor(options: ICircleRaderWaveMaterialOptions);
1733
+ get isConstant(): boolean;
1734
+ get definitionChanged(): Cesium.Event<(...args: any[]) => void>;
1735
+ getType(): string;
1736
+ getValue(time: Cesium.JulianDate, result: any): any;
1737
+ equals(other: CircleRaderWaveMaterialProperty): boolean;
1738
+ init(): void;
1739
+ }
1740
+ declare const createRaderWaveMaterial: (options: ICircleRaderWaveMaterialOptions) => {
1741
+ material: Cesium.Material;
1742
+ };
1743
+
1744
+ /**
1745
+ * 雷达扇形扫描
1746
+ */
1747
+ declare class CircleRaderFanMaterialProperty extends BaseMaterialProperty {
1748
+ private speed;
1749
+ private color;
1750
+ private name;
1751
+ constructor(options: ICircleRaderFanMaterialOptions);
1752
+ get isConstant(): boolean;
1753
+ get definitionChanged(): Cesium.Event<(...args: any[]) => void>;
1754
+ getType(): string;
1755
+ getValue(time: Cesium.JulianDate, result: any): any;
1756
+ equals(other: CircleRaderFanMaterialProperty): boolean;
1757
+ init(): void;
1758
+ }
1759
+ declare const createCircleRaderFanMaterial: (options: ICircleRaderFanMaterialOptions) => {
1760
+ material: Cesium.Material;
1761
+ };
1762
+
1763
+ /**
1764
+ * 波浪圆
1765
+ */
1766
+ declare class CircleApertureMaterialProperty extends BaseMaterialProperty {
1767
+ private speed;
1768
+ private color;
1769
+ private name;
1770
+ constructor(options?: ICircleApertureMaterialOptions);
1771
+ get isConstant(): boolean;
1772
+ get definitionChanged(): Cesium.Event<(...args: any[]) => void>;
1773
+ getType(): string;
1774
+ getValue(time: Cesium.JulianDate, result: any): any;
1775
+ equals(other: CircleApertureMaterialProperty): any;
1776
+ init(): void;
1777
+ }
1778
+ declare const createCircleApertureMaterial: (options?: ICircleApertureMaterialOptions) => Cesium.Material;
1779
+
1780
+ declare const createScanRadarMaterial: (options?: IRadarScanMaterialOptions) => Cesium.Material;
1781
+
1782
+ /**
1783
+ * 光墙材质
1784
+ */
1785
+ declare class LightWallMaterialProperty extends BaseMaterialProperty {
1786
+ private duration;
1787
+ private count;
1788
+ private vertical;
1789
+ private direction;
1790
+ private color;
1791
+ private _time;
1792
+ private image;
1793
+ private name;
1794
+ constructor(options: ILightWallMaterialOptions);
1795
+ get isConstant(): boolean;
1796
+ get definitionChanged(): Cesium.Event<(...args: any[]) => void>;
1797
+ getType(): string;
1798
+ getValue(time: Cesium.JulianDate, result: any): any;
1799
+ equals(other: LightWallMaterialProperty): any;
1800
+ init(): void;
1801
+ }
1802
+ declare const createLightWallMaterial: (options: ILightWallMaterialOptions) => {
1803
+ material: Cesium.Material;
1804
+ };
1805
+
1806
+ /**
1807
+ * 雷达扇形扫描
1808
+ */
1809
+ declare class EllipsoidElectricMaterialProperty extends BaseMaterialProperty {
1810
+ private speed;
1811
+ private color;
1812
+ private name;
1813
+ constructor(options: IEllipsoidElectricMaterialOptions);
1814
+ get isConstant(): boolean;
1815
+ get definitionChanged(): Cesium.Event<(...args: any[]) => void>;
1816
+ getType(): string;
1817
+ getValue(time: Cesium.JulianDate, result: any): any;
1818
+ equals(other: EllipsoidElectricMaterialProperty): boolean;
1819
+ init(): void;
1820
+ }
1821
+ declare const createEllipsoidElectricMaterial: (options: IEllipsoidElectricMaterialOptions) => {
1822
+ material: Cesium.Material;
1823
+ };
1824
+
1825
+ /**
1826
+ * 雷达扇形扫描
1827
+ */
1828
+ declare class EllipsoidScanMaterialProperty extends BaseMaterialProperty {
1829
+ private speed;
1830
+ private color;
1831
+ private name;
1832
+ constructor(options: IEllipsoidScanMaterialOptions);
1833
+ get isConstant(): boolean;
1834
+ get definitionChanged(): Cesium.Event<(...args: any[]) => void>;
1835
+ getType(): string;
1836
+ getValue(time: Cesium.JulianDate, result: any): any;
1837
+ equals(other: EllipsoidScanMaterialProperty): boolean;
1838
+ init(): void;
1839
+ }
1840
+ declare const createEllipsoidScanMaterial: (options: IEllipsoidScanMaterialOptions) => {
1841
+ material: Cesium.Material;
1842
+ };
1843
+
1844
+ /**
1845
+ * 闪电迁移shadertoy
1846
+ * https://www.shadertoy.com/view/XXyGzh
1847
+ */
1848
+ declare class ZapsMaterialProperty extends BaseMaterialProperty {
1849
+ private color;
1850
+ private speed;
1851
+ private name;
1852
+ constructor(options: IZapsMaterialOptions);
1853
+ get isConstant(): boolean;
1854
+ get definitionChanged(): Cesium.Event<(...args: any[]) => void>;
1855
+ getType(): string;
1856
+ getValue(time: Cesium.JulianDate, result: any): any;
1857
+ equals(other: ZapsMaterialProperty): any;
1858
+ init(): void;
1859
+ }
1860
+ declare const createZapsMaterial: (options: IZapsMaterialOptions) => {
1861
+ material: Cesium.Material;
1862
+ };
1863
+
1864
+ /**
1865
+ * 定义标签接口
1866
+ * @param id 标签的唯一标识符
1867
+ * @param field 字段名称,用于从数据中提取标签文本
1868
+ * @param font 字体样式
1869
+ * @param fillColor 填充颜色
1870
+ * @param outlineColor 轮廓颜色
1871
+ * @param outlineWidth 轮廓宽度
1872
+ * @param style 样式
1873
+ * @param showBackground 是否显示背景
1874
+ * @param backgroundColor 背景颜色
1875
+ * @param backgroundPadding 背景填充
1876
+ * @param scale 缩放比例
1877
+ * @param horizontalOrigin 水平原点
1878
+ * @param verticalOrigin 垂直原点
1879
+ * @param pixelOffset 像素偏移
1880
+ * @param eyeOffset 视角偏移
1881
+ * @param heightReference 高度参考
1882
+ * @param translucencyByDistance 透明度随距离变化
1883
+ * @param pixelOffsetScaleByDistance 像素偏移随距离变化
1884
+ * @param scaleByDistance 缩放随距离变化
1885
+ * @param distanceDisplayCondition 显示距离条件
1886
+ * @param disableDepthTestDistance 禁用深度测试距离
1887
+ */
1888
+ interface ILabel {
1889
+ /**
1890
+ * 标签的唯一标识符
1891
+ */
1892
+ id?: any;
1893
+ /**
1894
+ * 字段名称,用于从数据中提取标签文本
1895
+ */
1896
+ field: string;
1897
+ /**
1898
+ * 字体样式
1899
+ */
1900
+ font?: string;
1901
+ /**
1902
+ * 填充颜色
1903
+ */
1904
+ fillColor?: string;
1905
+ /**
1906
+ * 轮廓颜色
1907
+ */
1908
+ outlineColor?: string;
1909
+ /**
1910
+ * 轮廓宽度
1911
+ */
1912
+ outlineWidth?: number;
1913
+ /**
1914
+ * 样式
1915
+ */
1916
+ style?: string;
1917
+ /**
1918
+ * 是否显示背景
1919
+ */
1920
+ showBackground?: boolean;
1921
+ /**
1922
+ * 背景颜色
1923
+ */
1924
+ backgroundColor?: string;
1925
+ /**
1926
+ * 背景填充
1927
+ */
1928
+ backgroundPadding?: number[];
1929
+ /**
1930
+ * 缩放比例
1931
+ */
1932
+ scale?: number;
1933
+ /**
1934
+ * 水平原点
1935
+ */
1936
+ horizontalOrigin?: number;
1937
+ /**
1938
+ * 垂直原点
1939
+ */
1940
+ verticalOrigin?: number;
1941
+ /**
1942
+ * 像素偏移
1943
+ */
1944
+ pixelOffset?: number[];
1945
+ /**
1946
+ * 视角偏移
1947
+ */
1948
+ eyeOffset?: number[];
1949
+ /**
1950
+ * 高度参考
1951
+ */
1952
+ heightReference?: Cesium.HeightReference;
1953
+ /**
1954
+ * 透明度随距离变化
1955
+ */
1956
+ translucencyByDistance?: Cesium.NearFarScalar;
1957
+ /**
1958
+ * 像素偏移随距离变化
1959
+ */
1960
+ pixelOffsetScaleByDistance?: Cesium.NearFarScalar;
1961
+ /**
1962
+ * 缩放随距离变化
1963
+ */
1964
+ scaleByDistance?: Cesium.NearFarScalar;
1965
+ /**
1966
+ * 显示距离条件
1967
+ */
1968
+ distanceDisplayCondition?: Cesium.DistanceDisplayCondition;
1969
+ /**
1970
+ * 禁用深度测试距离
1971
+ */
1972
+ disableDepthTestDistance?: number;
1973
+ }
1974
+ /**
1975
+ * 定义点接口
1976
+ * @param id 点的唯一标识符
1977
+ * @param color 颜色
1978
+ * @param pixelSize 像素大小
1979
+ * @param outlineColor 轮廓颜色
1980
+ * @param outlineWidth 轮廓宽度
1981
+ * @param scaleByDistance 缩放随距离变化
1982
+ * @param translucencyByDistance 透明度随距离变化
1983
+ * @param distanceDisplayCondition 显示距离条件
1984
+ * @param disableDepthTestDistance 禁用深度测试距离
1985
+ */
1986
+ interface IPoint {
1987
+ /**
1988
+ * 点的唯一标识符
1989
+ */
1990
+ id?: any;
1991
+ /**
1992
+ * 颜色
1993
+ */
1994
+ color?: string;
1995
+ /**
1996
+ * 像素大小
1997
+ */
1998
+ pixelSize?: number;
1999
+ /**
2000
+ * 轮廓颜色
2001
+ */
2002
+ outlineColor?: string;
2003
+ /**
2004
+ * 轮廓宽度
2005
+ */
2006
+ outlineWidth?: number;
2007
+ /**
2008
+ * 缩放随距离变化
2009
+ */
2010
+ scaleByDistance?: Cesium.NearFarScalar;
2011
+ /**
2012
+ * 透明度随距离变化
2013
+ */
2014
+ translucencyByDistance?: Cesium.NearFarScalar;
2015
+ /**
2016
+ * 显示距离条件
2017
+ */
2018
+ distanceDisplayCondition?: Cesium.DistanceDisplayCondition;
2019
+ /**
2020
+ * 禁用深度测试距离
2021
+ */
2022
+ disableDepthTestDistance?: number;
2023
+ }
2024
+ /**
2025
+ * 定义广告牌接口
2026
+ * @param id 广告牌的唯一标识符
2027
+ * @param show 是否显示
2028
+ * @param image 图像或画布元素
2029
+ * @param scale 缩放比例
2030
+ * @param pixelOffset 像素偏移
2031
+ * @param eyeOffset 视角偏移
2032
+ * @param horizontalOrigin 水平原点
2033
+ * @param verticalOrigin 垂直原点
2034
+ * @param heightReference 高度参考
2035
+ * @param color 颜色
2036
+ * @param rotation 旋转角度
2037
+ * @param alignedAxis 对齐轴
2038
+ * @param sizeInMeters 是否以米为单位
2039
+ * @param width 宽度
2040
+ * @param height 高度
2041
+ * @param scaleByDistance 缩放随距离变化
2042
+ * @param translucencyByDistance 透明度随距离变化
2043
+ * @param pixelOffsetScaleByDistance 像素偏移随距离变化
2044
+ * @param imageSubRegion 图像子区域
2045
+ * @param distanceDisplayCondition 显示距离条件
2046
+ * @param disableDepthTestDistance 禁用深度测试距离
2047
+ */
2048
+ interface IBillboard {
2049
+ /**
2050
+ * 广告牌的唯一标识符
2051
+ */
2052
+ id?: any;
2053
+ /**
2054
+ * 是否显示
2055
+ */
2056
+ show?: boolean;
2057
+ /**
2058
+ * 图像或画布元素
2059
+ */
2060
+ image?: string | HTMLCanvasElement;
2061
+ /**
2062
+ * 缩放比例
2063
+ */
2064
+ scale?: number;
2065
+ /**
2066
+ * 像素偏移
2067
+ */
2068
+ pixelOffset?: number[];
2069
+ /**
2070
+ * 视角偏移
2071
+ */
2072
+ eyeOffset?: number[];
2073
+ /**
2074
+ * 水平原点
2075
+ */
2076
+ horizontalOrigin?: Cesium.HorizontalOrigin;
2077
+ /**
2078
+ * 垂直原点
2079
+ */
2080
+ verticalOrigin?: Cesium.VerticalOrigin;
2081
+ /**
2082
+ * 高度参考
2083
+ */
2084
+ heightReference?: Cesium.HeightReference;
2085
+ /**
2086
+ * 颜色
2087
+ */
2088
+ color?: string;
2089
+ /**
2090
+ * 旋转角度
2091
+ */
2092
+ rotation?: number;
2093
+ /**
2094
+ * 对齐轴
2095
+ */
2096
+ alignedAxis?: number[];
2097
+ /**
2098
+ * 是否以米为单位
2099
+ */
2100
+ sizeInMeters?: boolean;
2101
+ /**
2102
+ * 宽度
2103
+ */
2104
+ width?: number;
2105
+ /**
2106
+ * 高度
2107
+ */
2108
+ height?: number;
2109
+ /**
2110
+ * 缩放随距离变化
2111
+ */
2112
+ scaleByDistance?: Cesium.NearFarScalar;
2113
+ /**
2114
+ * 透明度随距离变化
2115
+ */
2116
+ translucencyByDistance?: Cesium.NearFarScalar;
2117
+ /**
2118
+ * 像素偏移随距离变化
2119
+ */
2120
+ pixelOffsetScaleByDistance?: Cesium.NearFarScalar;
2121
+ /**
2122
+ * 图像子区域
2123
+ */
2124
+ imageSubRegion?: Cesium.BoundingRectangle;
2125
+ /**
2126
+ * 显示距离条件
2127
+ */
2128
+ distanceDisplayCondition?: Cesium.DistanceDisplayCondition;
2129
+ /**
2130
+ * 禁用深度测试距离
2131
+ */
2132
+ disableDepthTestDistance?: number;
2133
+ }
2134
+ /**
2135
+ * 定义聚类接口
2136
+ * @param id 聚类的唯一标识符
2137
+ * @param radius 聚类半径
2138
+ * @param maxZoom 最大缩放级别
2139
+ * @param colorsByRate 聚合点的颜色组,通过聚合数量和总数的比例控制颜色
2140
+ */
2141
+ interface Icluster {
2142
+ /**
2143
+ * 聚类的唯一标识符
2144
+ */
2145
+ id?: any;
2146
+ /**
2147
+ * 聚类半径
2148
+ */
2149
+ radius?: number;
2150
+ /**
2151
+ * 最大缩放级别
2152
+ */
2153
+ maxZoom?: number;
2154
+ /**
2155
+ * 聚合点的颜色组,通过聚合数量和总数的比例控制颜色
2156
+ * 例如:
2157
+ * 0.1: '#ff0000',
2158
+ * 0.01: '#ff00ff',
2159
+ * 0.001: 'blue',
2160
+ * 0.0001: '#00ff00',
2161
+ */
2162
+ colorsByRate?: any;
2163
+ }
2164
+ /**
2165
+ * 定义点图元选项接口
2166
+ * @param viewer Cesium viewer实例
2167
+ * @param geoJson GeoJSON 数据
2168
+ * @param calcHeight 是否根据地形计算点高度
2169
+ * @param point 点样式
2170
+ * @param billboard 广告牌样式
2171
+ * @param label 标签样式
2172
+ * @param cluster 聚类样式
2173
+ */
2174
+ interface IPointPrimitivesOptions {
2175
+ /**
2176
+ * Cesium viewer实例
2177
+ */
2178
+ viewer: Cesium.Viewer;
2179
+ /**
2180
+ * GeoJSON 数据
2181
+ */
2182
+ geoJson: FeatureCollection$1<Point$1>;
2183
+ /**
2184
+ * 是否根据地形计算点高度
2185
+ */
2186
+ calcHeight: boolean;
2187
+ /**
2188
+ * 点样式
2189
+ */
2190
+ point?: IPoint;
2191
+ /**
2192
+ * 广告牌样式
2193
+ */
2194
+ billboard?: IBillboard;
2195
+ /**
2196
+ * 标签样式
2197
+ */
2198
+ label?: ILabel;
2199
+ /**
2200
+ * 聚类样式
2201
+ */
2202
+ cluster?: Icluster;
2203
+ }
2204
+ /**
2205
+ * 定义雷达扫描图元选项接口
2206
+ * @param viewer Cesium 查看器实例
2207
+ * @param position 位置
2208
+ * @param radius 半径
2209
+ * @param appearanceOptions appearance配置
2210
+ * @param materialOptions 材质配置
2211
+ */
2212
+ interface IRaderScanPrimitiveOptions {
2213
+ /**
2214
+ * Cesium 查看器实例
2215
+ */
2216
+ viewer: Cesium.Viewer;
2217
+ /**
2218
+ * 位置
2219
+ */
2220
+ position: Cesium.Cartesian3;
2221
+ /**
2222
+ * 半径
2223
+ */
2224
+ radius: number;
2225
+ /**
2226
+ * 是否贴地形
2227
+ */
2228
+ ground?: boolean;
2229
+ appearanceOptions?: Cesium.MaterialAppearance;
2230
+ materialOptions?: IRadarScanMaterialOptions;
2231
+ }
2232
+ interface ICircleAperturePrimitiveOptions {
2233
+ /**
2234
+ * 位置
2235
+ */
2236
+ position: Cesium.Cartesian3;
2237
+ /**
2238
+ * 半径
2239
+ */
2240
+ radius: number;
2241
+ /**
2242
+ * 是否贴地形
2243
+ */
2244
+ ground?: boolean;
2245
+ appearanceOptions?: Cesium.MaterialAppearance;
2246
+ materialOptions?: ICircleApertureMaterialOptions;
2247
+ }
2248
+ /**
2249
+ * 定义地面多边形图元选项接口
2250
+ * @param geoJson GeoJSON 数据
2251
+ * @param line 线样式
2252
+ */
2253
+ interface IGroundPolygonPrimitivesOptions {
2254
+ /**
2255
+ * GeoJSON 数据
2256
+ */
2257
+ geoJson: FeatureCollection$1<Polygon$1 | MultiPolygon$1, GeoJsonProperties$1>;
2258
+ line: {
2259
+ /**
2260
+ * 线宽
2261
+ */
2262
+ width?: number;
2263
+ /**
2264
+ * 线颜色
2265
+ */
2266
+ color?: string;
2267
+ };
2268
+ }
2269
+ /**
2270
+ * 定义地面折线图元选项接口
2271
+ * @param geoJson GeoJSON 数据
2272
+ * @param line 线样式
2273
+ * @param material 材质颜色二选一
2274
+ */
2275
+ interface IGroundPolylinePrimitivesOptions {
2276
+ /**
2277
+ * GeoJSON 数据
2278
+ */
2279
+ geoJson: FeatureCollection$1<LineString$1 | MultiLineString$1, GeoJsonProperties$1>;
2280
+ line: {
2281
+ /**
2282
+ * 线宽
2283
+ */
2284
+ width?: number;
2285
+ /**
2286
+ * 线颜色
2287
+ */
2288
+ color?: string;
2289
+ };
2290
+ /**
2291
+ * 材质颜色二选一
2292
+ */
2293
+ material?: Cesium.Material;
2294
+ }
2295
+
2296
+ type types$1_IBillboard = IBillboard;
2297
+ type types$1_ICircleAperturePrimitiveOptions = ICircleAperturePrimitiveOptions;
2298
+ type types$1_IGroundPolygonPrimitivesOptions = IGroundPolygonPrimitivesOptions;
2299
+ type types$1_IGroundPolylinePrimitivesOptions = IGroundPolylinePrimitivesOptions;
2300
+ type types$1_ILabel = ILabel;
2301
+ type types$1_IPoint = IPoint;
2302
+ type types$1_IPointPrimitivesOptions = IPointPrimitivesOptions;
2303
+ type types$1_IRaderScanPrimitiveOptions = IRaderScanPrimitiveOptions;
2304
+ type types$1_Icluster = Icluster;
2305
+ declare namespace types$1 {
2306
+ export type { types$1_IBillboard as IBillboard, types$1_ICircleAperturePrimitiveOptions as ICircleAperturePrimitiveOptions, types$1_IGroundPolygonPrimitivesOptions as IGroundPolygonPrimitivesOptions, types$1_IGroundPolylinePrimitivesOptions as IGroundPolylinePrimitivesOptions, types$1_ILabel as ILabel, types$1_IPoint as IPoint, types$1_IPointPrimitivesOptions as IPointPrimitivesOptions, types$1_IRaderScanPrimitiveOptions as IRaderScanPrimitiveOptions, types$1_Icluster as Icluster };
2307
+ }
2308
+
2309
+ declare class RadereScanPrimitive extends BasePrimitive<any> {
2310
+ private position;
2311
+ private options;
2312
+ constructor(options: IRaderScanPrimitiveOptions);
2313
+ getGeometry(): Cesium.CircleGeometry;
2314
+ getPrimitive(): Cesium.Primitive | Cesium.GroundPrimitive | Cesium.PointPrimitiveCollection | Cesium.GroundPolylinePrimitive | Cesium.LabelCollection | Cesium.PrimitiveCollection | undefined;
2315
+ setAppearance(appearance?: Cesium.Appearance): void;
2316
+ }
2317
+
2318
+ /**
2319
+ * 大量点 primitive 集合
2320
+ */
2321
+ declare class PointPrimitives extends BasePrimitive<any> {
2322
+ private options;
2323
+ private pointPrimitives;
2324
+ boundingSphere: Cesium.BoundingSphere;
2325
+ private pointCollection;
2326
+ private labelCollection;
2327
+ private billboardCollection;
2328
+ private clusterImageCache;
2329
+ private supercluster;
2330
+ constructor(options: IPointPrimitivesOptions);
2331
+ initCollection: (geojson: FeatureCollection$1<Point$1, GeoJsonProperties$1>) => Promise<void>;
2332
+ clacBoundingSphere(geoJson: FeatureCollection$1<Point$1, GeoJsonProperties$1>): void;
2333
+ createPoint(feature: Feature$1<Point$1, GeoJsonProperties$1>): {
2334
+ id: string;
2335
+ position: Cesium.Cartesian3;
2336
+ color: Cesium.Color;
2337
+ pixelSize: any;
2338
+ outlineColor: Cesium.Color;
2339
+ outlineWidth: any;
2340
+ scaleByDistance: any;
2341
+ translucencyByDistance: any;
2342
+ disableDepthTestDistance: any;
2343
+ distanceDisplayCondition: any;
2344
+ };
2345
+ createBillboard(feature: Feature$1<Point$1, GeoJsonProperties$1>): {
2346
+ id: string;
2347
+ position: Cesium.Cartesian3;
2348
+ image: any;
2349
+ scale: any;
2350
+ width: any;
2351
+ height: any;
2352
+ color: Cesium.Color | undefined;
2353
+ pixelOffset: Cesium.Cartesian2;
2354
+ horizontalOrigin: any;
2355
+ verticalOrigin: any;
2356
+ heightReference: any;
2357
+ scaleByDistance: any;
2358
+ translucencyByDistance: any;
2359
+ disableDepthTestDistance: any;
2360
+ distanceDisplayCondition: any;
2361
+ };
2362
+ createLabel(feature: Feature$1<Point$1, GeoJsonProperties$1>): {
2363
+ id: string;
2364
+ position: Cesium.Cartesian3;
2365
+ text: any;
2366
+ font: any;
2367
+ fillColor: Cesium.Color;
2368
+ outlineColor: Cesium.Color;
2369
+ outlineWidth: any;
2370
+ style: any;
2371
+ scale: any;
2372
+ showBackground: any;
2373
+ backgroundColor: Cesium.Color;
2374
+ backgroundPadding: Cesium.Cartesian2;
2375
+ pixelOffset: Cesium.Cartesian2;
2376
+ horizontalOrigin: any;
2377
+ verticalOrigin: any;
2378
+ heightReference: any;
2379
+ scaleByDistance: any;
2380
+ translucencyByDistance: any;
2381
+ disableDepthTestDistance: any;
2382
+ distanceDisplayCondition: any;
2383
+ };
2384
+ initCluster: (viewer: Cesium.Viewer, geoJson: FeatureCollection$1<Point$1>) => Promise<void>;
2385
+ /**
2386
+ * 缩放至聚合点子集
2387
+ */
2388
+ flyToChildByClusterId(id: number): any[] | undefined;
2389
+ loadCluster: (viewer: Cesium.Viewer) => void;
2390
+ getClusterImageByCount(color: string, count: number, zoom: number): any;
2391
+ calcfontSize(zoom: number): number;
2392
+ calcPointHeight(viewer: Cesium.Viewer, geoJson: FeatureCollection$1<Point$1>): Promise<void>;
2393
+ clearCollection(): void;
2394
+ remove(): void;
2395
+ removeAll(): void;
2396
+ getPrimitive(): Cesium.PrimitiveCollection;
2397
+ }
2398
+
2399
+ declare class GroundPolylinePrimitives<T> extends BasePrimitive<T> {
2400
+ private options;
2401
+ private polylinePrimitives;
2402
+ constructor(options: IGroundPolylinePrimitivesOptions);
2403
+ initCollection(): void;
2404
+ getPrimitive(): Cesium.GroundPolylinePrimitive | undefined;
2405
+ setMaterialAppearance(): void;
2406
+ }
2407
+
2408
+ /**
2409
+ * 贴地多边形
2410
+ */
2411
+ declare class GroundPolygonPrimitives<T> extends BasePrimitive<T> {
2412
+ private options;
2413
+ private primitives;
2414
+ constructor(options: IGroundPolygonPrimitivesOptions);
2415
+ initCollection(): void;
2416
+ getPrimitive(): Cesium.GroundPolylinePrimitive | undefined;
2417
+ getAppearance(appearance?: Cesium.Appearance): void;
2418
+ }
2419
+
2420
+ /**
2421
+ * Defines how screen space objects (billboards, points, labels) are clustered.
2422
+ *
2423
+ * @param {object} [options] An object with the following properties:
2424
+ * @param {boolean} [options.enabled] Whether or not to enable clustering.
2425
+ * @param {number} [options.pixelRange] The pixel range to extend the screen space bounding box.
2426
+ * @param {number} [options.minimumClusterSize] The minimum number of screen space objects that can be clustered.
2427
+ * @param {boolean} [options.clusterBillboards] Whether or not to cluster the billboards of an entity.
2428
+ * @param {boolean} [options.clusterLabels] Whether or not to cluster the labels of an entity.
2429
+ * @param {boolean} [options.clusterPoints] Whether or not to cluster the points of an entity.
2430
+ * @param {boolean} [options.show] Determines if the entities in the cluster will be shown.
2431
+ *
2432
+ * @alias PrimitiveCluster
2433
+ * @constructor
2434
+ *
2435
+ * @demo {@link https://sandcastle.cesium.com/index.html?src=Clustering.html|Cesium Sandcastle Clustering Demo}
2436
+ */
2437
+ declare function PointClusterPrimitives(options: any): void;
2438
+
2439
+ declare class CircleAperturePrimitive extends BasePrimitive<any> {
2440
+ private position;
2441
+ private options;
2442
+ constructor(options: ICircleAperturePrimitiveOptions);
2443
+ getGeometry(): Cesium.CircleGeometry;
2444
+ getPrimitive(): Cesium.Primitive | Cesium.GroundPrimitive | Cesium.PointPrimitiveCollection | Cesium.GroundPolylinePrimitive | Cesium.LabelCollection | Cesium.PrimitiveCollection | undefined;
2445
+ setAppearance(appearance?: Cesium.Appearance): void;
2446
+ }
2447
+
2448
+ declare class GridPrimitives extends BasePrimitive<any> {
2449
+ private gridPrimitiveCollection;
2450
+ private polygonPrimitive;
2451
+ private outlinePrimitive;
2452
+ private options;
2453
+ constructor(options: IGridPrimitiveOptions);
2454
+ createGridPolygonPrimitive(): Cesium.Primitive | undefined;
2455
+ createGridOutlinePrimitive(): Cesium.Primitive | undefined;
2456
+ getPrimitive(): Cesium.PrimitiveCollection;
2457
+ selectGrids(ids: string[]): void;
2458
+ unSelectGrids(ids: string[]): void;
2459
+ }
2460
+ interface IGridPrimitiveOptions {
2461
+ /**
2462
+ * 顶点坐标
2463
+ */
2464
+ vertices: IGridPrimitiveVertices[];
2465
+ /**
2466
+ * 是否填充颜色
2467
+ */
2468
+ fill: boolean;
2469
+ /**
2470
+ * 填充颜色
2471
+ */
2472
+ fillColor: string;
2473
+ /**
2474
+ * 填充选中颜色
2475
+ */
2476
+ fillSelectColor: string;
2477
+ /**
2478
+ * 是否显示边线
2479
+ */
2480
+ outline: boolean;
2481
+ /**
2482
+ * 边线颜色
2483
+ */
2484
+ outlineColor: string;
2485
+ /**
2486
+ * 边线选中颜色
2487
+ */
2488
+ outlineSelectColor: string;
2489
+ }
2490
+ interface IGridPrimitiveVertices {
2491
+ id: string;
2492
+ positions: Cesium.Cartesian3;
2493
+ }
2494
+
2495
+ interface IBaseAnalysis<T, R> {
2496
+ set: (options: T) => R;
2497
+ remove: (item: R) => void;
2498
+ removeAll: () => void;
2499
+ destroy: () => void;
2500
+ }
2501
+ interface IClipPlane extends IBaseAnalysis<IClipPlaneOPtions, any> {
2502
+ }
2503
+ interface IClipPlaneOPtions {
2504
+ positions: Cesium.Cartesian3[];
2505
+ depth: number;
2506
+ unionClippingRegions?: boolean;
2507
+ }
2508
+ interface IClipPolygon extends IBaseAnalysis<IClipPolygonPtions, IClipPolygonItem> {
2509
+ }
2510
+ interface IClipPolygonPtions {
2511
+ positions: Cesium.Cartesian3[];
2512
+ depth: number;
2513
+ inverse?: boolean;
2514
+ }
2515
+ interface IClipPolygonItem {
2516
+ id: string;
2517
+ polygon: Cesium.ClippingPolygon;
2518
+ bottomEntity: Cesium.Entity;
2519
+ }
2520
+ interface IFlood extends IBaseAnalysis<IFloodOptions, IFloodItem> {
2521
+ }
2522
+ interface IFloodOptions {
2523
+ positions: Cesium.Cartesian3[];
2524
+ type: 'model' | 'terrain';
2525
+ speed: number;
2526
+ }
2527
+ interface IFloodItem {
2528
+ id: string;
2529
+ polygon: Cesium.Entity;
2530
+ }
2531
+ interface IFillDig extends IBaseAnalysis<IFillDigOptions, IFillDigItem> {
2532
+ }
2533
+ interface IFillDigOptions {
2534
+ positions: Cesium.Cartesian3[];
2535
+ }
2536
+ interface IFillDigItem {
2537
+ id: string;
2538
+ }
2539
+ interface IProFile<T> {
2540
+ set: (options: T) => Promise<IProFileItem>;
2541
+ remove: (item: IProFileItem) => void;
2542
+ removeAll: () => void;
2543
+ destroy: () => void;
2544
+ changeTipPoint: (data?: IProFileItemData) => void;
2545
+ }
2546
+ interface IProFileOptions {
2547
+ positions: Cesium.Cartesian3[];
2548
+ /**
2549
+ * 插值点距离
2550
+ * 根据距离和线的长度计算插值点数量
2551
+ * 单位为米
2552
+ */
2553
+ pointDistance: number;
2554
+ tipMarkerUrl?: string;
2555
+ }
2556
+ interface IProFileItem {
2557
+ id: string;
2558
+ datas: IProFileItemData[];
2559
+ }
2560
+ interface IProFileItemData {
2561
+ longitude: number;
2562
+ latitude: number;
2563
+ height: number;
2564
+ distance: number;
2565
+ allDistance: number;
2566
+ }
2567
+ interface IModelProFileOptions extends IProFileOptions {
2568
+ layers: any;
2569
+ /**
2570
+ * 分析进度
2571
+ */
2572
+ progress: (data: IProFileItemData) => void;
2573
+ }
2574
+
2575
+ type types_IBaseAnalysis<T, R> = IBaseAnalysis<T, R>;
2576
+ type types_IClipPlane = IClipPlane;
2577
+ type types_IClipPlaneOPtions = IClipPlaneOPtions;
2578
+ type types_IClipPolygon = IClipPolygon;
2579
+ type types_IClipPolygonItem = IClipPolygonItem;
2580
+ type types_IClipPolygonPtions = IClipPolygonPtions;
2581
+ type types_IFillDig = IFillDig;
2582
+ type types_IFillDigItem = IFillDigItem;
2583
+ type types_IFillDigOptions = IFillDigOptions;
2584
+ type types_IFlood = IFlood;
2585
+ type types_IFloodItem = IFloodItem;
2586
+ type types_IFloodOptions = IFloodOptions;
2587
+ type types_IModelProFileOptions = IModelProFileOptions;
2588
+ type types_IProFile<T> = IProFile<T>;
2589
+ type types_IProFileItem = IProFileItem;
2590
+ type types_IProFileItemData = IProFileItemData;
2591
+ type types_IProFileOptions = IProFileOptions;
2592
+ declare namespace types {
2593
+ export type { types_IBaseAnalysis as IBaseAnalysis, types_IClipPlane as IClipPlane, types_IClipPlaneOPtions as IClipPlaneOPtions, types_IClipPolygon as IClipPolygon, types_IClipPolygonItem as IClipPolygonItem, types_IClipPolygonPtions as IClipPolygonPtions, types_IFillDig as IFillDig, types_IFillDigItem as IFillDigItem, types_IFillDigOptions as IFillDigOptions, types_IFlood as IFlood, types_IFloodItem as IFloodItem, types_IFloodOptions as IFloodOptions, types_IModelProFileOptions as IModelProFileOptions, types_IProFile as IProFile, types_IProFileItem as IProFileItem, types_IProFileItemData as IProFileItemData, types_IProFileOptions as IProFileOptions };
2594
+ }
2595
+
2596
+ /**
2597
+ * 地形开挖
2598
+ */
2599
+ declare const createClipPlaneAnalysis: (viewer: Cesium.Viewer) => IClipPlane;
2600
+
2601
+ /**
2602
+ * 裁剪面分析,
2603
+ */
2604
+ declare const createClipPolygonAnalysis: (viewer: Cesium.Viewer) => IClipPolygon;
2605
+
2606
+ /**
2607
+ * 淹没分析
2608
+ * @param viewer
2609
+ */
2610
+ declare const createFloodAnalysis: (viewer: Cesium.Viewer) => IFlood;
2611
+
2612
+ /**
2613
+ * 填挖方分析
2614
+ * @param viewer
2615
+ */
2616
+ declare const createFillAndDigAnalysis: (viewer: Cesium.Viewer) => IFillDig;
2617
+
2618
+ /**
2619
+ * 淹没分析
2620
+ * @param viewer
2621
+ */
2622
+ declare const createProfileAnalysis: (viewer: Cesium.Viewer) => IProFile<IProFileOptions>;
2623
+
2624
+ /**
2625
+ * 剖面分析(模型上分析)
2626
+ * 分层分析模型
2627
+ */
2628
+ declare const createModelProfileAnalysis: (viewer: Viewer) => IProFile<IModelProFileOptions>;
2629
+
2630
+ export { types as Analysis, BaseMaterialProperty, BasePrimitive, CircleApertureMaterialProperty, CircleAperturePrimitive, CircleRaderFanMaterialProperty, CircleRaderWaveMaterialProperty, CircleWaveMaterialProperty, types$4 as Common, CoordinateTransformer, DefaultViewerOptions, types$3 as Draw, DrawEventType, EllipsoidElectricMaterialProperty, EllipsoidScanMaterialProperty, FlyAttitude, GridPrimitives, GroundPolygonPrimitives, GroundPolylinePrimitives, LightWallMaterialProperty, types$2 as Material, PointClusterPrimitives, PointPrimitives, PolylineFlowMaterialProperty, PolylineTrailMaterialProperty, Popup, types$1 as Primitives, RadereScanPrimitive, RoamStatus, Tooltip, TransformsFor3dtiles, ZapsMaterialProperty, calcArea, calcCameraHeightFromZoom, calcGeodesicDistance, calcGeodesicDistances, calcLerpPosition, calcPoistionCenter, calcSceneHeightFromPositions, calcSpaceDistance, calcSpaceDistances, calcTerrainHeightFromPositions, calcTriangleArea, calcZoomFromCameraHeight, clacPositionsForParabola, createBloomTargetStage, createBottomStatusBar, createCircleApertureMaterial, createCircleRaderFanMaterial, createCircleWaveMaterial, createClipPlaneAnalysis, createClipPolygonAnalysis, createDrawHandler, createDroneAnimCustomShader, createEagleEye, createEllipsoidElectricMaterial, createEllipsoidScanMaterial, createFillAndDigAnalysis, createFloodAnalysis, createFogStage, createHeightFogStage, createHighLightStage, createLightBandCustomShader, createLightWallMaterial, createLightningStage, createModelProfileAnalysis, createOpenAnim, createOutLineEffect, createOutlineStage, createPoylineFlowMaterial, createProfileAnalysis, createRaderWaveMaterial, createRainCoverStage, createRainStage, createRoamHandler, createScanRadarMaterial, createSkyBox, createSkyBoxOnGround, createSkylineStage, createSnowCoverStage, createSnowStage, createTrailMaterial, createZapsMaterial, flyToCameraView, flyToCesium3DTile, flyToDataSource, flyToFromSphere, flyToImagery, flyToLnglat, flyToPosition, getAllFeaturesFrom3dTiles, getAllTilesFrom3dTiles, getCameraView, getCesiumForAutoFitScale, getInoCesiumBaseUrl, initCesium, initCesiumEvent, load3dTiles, loadI3s, loadModel, loadTerrain, loadTerrainFromCesium, loadTianDiTu, loads3m, makeGridFromElevationExtrema, makeGridToInstanceForBox, makeGridToInstanceForLine, makeLnglatToPosition, makeLnglatsToLineGeojson, makeLnglatsToPointGeojson, makeLnglatsToPolygonGeojson, makeLnglatsToPositions, makePositionsClose, makePositionsForAntiClockwise, makePositionsForClockwise, makePositionsToLnglats, makePositiontoLnglat, makeYawPitchRollToHeadingPitchRoll, mekeGridPolygonAndHeight, numberId, randomColor, randomPointToGeoJson, randomPolygonToGeoJson, randomPolylineToGeoJson, removeTerrain, setCesiumForAutoFitScale, setGlobeOpatity, setHeightOffsetFor3dTiles, setInoCesiumBaseUrl, setViewToLnglat, twinkleModel };
2631
+ export type { DeepPartial, DrawEvent, DrawShape, IBaseAnalysis, IBillboard, ICamearView, ICesiumEventListener, ICircleApertureMaterialOptions, ICircleAperturePrimitiveOptions, ICircleRaderFanMaterialOptions, ICircleRaderWaveMaterialOptions, ICircleWaveMaterialOptions, IClipPlane, IClipPlaneOPtions, IClipPolygon, IClipPolygonItem, IClipPolygonPtions, ICorridorMaterialOptions, IDrawAttrInfo, IDrawEditEvent, IDrawHandler, IDrawHandlerEvent, IDrawOptions, IDrawStyle, IDroneAnimOptions, IEllipsoidElectricMaterialOptions, IEllipsoidScanMaterialOptions, IEventActions, IEventData, IFillDig, IFillDigItem, IFillDigOptions, IFlood, IFloodItem, IFloodOptions, IFogStageOptions, IGroundPolygonPrimitivesOptions, IGroundPolylinePrimitivesOptions, IHeightFogStageOptions, IHighLightStageOptions, ILabel, ILightBandStageOptions, ILightWallMaterialOptions, ILightningStageOptions, ILoadTerrainOptions, ILoadTiandituOptions, IMeasureOptions, IMeasureResult, IModelProFileOptions, IOpenAnimOptions, IPoint, IPointPrimitivesOptions, IPolylineFlowMaterialOptions, IPolylineTrailMaterialOptions, IProFile, IProFileItem, IProFileItemData, IProFileOptions, IRadarScanMaterialOptions, IRaderScanPrimitiveOptions, IRainCoverStage, IRainStageOptions, IRoamEvent, IRoamHandler, IRoamItem, IRoamItemHPR, IRoaming, ISetViewByLngLatOptions, ISetViewByPositionOptions, ISkyBoxOnGroundOptions, ISkyBoxOptions, ISkyBoxSources, ISnowCoverStageOptions, ISnowStageOptions, IYawPitchRoll, IZapsMaterialOptions, Icluster };