@wwsy/cesium 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +747 -0
- package/dist/index.js +778 -89
- package/dist/index.umd.cjs +3 -3
- package/package.json +3 -2
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,747 @@
|
|
|
1
|
+
import { Camera } from 'cesium';
|
|
2
|
+
import * as Cesium from 'cesium';
|
|
3
|
+
import { Clock } from 'cesium';
|
|
4
|
+
import { Event as Event_3 } from 'cesium';
|
|
5
|
+
import { Scene } from 'cesium';
|
|
6
|
+
|
|
7
|
+
declare class AmapImageryProvider extends Cesium.UrlTemplateImageryProvider {
|
|
8
|
+
constructor(options: imageryProviderOptions);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* 基础覆盖物、图层
|
|
13
|
+
* **/
|
|
14
|
+
declare class BaseEntityLayer {
|
|
15
|
+
private _entityName;
|
|
16
|
+
private _customId;
|
|
17
|
+
private _customData;
|
|
18
|
+
private _bVisible;
|
|
19
|
+
private _bLocked;
|
|
20
|
+
protected _data: any;
|
|
21
|
+
constructor(data: BasicEntityLayerType);
|
|
22
|
+
_setBasic(): void;
|
|
23
|
+
get entityName(): string;
|
|
24
|
+
set entityName(value: string);
|
|
25
|
+
GetEntityName(): Promise<{
|
|
26
|
+
message: any;
|
|
27
|
+
success: boolean;
|
|
28
|
+
result: any;
|
|
29
|
+
}>;
|
|
30
|
+
SetEntityName(value: string): void;
|
|
31
|
+
get customId(): string;
|
|
32
|
+
set customId(value: string);
|
|
33
|
+
GetCustomId(): Promise<{
|
|
34
|
+
message: any;
|
|
35
|
+
success: boolean;
|
|
36
|
+
result: any;
|
|
37
|
+
}>;
|
|
38
|
+
SetCustomId(value: string): void;
|
|
39
|
+
get customData(): Record<string, any>;
|
|
40
|
+
set customData(value: Record<string, any>);
|
|
41
|
+
GetCustomData(): Promise<{
|
|
42
|
+
message: any;
|
|
43
|
+
success: boolean;
|
|
44
|
+
result: any;
|
|
45
|
+
}>;
|
|
46
|
+
SetCustomData(value: Record<string, any>): void;
|
|
47
|
+
get bVisible(): boolean;
|
|
48
|
+
set bVisible(value: boolean);
|
|
49
|
+
protected _visibleHook(value: boolean): void;
|
|
50
|
+
GetVisible(): Promise<{
|
|
51
|
+
message: any;
|
|
52
|
+
success: boolean;
|
|
53
|
+
result: any;
|
|
54
|
+
}>;
|
|
55
|
+
SetVisible(value: boolean): void;
|
|
56
|
+
get bLocked(): boolean;
|
|
57
|
+
set bLocked(value: boolean);
|
|
58
|
+
GetLocked(): Promise<{
|
|
59
|
+
message: any;
|
|
60
|
+
success: boolean;
|
|
61
|
+
result: any;
|
|
62
|
+
}>;
|
|
63
|
+
SetLocked(value: boolean): void;
|
|
64
|
+
Update(data: any): void;
|
|
65
|
+
protected _updateHook(): void;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
declare interface BaseImageryLayer {
|
|
69
|
+
id: string;
|
|
70
|
+
layers: Cesium.ImageryLayer[];
|
|
71
|
+
cache: Cesium.ImageryLayer[];
|
|
72
|
+
options: Cesium.ImageryLayer.ConstructorOptions & {
|
|
73
|
+
name: string;
|
|
74
|
+
iconUrl?: string;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
declare type BasicEntityLayerType = Partial<BasicInfoAtomType> & Partial<VisibleAtomType> & Partial<EntityFlagAtomType>;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* @interface BasicInfoAtomType
|
|
82
|
+
* @param {string} entityName
|
|
83
|
+
* @param {string} customId
|
|
84
|
+
* @param {any} customData
|
|
85
|
+
* @param {string} parentEid
|
|
86
|
+
*/
|
|
87
|
+
declare interface BasicInfoAtomType {
|
|
88
|
+
entityName: string;
|
|
89
|
+
customId: string;
|
|
90
|
+
customData: any;
|
|
91
|
+
parentEid: string;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
declare interface CameraBase {
|
|
95
|
+
location: number[];
|
|
96
|
+
locationLimit: number[][];
|
|
97
|
+
rotation: {
|
|
98
|
+
pitch: number;
|
|
99
|
+
yaw: number;
|
|
100
|
+
};
|
|
101
|
+
pitchLimit: number[];
|
|
102
|
+
yawLimit: number[];
|
|
103
|
+
viewDistanceLimit: number[];
|
|
104
|
+
fieldOfView: number;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
declare class CameraControl {
|
|
108
|
+
private _options;
|
|
109
|
+
private _viewer;
|
|
110
|
+
private _animationInstance;
|
|
111
|
+
constructor(viewer: Viewer);
|
|
112
|
+
private _CameraChange;
|
|
113
|
+
ToggleCameraSelfRotate(enable: boolean): void;
|
|
114
|
+
GetCameraPose(): Promise<{
|
|
115
|
+
message: any;
|
|
116
|
+
success: boolean;
|
|
117
|
+
result: any;
|
|
118
|
+
}>;
|
|
119
|
+
SetCameraPose(options: CameraPoseData): void;
|
|
120
|
+
ResetCameraPose(): void;
|
|
121
|
+
GetCameraLimit(): void;
|
|
122
|
+
SetCameraLimit(): void;
|
|
123
|
+
SetCameraLockLimit(): void;
|
|
124
|
+
ResetCameraLimit(): void;
|
|
125
|
+
SetCameraSpeed(): void;
|
|
126
|
+
GetCameraSpeed(): void;
|
|
127
|
+
SetCameraAnimation(): void;
|
|
128
|
+
GetCameraAnimation(): void;
|
|
129
|
+
GetCameraInfo(): Promise<{
|
|
130
|
+
message: any;
|
|
131
|
+
success: boolean;
|
|
132
|
+
result: any;
|
|
133
|
+
}>;
|
|
134
|
+
UpdateCamera(options: CameraBase & CameraPoseData): void;
|
|
135
|
+
Move(): void;
|
|
136
|
+
Rotate(): void;
|
|
137
|
+
Around(): void;
|
|
138
|
+
Stop(): void;
|
|
139
|
+
CameraStepMove(): void;
|
|
140
|
+
CameraStepRotate(): void;
|
|
141
|
+
CameraStepZoom(): void;
|
|
142
|
+
StopCameraStepUpdate(): void;
|
|
143
|
+
FlyTo(options: CameraFlytoData): void;
|
|
144
|
+
FocusToNodes(): void;
|
|
145
|
+
Focus(): void;
|
|
146
|
+
FocusToAll(options?: {
|
|
147
|
+
types: string[];
|
|
148
|
+
bFilterForExclude: boolean;
|
|
149
|
+
}): void;
|
|
150
|
+
Follow(): void;
|
|
151
|
+
PlayRoam(): void;
|
|
152
|
+
StopRoam(): void;
|
|
153
|
+
GetCameraRoamingInfo(): void;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
declare interface CameraFlytoData extends Pick<CameraBase, 'rotation'> {
|
|
157
|
+
targetPosition: number[];
|
|
158
|
+
flyTime: number;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
declare interface CameraPoseData extends Pick<CameraBase, 'location' | 'rotation'> {
|
|
162
|
+
flyTime: number;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
declare class CameraRoam {
|
|
166
|
+
constructor();
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* @type {Coord2DType}
|
|
171
|
+
* @alias Array<number>
|
|
172
|
+
*/
|
|
173
|
+
declare type Coord2DType = Array<number>;
|
|
174
|
+
|
|
175
|
+
declare class Coordinate {
|
|
176
|
+
private _viewer;
|
|
177
|
+
get Picker(): {
|
|
178
|
+
PickWorldPointByScreenPos: any;
|
|
179
|
+
};
|
|
180
|
+
constructor(viewer: any);
|
|
181
|
+
GISToCartesian(coord: CoordType[]): Promise<{
|
|
182
|
+
message: any;
|
|
183
|
+
success: boolean;
|
|
184
|
+
result: any;
|
|
185
|
+
}>;
|
|
186
|
+
CartesianToGIS(coord: CoordType[]): Promise<{
|
|
187
|
+
message: any;
|
|
188
|
+
success: boolean;
|
|
189
|
+
result: any;
|
|
190
|
+
}>;
|
|
191
|
+
GISToScreenPos(coord: CoordType[]): Promise<{
|
|
192
|
+
message: any;
|
|
193
|
+
success: boolean;
|
|
194
|
+
result: any;
|
|
195
|
+
}>;
|
|
196
|
+
PickWorldPointByScreenPos(position: number[]): Promise<{
|
|
197
|
+
message: any;
|
|
198
|
+
success: boolean;
|
|
199
|
+
result: any;
|
|
200
|
+
}>;
|
|
201
|
+
CreateCADGeoRef(): void;
|
|
202
|
+
LocalToGlobalGeoRef(): void;
|
|
203
|
+
Exchange(): void;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
declare type CoordType = Array<number>;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* @type {CoordType}
|
|
210
|
+
* @alias Array<number>
|
|
211
|
+
*/
|
|
212
|
+
declare type CoordType_2 = Array<number>;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* @type {CoordZRefType}
|
|
216
|
+
* @alias 'surface'|'ground'|'altitude'
|
|
217
|
+
*/
|
|
218
|
+
declare type CoordZRefType = 'surface' | 'ground' | 'altitude';
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* @type {deepPartial<T>}
|
|
222
|
+
*/
|
|
223
|
+
declare type deepPartial<T> = {
|
|
224
|
+
[K in keyof T]?: T[K] extends object ? deepPartial<T[K]> : T[K];
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
declare interface EntityDrillAtomType {
|
|
228
|
+
allowDrillPicking: boolean;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* @interface EntityEidType
|
|
233
|
+
* @param {string | null} eid (optional)
|
|
234
|
+
*/
|
|
235
|
+
declare interface EntityEidType {
|
|
236
|
+
eid?: string | null;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* @interface EntityFlagAtomType
|
|
241
|
+
* @param {boolean} bLocked
|
|
242
|
+
*/
|
|
243
|
+
declare interface EntityFlagAtomType {
|
|
244
|
+
bLocked: boolean;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* @interface EntityOutlinerAtomType
|
|
249
|
+
* @param {string} index
|
|
250
|
+
*/
|
|
251
|
+
declare interface EntityOutlinerAtomType {
|
|
252
|
+
index: string;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
declare class Event_2 {
|
|
256
|
+
_types: {
|
|
257
|
+
[key: string]: any;
|
|
258
|
+
};
|
|
259
|
+
_cache: {
|
|
260
|
+
[key: string]: Cesium.Event;
|
|
261
|
+
};
|
|
262
|
+
constructor(types?: {
|
|
263
|
+
[key: string]: any;
|
|
264
|
+
});
|
|
265
|
+
on(type: any, callback: any, context?: any): Cesium.Event.RemoveCallback | undefined;
|
|
266
|
+
once(type: any, callback: any, context?: any): void;
|
|
267
|
+
off(type: any, callback: any, context?: any): boolean;
|
|
268
|
+
emit(type: any, ...args: any[]): void;
|
|
269
|
+
_registerEvent(): void;
|
|
270
|
+
getEvent(type: string): Cesium.Event | undefined;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
declare class GroundSkyBox extends SkyBox_2 {
|
|
274
|
+
constructor(options?: any);
|
|
275
|
+
update(frameState: any, useHdr: any): any;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* @interface ICalculateCoordZ
|
|
280
|
+
* @param {CoordZRefType} coordZRef
|
|
281
|
+
* @param {number} coordZOffset
|
|
282
|
+
*/
|
|
283
|
+
declare interface ICalculateCoordZ {
|
|
284
|
+
coordZRef: CoordZRefType;
|
|
285
|
+
coordZOffset: number;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* @interface ICamera
|
|
290
|
+
* @param {number} hideDistance
|
|
291
|
+
* @param {string} hideType
|
|
292
|
+
* @param {string} scaleMode
|
|
293
|
+
*/
|
|
294
|
+
declare interface ICamera {
|
|
295
|
+
hideDistance: number;
|
|
296
|
+
hideType: string;
|
|
297
|
+
scaleMode: string;
|
|
298
|
+
url?: string;
|
|
299
|
+
size?: Array<number>;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* @interface IEntity
|
|
304
|
+
* @param {number} overlapOrder
|
|
305
|
+
*/
|
|
306
|
+
declare interface IEntity {
|
|
307
|
+
overlapOrder: number;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* @interface IInteraction
|
|
312
|
+
* @param {boolean} clickTop
|
|
313
|
+
* @param {boolean} hoverTop
|
|
314
|
+
*/
|
|
315
|
+
declare interface IInteraction {
|
|
316
|
+
clickTop: boolean;
|
|
317
|
+
hoverTop: boolean;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
declare class ImageryProvider {
|
|
321
|
+
static createAmapImageryProvider(options: imageryProviderOptions): Promise<AmapImageryProvider>;
|
|
322
|
+
static createTianDiTuImageryProvider(options: imageryProviderOptions): Promise<TianDiTuImageryProvider>;
|
|
323
|
+
static createImageryProvider(type: string, options: imageryProviderOptions): Promise<AmapImageryProvider>;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
declare interface imageryProviderOptions extends Partial<Cesium.UrlTemplateImageryProvider.ConstructorOptions> {
|
|
327
|
+
style: imageryProviderStyle;
|
|
328
|
+
key?: string;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* 地图图层类型
|
|
333
|
+
* - VECTOR: 矢量图层
|
|
334
|
+
* - RASTER: 影像图层
|
|
335
|
+
* - TOPOGRAPHY: 地形图层
|
|
336
|
+
*/
|
|
337
|
+
declare type imageryProviderStyle = 'vector' | 'raster' | 'topography' | 'vectorMark' | 'rasterMark' | 'topographyMark';
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* @interface IOperations
|
|
341
|
+
* @param {ICalculateCoordZ} calculateCoordZ
|
|
342
|
+
*/
|
|
343
|
+
declare interface IOperations {
|
|
344
|
+
calculateCoordZ: ICalculateCoordZ;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
declare type layerSource = 'gaode' | 'tianditu';
|
|
348
|
+
|
|
349
|
+
declare class MapSwitch extends Widget {
|
|
350
|
+
private _cache;
|
|
351
|
+
private _config;
|
|
352
|
+
constructor(viewer: Viewer);
|
|
353
|
+
_installHook(): void;
|
|
354
|
+
_addItem(map: BaseImageryLayer['options']): void;
|
|
355
|
+
addMap(map: BaseImageryLayer['options']): void;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* @type {MinMaxType}
|
|
360
|
+
* @alias Array<number>
|
|
361
|
+
*/
|
|
362
|
+
declare type MinMaxType = Array<number>;
|
|
363
|
+
|
|
364
|
+
declare class Overlay extends BaseEntityLayer {
|
|
365
|
+
private _eid;
|
|
366
|
+
protected oType: string;
|
|
367
|
+
protected type: string;
|
|
368
|
+
private _state;
|
|
369
|
+
private _bRemoved;
|
|
370
|
+
private _allowDrillPicking;
|
|
371
|
+
private _overlayEvent;
|
|
372
|
+
private _layer;
|
|
373
|
+
private _operations;
|
|
374
|
+
protected layerType: string;
|
|
375
|
+
_delegate: any;
|
|
376
|
+
constructor(data: BasicEntityLayerType & Partial<EntityDrillAtomType>);
|
|
377
|
+
get EntityType(): string;
|
|
378
|
+
get Eid(): string;
|
|
379
|
+
get overlayEvent(): OverlayEvent;
|
|
380
|
+
private _getLayerCollection;
|
|
381
|
+
protected _mountedHook(): void;
|
|
382
|
+
private _onAdd;
|
|
383
|
+
protected _addedHook(): void;
|
|
384
|
+
private _onRemove;
|
|
385
|
+
protected _removedHook(): void;
|
|
386
|
+
Delete(): void;
|
|
387
|
+
emit(type: any, ...params: any[]): void;
|
|
388
|
+
onClick(callback: any, context?: any): void;
|
|
389
|
+
onMouseEnter(callback: any, context?: any): void;
|
|
390
|
+
onMouseLeave(callback: any, context?: any): void;
|
|
391
|
+
protected _visibleHook(visible: any): void;
|
|
392
|
+
protected _getCalculateCoordZ(): {
|
|
393
|
+
reference: Cesium.HeightReference;
|
|
394
|
+
height: number;
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
declare class OverlayEvent extends Event_2 {
|
|
399
|
+
constructor();
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
declare class Poi extends Overlay {
|
|
403
|
+
private _styleCache;
|
|
404
|
+
private _bHover;
|
|
405
|
+
constructor(data: PoiType);
|
|
406
|
+
_mountedHook(): void;
|
|
407
|
+
updateStyle(): Promise<void>;
|
|
408
|
+
private applyBillboard;
|
|
409
|
+
_renderBillboard(poiStyle?: Partial<PoiEntityAtomType>): Promise<{
|
|
410
|
+
image?: undefined;
|
|
411
|
+
pixelOffset?: undefined;
|
|
412
|
+
horizontalOrigin?: undefined;
|
|
413
|
+
verticalOrigin?: undefined;
|
|
414
|
+
} | {
|
|
415
|
+
image: string;
|
|
416
|
+
pixelOffset: Cesium.Cartesian2;
|
|
417
|
+
horizontalOrigin: Cesium.HorizontalOrigin;
|
|
418
|
+
verticalOrigin: Cesium.VerticalOrigin;
|
|
419
|
+
}>;
|
|
420
|
+
computeLayout(poiStyle?: Partial<PoiEntityAtomType>): {
|
|
421
|
+
width: number;
|
|
422
|
+
height: number;
|
|
423
|
+
pivot: {
|
|
424
|
+
x: number;
|
|
425
|
+
y: number;
|
|
426
|
+
};
|
|
427
|
+
marker?: undefined;
|
|
428
|
+
label?: undefined;
|
|
429
|
+
text?: undefined;
|
|
430
|
+
} | {
|
|
431
|
+
width: number;
|
|
432
|
+
height: number;
|
|
433
|
+
pivot: {
|
|
434
|
+
x: number;
|
|
435
|
+
y: number;
|
|
436
|
+
};
|
|
437
|
+
marker: {
|
|
438
|
+
x: number;
|
|
439
|
+
y: number;
|
|
440
|
+
w: number;
|
|
441
|
+
h: number;
|
|
442
|
+
};
|
|
443
|
+
label: {
|
|
444
|
+
x: number;
|
|
445
|
+
y: number;
|
|
446
|
+
w: number;
|
|
447
|
+
h: number;
|
|
448
|
+
};
|
|
449
|
+
text: {
|
|
450
|
+
x: number;
|
|
451
|
+
y: number;
|
|
452
|
+
w: number;
|
|
453
|
+
h: number;
|
|
454
|
+
};
|
|
455
|
+
};
|
|
456
|
+
getClientHeightWidth(poiStyle?: Partial<PoiEntityAtomType>): {
|
|
457
|
+
width: number;
|
|
458
|
+
height: number;
|
|
459
|
+
pivot: {
|
|
460
|
+
x: number;
|
|
461
|
+
y: number;
|
|
462
|
+
};
|
|
463
|
+
marker?: undefined;
|
|
464
|
+
label?: undefined;
|
|
465
|
+
text?: undefined;
|
|
466
|
+
} | {
|
|
467
|
+
width: number;
|
|
468
|
+
height: number;
|
|
469
|
+
pivot: {
|
|
470
|
+
x: number;
|
|
471
|
+
y: number;
|
|
472
|
+
};
|
|
473
|
+
marker: {
|
|
474
|
+
x: number;
|
|
475
|
+
y: number;
|
|
476
|
+
w: number;
|
|
477
|
+
h: number;
|
|
478
|
+
};
|
|
479
|
+
label: {
|
|
480
|
+
x: number;
|
|
481
|
+
y: number;
|
|
482
|
+
w: number;
|
|
483
|
+
h: number;
|
|
484
|
+
};
|
|
485
|
+
text: {
|
|
486
|
+
x: number;
|
|
487
|
+
y: number;
|
|
488
|
+
w: number;
|
|
489
|
+
h: number;
|
|
490
|
+
};
|
|
491
|
+
};
|
|
492
|
+
_updateHook(): void;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
declare interface PoiEntityAtomType {
|
|
496
|
+
markerVisible: boolean;
|
|
497
|
+
markerNormalUrl: string;
|
|
498
|
+
markerActivateUrl: string;
|
|
499
|
+
markerSize: MinMaxType;
|
|
500
|
+
labelVisible: boolean;
|
|
501
|
+
labelBgImageUrl: string;
|
|
502
|
+
labelBgSize: MinMaxType;
|
|
503
|
+
labelBgOffset: Coord2DType;
|
|
504
|
+
labelContent: Array<string>;
|
|
505
|
+
labelContentOffset: Coord2DType;
|
|
506
|
+
labelTop: boolean;
|
|
507
|
+
scrollSpeed: number;
|
|
508
|
+
textBoxWidth: number;
|
|
509
|
+
labelContentJustification: Tjustification;
|
|
510
|
+
labelContentAutoWrap: boolean;
|
|
511
|
+
scrollPolicy: TscrollPolicy;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
declare interface PoiType extends EntityEidType, Partial<BasicInfoAtomType>, Partial<TransformAtom2DType>, Partial<VisibleAtomType>, Partial<EntityFlagAtomType>, Partial<EntityOutlinerAtomType> {
|
|
515
|
+
poiStyle?: Partial<PoiEntityAtomType>;
|
|
516
|
+
visible2D?: deepPartial<Visible2DAtomType>;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
declare interface RegisterEvent {
|
|
520
|
+
name: any;
|
|
521
|
+
func: (...args: any) => void;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
declare class Renderer {
|
|
525
|
+
private _rendererEvent;
|
|
526
|
+
private _viewer;
|
|
527
|
+
private _removeEventsCache;
|
|
528
|
+
constructor(viewer: Viewer);
|
|
529
|
+
Stop(): void;
|
|
530
|
+
RegisterEvent(events: RegisterEvent[]): void;
|
|
531
|
+
RegisterSceneEvent(events: RegisterEvent[]): void;
|
|
532
|
+
RegisterErrorEvent(events: RegisterEvent[]): void;
|
|
533
|
+
UnRegisterEvent(data: string[]): void;
|
|
534
|
+
UnRegisterSceneEvent(data: string[]): void;
|
|
535
|
+
UnRegisterErrorEvent(data: string[]): void;
|
|
536
|
+
emit(eventName: string, ...args: any): void;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
declare class Scene_2 {
|
|
540
|
+
private _viewer;
|
|
541
|
+
private _entitys;
|
|
542
|
+
private _layers;
|
|
543
|
+
get entitys(): any[];
|
|
544
|
+
get layers(): any[];
|
|
545
|
+
constructor(viewer: Viewer);
|
|
546
|
+
Add(entity: any, operations?: IOperations): void;
|
|
547
|
+
Update(): void;
|
|
548
|
+
Updates(): void;
|
|
549
|
+
Create(): void;
|
|
550
|
+
Creates(): void;
|
|
551
|
+
GetAll(): void;
|
|
552
|
+
GetLayers(): any[];
|
|
553
|
+
GetByEids(eids: string[]): Promise<{
|
|
554
|
+
message: any;
|
|
555
|
+
success: boolean;
|
|
556
|
+
result: any;
|
|
557
|
+
}>;
|
|
558
|
+
GetByEntityName(): void;
|
|
559
|
+
GetByCustomId(): void;
|
|
560
|
+
GetByTypes(): void;
|
|
561
|
+
Delete(): void;
|
|
562
|
+
_DeleteCache(id: string): void;
|
|
563
|
+
ClearByTypes(): void;
|
|
564
|
+
ClearByObjects(): void;
|
|
565
|
+
ClearByEids(): void;
|
|
566
|
+
ClearByCustomId(): void;
|
|
567
|
+
ClearByEntityName(): void;
|
|
568
|
+
UpdateByCustomId(): void;
|
|
569
|
+
UpdateByCustomIds(): void;
|
|
570
|
+
UpdateByEntityName(): void;
|
|
571
|
+
UpdateByEntityNames(): void;
|
|
572
|
+
SetVisibleByObjects(): void;
|
|
573
|
+
SetVisible(): void;
|
|
574
|
+
SetLocation(): void;
|
|
575
|
+
SetLocations(): void;
|
|
576
|
+
SetRotator(): void;
|
|
577
|
+
SetRotators(): void;
|
|
578
|
+
SetScale3D(): void;
|
|
579
|
+
SetScale3Ds(): void;
|
|
580
|
+
SetLocked(): void;
|
|
581
|
+
GetBound(): void;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
declare class SceneEvent extends Event_2 {
|
|
585
|
+
_camera: Camera;
|
|
586
|
+
_scene: Scene;
|
|
587
|
+
_clock: Clock;
|
|
588
|
+
constructor(viewer: Viewer);
|
|
589
|
+
on(type: any, callback: any, context?: any): Event_3.RemoveCallback | undefined;
|
|
590
|
+
off(type: any, callback: any, context?: any): boolean;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
declare class SkyBox {
|
|
594
|
+
private _defaultSkyBox;
|
|
595
|
+
private _groundSkyBox;
|
|
596
|
+
private _height;
|
|
597
|
+
private _viewer;
|
|
598
|
+
constructor(viewer: Viewer);
|
|
599
|
+
/**
|
|
600
|
+
* 创建近地天空盒
|
|
601
|
+
* @param options 近地天空盒参数
|
|
602
|
+
* @returns 近地天空盒实例
|
|
603
|
+
*/
|
|
604
|
+
GroundSkyBox(options: ConstructorParameters<typeof GroundSkyBox>[0] & {
|
|
605
|
+
offsetAngle?: number;
|
|
606
|
+
}): void;
|
|
607
|
+
/**
|
|
608
|
+
* 设置默认天空盒
|
|
609
|
+
*/
|
|
610
|
+
Default(options: ConstructorParameters<typeof Cesium.SkyBox>[0]): void;
|
|
611
|
+
/**
|
|
612
|
+
* 重置天空盒为默认值
|
|
613
|
+
*/
|
|
614
|
+
Reset(): void;
|
|
615
|
+
_SetSkyBox(skyBox: Cesium.SkyBox, skyAtmosphere: boolean): void;
|
|
616
|
+
EventListener(): void;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
declare const SkyBox_2: any;
|
|
620
|
+
|
|
621
|
+
declare class Terrain {
|
|
622
|
+
private _scene;
|
|
623
|
+
constructor(scene: Cesium.Scene);
|
|
624
|
+
createEllipsoidTerrain(options?: ConstructorParameters<typeof Cesium.EllipsoidTerrainProvider>[0]): Promise<Cesium.EllipsoidTerrainProvider>;
|
|
625
|
+
createWorldTerrain(options?: Parameters<typeof Cesium.Terrain.fromWorldTerrain>[0]): Cesium.Terrain;
|
|
626
|
+
createUrlTerrain(options?: Cesium.CesiumTerrainProvider.ConstructorOptions & {
|
|
627
|
+
url: string;
|
|
628
|
+
}): Promise<Cesium.CesiumTerrainProvider>;
|
|
629
|
+
createGoogleTerrain(options?: Cesium.GoogleEarthEnterpriseTerrainProvider.ConstructorOptions): Promise<Cesium.GoogleEarthEnterpriseTerrainProvider>;
|
|
630
|
+
createArcgisTerrain(options: any): Promise<Cesium.ArcGISTiledElevationTerrainProvider>;
|
|
631
|
+
createTerrain(type: any, options?: any): Promise<Cesium.CesiumTerrainProvider> | Cesium.Terrain;
|
|
632
|
+
setTerrain(terrain?: Cesium.Terrain | Promise<Cesium.TerrainProvider>): void;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
declare class TianDiTuImageryProvider extends Cesium.UrlTemplateImageryProvider {
|
|
636
|
+
constructor(options: imageryProviderOptions);
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
declare type Tjustification = 'Left' | 'Center' | 'Right';
|
|
640
|
+
|
|
641
|
+
declare class Tools {
|
|
642
|
+
private _coordinate;
|
|
643
|
+
constructor(viewer: any);
|
|
644
|
+
get Coordinate(): Coordinate;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* @interface TransformAtom2DType
|
|
649
|
+
* @param {CoordType} location
|
|
650
|
+
*/
|
|
651
|
+
declare interface TransformAtom2DType {
|
|
652
|
+
location: CoordType_2;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
declare type TscrollPolicy = 'default' | 'always';
|
|
656
|
+
|
|
657
|
+
declare class Viewer {
|
|
658
|
+
private _delegate;
|
|
659
|
+
private _baseLayerPicker;
|
|
660
|
+
private _widgetContainer;
|
|
661
|
+
private _widgets;
|
|
662
|
+
private _skyBox;
|
|
663
|
+
private _renderer;
|
|
664
|
+
private _sceneEvent;
|
|
665
|
+
private _viewerEvent;
|
|
666
|
+
private _mouseEvent;
|
|
667
|
+
private _terrain;
|
|
668
|
+
private _scene;
|
|
669
|
+
private _cameraControl;
|
|
670
|
+
private _tools;
|
|
671
|
+
ImageryProvider: typeof ImageryProvider;
|
|
672
|
+
CameraRoam: typeof CameraRoam;
|
|
673
|
+
get delegate(): Cesium.CesiumWidget;
|
|
674
|
+
get clock(): Cesium.Clock;
|
|
675
|
+
get scene(): Cesium.Scene;
|
|
676
|
+
get camera(): Cesium.Camera;
|
|
677
|
+
get dataSources(): Cesium.DataSourceCollection;
|
|
678
|
+
get canvas(): HTMLCanvasElement;
|
|
679
|
+
get widgetContainer(): HTMLElement;
|
|
680
|
+
get widgets(): {
|
|
681
|
+
mapSwitch: MapSwitch;
|
|
682
|
+
};
|
|
683
|
+
get skyBox(): SkyBox;
|
|
684
|
+
get Renderer(): Renderer;
|
|
685
|
+
get viewerEvent(): ViewerEvent;
|
|
686
|
+
get sceneEvent(): SceneEvent;
|
|
687
|
+
get Terrain(): Terrain;
|
|
688
|
+
get Scene(): Scene_2;
|
|
689
|
+
get CameraControl(): CameraControl;
|
|
690
|
+
get Tools(): Tools;
|
|
691
|
+
get imageryLayers(): Cesium.ImageryLayerCollection;
|
|
692
|
+
get Poi(): typeof Poi;
|
|
693
|
+
constructor(options: WWSYCesiumType);
|
|
694
|
+
private init;
|
|
695
|
+
destroy(): void;
|
|
696
|
+
addBaseLayer(baseLayer: Cesium.ImageryLayer | Cesium.ImageryLayer[], options: BaseImageryLayer['options']): this;
|
|
697
|
+
changeBaseLayer(index: number): void;
|
|
698
|
+
}
|
|
699
|
+
export default Viewer;
|
|
700
|
+
|
|
701
|
+
declare class ViewerEvent extends Event_2 {
|
|
702
|
+
constructor();
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* @interface Visible2DAtomType
|
|
707
|
+
* @param {ICamera} camera
|
|
708
|
+
* @param {IInteraction} interaction
|
|
709
|
+
* @param {IEntity} entity
|
|
710
|
+
*/
|
|
711
|
+
declare interface Visible2DAtomType {
|
|
712
|
+
camera: ICamera;
|
|
713
|
+
interaction: IInteraction;
|
|
714
|
+
entity: IEntity;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* @interface VisibleAtomType
|
|
719
|
+
* @param {boolean} bVisible
|
|
720
|
+
*/
|
|
721
|
+
declare interface VisibleAtomType {
|
|
722
|
+
bVisible: boolean;
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
declare class Widget {
|
|
726
|
+
_enable: boolean;
|
|
727
|
+
_wrapper: HTMLElement | undefined;
|
|
728
|
+
_ready: boolean;
|
|
729
|
+
_viewer: Viewer;
|
|
730
|
+
constructor(viewer: Viewer);
|
|
731
|
+
Start(): void;
|
|
732
|
+
End(): void;
|
|
733
|
+
hide(): void;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
declare interface WWSYCesiumType {
|
|
737
|
+
target: string;
|
|
738
|
+
accessToken: string;
|
|
739
|
+
tiandituKey?: string;
|
|
740
|
+
layerSource?: layerSource;
|
|
741
|
+
layerType?: 'vector' | 'raster' | 'topography';
|
|
742
|
+
layerMark?: boolean;
|
|
743
|
+
resolution: [number, number];
|
|
744
|
+
northFixAngle?: number;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
export { }
|