@wwsy/cesium 0.0.4 → 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 +458 -301
- package/dist/index.js +778 -89
- package/dist/index.umd.cjs +3 -3
- package/package.json +2 -3
package/dist/index.d.ts
CHANGED
|
@@ -2,39 +2,67 @@ import { Camera } from 'cesium';
|
|
|
2
2
|
import * as Cesium from 'cesium';
|
|
3
3
|
import { Clock } from 'cesium';
|
|
4
4
|
import { Event as Event_3 } from 'cesium';
|
|
5
|
-
import { Scene
|
|
5
|
+
import { Scene } from 'cesium';
|
|
6
6
|
|
|
7
7
|
declare class AmapImageryProvider extends Cesium.UrlTemplateImageryProvider {
|
|
8
8
|
constructor(options: imageryProviderOptions);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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;
|
|
38
66
|
}
|
|
39
67
|
|
|
40
68
|
declare interface BaseImageryLayer {
|
|
@@ -47,33 +75,48 @@ declare interface BaseImageryLayer {
|
|
|
47
75
|
};
|
|
48
76
|
}
|
|
49
77
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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;
|
|
60
105
|
}
|
|
61
106
|
|
|
62
|
-
|
|
107
|
+
declare class CameraControl {
|
|
63
108
|
private _options;
|
|
64
109
|
private _viewer;
|
|
65
110
|
private _animationInstance;
|
|
66
111
|
constructor(viewer: Viewer);
|
|
112
|
+
private _CameraChange;
|
|
67
113
|
ToggleCameraSelfRotate(enable: boolean): void;
|
|
68
|
-
GetCameraPose():
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
};
|
|
75
|
-
flyTime: number;
|
|
76
|
-
}): void;
|
|
114
|
+
GetCameraPose(): Promise<{
|
|
115
|
+
message: any;
|
|
116
|
+
success: boolean;
|
|
117
|
+
result: any;
|
|
118
|
+
}>;
|
|
119
|
+
SetCameraPose(options: CameraPoseData): void;
|
|
77
120
|
ResetCameraPose(): void;
|
|
78
121
|
GetCameraLimit(): void;
|
|
79
122
|
SetCameraLimit(): void;
|
|
@@ -83,8 +126,12 @@ export declare class CameraControl {
|
|
|
83
126
|
GetCameraSpeed(): void;
|
|
84
127
|
SetCameraAnimation(): void;
|
|
85
128
|
GetCameraAnimation(): void;
|
|
86
|
-
GetCameraInfo():
|
|
87
|
-
|
|
129
|
+
GetCameraInfo(): Promise<{
|
|
130
|
+
message: any;
|
|
131
|
+
success: boolean;
|
|
132
|
+
result: any;
|
|
133
|
+
}>;
|
|
134
|
+
UpdateCamera(options: CameraBase & CameraPoseData): void;
|
|
88
135
|
Move(): void;
|
|
89
136
|
Rotate(): void;
|
|
90
137
|
Around(): void;
|
|
@@ -93,43 +140,61 @@ export declare class CameraControl {
|
|
|
93
140
|
CameraStepRotate(): void;
|
|
94
141
|
CameraStepZoom(): void;
|
|
95
142
|
StopCameraStepUpdate(): void;
|
|
96
|
-
FlyTo(): void;
|
|
143
|
+
FlyTo(options: CameraFlytoData): void;
|
|
97
144
|
FocusToNodes(): void;
|
|
98
145
|
Focus(): void;
|
|
99
|
-
FocusToAll(
|
|
146
|
+
FocusToAll(options?: {
|
|
147
|
+
types: string[];
|
|
148
|
+
bFilterForExclude: boolean;
|
|
149
|
+
}): void;
|
|
100
150
|
Follow(): void;
|
|
101
151
|
PlayRoam(): void;
|
|
102
152
|
StopRoam(): void;
|
|
103
153
|
GetCameraRoamingInfo(): void;
|
|
104
154
|
}
|
|
105
155
|
|
|
106
|
-
|
|
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 {
|
|
107
166
|
constructor();
|
|
108
167
|
}
|
|
109
168
|
|
|
110
|
-
|
|
169
|
+
/**
|
|
170
|
+
* @type {Coord2DType}
|
|
171
|
+
* @alias Array<number>
|
|
172
|
+
*/
|
|
173
|
+
declare type Coord2DType = Array<number>;
|
|
174
|
+
|
|
175
|
+
declare class Coordinate {
|
|
111
176
|
private _viewer;
|
|
112
177
|
get Picker(): {
|
|
113
178
|
PickWorldPointByScreenPos: any;
|
|
114
179
|
};
|
|
115
180
|
constructor(viewer: any);
|
|
116
181
|
GISToCartesian(coord: CoordType[]): Promise<{
|
|
117
|
-
message:
|
|
182
|
+
message: any;
|
|
118
183
|
success: boolean;
|
|
119
184
|
result: any;
|
|
120
185
|
}>;
|
|
121
186
|
CartesianToGIS(coord: CoordType[]): Promise<{
|
|
122
|
-
message:
|
|
187
|
+
message: any;
|
|
123
188
|
success: boolean;
|
|
124
189
|
result: any;
|
|
125
190
|
}>;
|
|
126
191
|
GISToScreenPos(coord: CoordType[]): Promise<{
|
|
127
|
-
message:
|
|
192
|
+
message: any;
|
|
128
193
|
success: boolean;
|
|
129
194
|
result: any;
|
|
130
195
|
}>;
|
|
131
196
|
PickWorldPointByScreenPos(position: number[]): Promise<{
|
|
132
|
-
message:
|
|
197
|
+
message: any;
|
|
133
198
|
success: boolean;
|
|
134
199
|
result: any;
|
|
135
200
|
}>;
|
|
@@ -138,71 +203,54 @@ export declare class Coordinate {
|
|
|
138
203
|
Exchange(): void;
|
|
139
204
|
}
|
|
140
205
|
|
|
206
|
+
declare type CoordType = Array<number>;
|
|
207
|
+
|
|
141
208
|
/**
|
|
142
|
-
* @
|
|
209
|
+
* @type {CoordType}
|
|
210
|
+
* @alias Array<number>
|
|
143
211
|
*/
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
* WGS-84 To GCJ-02
|
|
162
|
-
* @param lng
|
|
163
|
-
* @param lat
|
|
164
|
-
* @returns {number[]}
|
|
165
|
-
*/
|
|
166
|
-
static WGS84ToGCJ02(lng: any, lat: any): any[];
|
|
167
|
-
/**
|
|
168
|
-
* GCJ-02 To WGS-84
|
|
169
|
-
* @param lng
|
|
170
|
-
* @param lat
|
|
171
|
-
* @returns {number[]}
|
|
172
|
-
* @constructor
|
|
173
|
-
*/
|
|
174
|
-
static GCJ02ToWGS84(lng: any, lat: any): any[];
|
|
175
|
-
/**
|
|
176
|
-
*
|
|
177
|
-
* @param lng
|
|
178
|
-
* @param lat
|
|
179
|
-
* @returns {number[]}
|
|
180
|
-
*/
|
|
181
|
-
static delta(lng: any, lat: any): any[];
|
|
182
|
-
/**
|
|
183
|
-
*
|
|
184
|
-
* @param lng
|
|
185
|
-
* @param lat
|
|
186
|
-
* @returns {number}
|
|
187
|
-
*/
|
|
188
|
-
static transformLng(lng: any, lat: any): any;
|
|
189
|
-
/**
|
|
190
|
-
*
|
|
191
|
-
* @param lng
|
|
192
|
-
* @param lat
|
|
193
|
-
* @returns {number}
|
|
194
|
-
*/
|
|
195
|
-
static transformLat(lng: any, lat: any): number;
|
|
196
|
-
/**
|
|
197
|
-
*
|
|
198
|
-
* @param lng
|
|
199
|
-
* @param lat
|
|
200
|
-
* @returns {boolean}
|
|
201
|
-
*/
|
|
202
|
-
static out_of_china(lng: any, lat: any): boolean;
|
|
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;
|
|
203
229
|
}
|
|
204
230
|
|
|
205
|
-
|
|
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
|
+
}
|
|
206
254
|
|
|
207
255
|
declare class Event_2 {
|
|
208
256
|
_types: {
|
|
@@ -221,14 +269,55 @@ declare class Event_2 {
|
|
|
221
269
|
_registerEvent(): void;
|
|
222
270
|
getEvent(type: string): Cesium.Event | undefined;
|
|
223
271
|
}
|
|
224
|
-
export { Event_2 as Event }
|
|
225
272
|
|
|
226
273
|
declare class GroundSkyBox extends SkyBox_2 {
|
|
227
274
|
constructor(options?: any);
|
|
228
275
|
update(frameState: any, useHdr: any): any;
|
|
229
276
|
}
|
|
230
277
|
|
|
231
|
-
|
|
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 {
|
|
232
321
|
static createAmapImageryProvider(options: imageryProviderOptions): Promise<AmapImageryProvider>;
|
|
233
322
|
static createTianDiTuImageryProvider(options: imageryProviderOptions): Promise<TianDiTuImageryProvider>;
|
|
234
323
|
static createImageryProvider(type: string, options: imageryProviderOptions): Promise<AmapImageryProvider>;
|
|
@@ -247,6 +336,14 @@ declare interface imageryProviderOptions extends Partial<Cesium.UrlTemplateImage
|
|
|
247
336
|
*/
|
|
248
337
|
declare type imageryProviderStyle = 'vector' | 'raster' | 'topography' | 'vectorMark' | 'rasterMark' | 'topographyMark';
|
|
249
338
|
|
|
339
|
+
/**
|
|
340
|
+
* @interface IOperations
|
|
341
|
+
* @param {ICalculateCoordZ} calculateCoordZ
|
|
342
|
+
*/
|
|
343
|
+
declare interface IOperations {
|
|
344
|
+
calculateCoordZ: ICalculateCoordZ;
|
|
345
|
+
}
|
|
346
|
+
|
|
250
347
|
declare type layerSource = 'gaode' | 'tianditu';
|
|
251
348
|
|
|
252
349
|
declare class MapSwitch extends Widget {
|
|
@@ -258,105 +355,165 @@ declare class MapSwitch extends Widget {
|
|
|
258
355
|
addMap(map: BaseImageryLayer['options']): void;
|
|
259
356
|
}
|
|
260
357
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
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;
|
|
282
395
|
};
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
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
|
+
};
|
|
289
455
|
};
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
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
|
+
};
|
|
303
491
|
};
|
|
304
|
-
|
|
305
|
-
}
|
|
306
|
-
export { MouseEvent_2 as MouseEvent }
|
|
307
|
-
|
|
308
|
-
export declare const MouseEventType: {
|
|
309
|
-
MOUSE_MOVE: Cesium.ScreenSpaceEventType;
|
|
310
|
-
WHEEL: Cesium.ScreenSpaceEventType;
|
|
311
|
-
MOUSE_OVER: string;
|
|
312
|
-
MOUSE_OUT: string;
|
|
313
|
-
LEFT_DOWN: Cesium.ScreenSpaceEventType;
|
|
314
|
-
LEFT_UP: Cesium.ScreenSpaceEventType;
|
|
315
|
-
CLICK: Cesium.ScreenSpaceEventType;
|
|
316
|
-
RIGHT_DOWN: Cesium.ScreenSpaceEventType;
|
|
317
|
-
RIGHT_UP: Cesium.ScreenSpaceEventType;
|
|
318
|
-
RIGHT_CLICK: Cesium.ScreenSpaceEventType;
|
|
319
|
-
DB_CLICK: Cesium.ScreenSpaceEventType;
|
|
320
|
-
};
|
|
492
|
+
_updateHook(): void;
|
|
493
|
+
}
|
|
321
494
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
clone(): Position;
|
|
345
|
-
copy(): Position;
|
|
346
|
-
toArray(): number[];
|
|
347
|
-
toString(): string;
|
|
348
|
-
toObject(): {
|
|
349
|
-
lng: number;
|
|
350
|
-
lat: number;
|
|
351
|
-
alt: number;
|
|
352
|
-
heading: number;
|
|
353
|
-
pitch: number;
|
|
354
|
-
roll: number;
|
|
355
|
-
};
|
|
356
|
-
static fromArray(arr: any): Position;
|
|
357
|
-
static fromString(str: any): Position;
|
|
358
|
-
static fromObject(obj: any): Position;
|
|
359
|
-
static deserialize(valStr: any): Position;
|
|
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>;
|
|
360
517
|
}
|
|
361
518
|
|
|
362
519
|
declare interface RegisterEvent {
|
|
@@ -364,7 +521,7 @@ declare interface RegisterEvent {
|
|
|
364
521
|
func: (...args: any) => void;
|
|
365
522
|
}
|
|
366
523
|
|
|
367
|
-
|
|
524
|
+
declare class Renderer {
|
|
368
525
|
private _rendererEvent;
|
|
369
526
|
private _viewer;
|
|
370
527
|
private _removeEventsCache;
|
|
@@ -379,67 +536,61 @@ export declare class Renderer {
|
|
|
379
536
|
emit(eventName: string, ...args: any): void;
|
|
380
537
|
}
|
|
381
538
|
|
|
382
|
-
|
|
383
|
-
_viewer: Viewer;
|
|
384
|
-
constructor(viewer: Viewer);
|
|
385
|
-
on(type: any, callback: any, context?: any): Cesium.Event.RemoveCallback | undefined;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
export declare const RenderEventType: {
|
|
389
|
-
onVideoReady: string;
|
|
390
|
-
stopedRenderCloud: string;
|
|
391
|
-
};
|
|
392
|
-
|
|
393
|
-
export declare const RenderSceneEventType: {
|
|
394
|
-
OnWdpSceneIsReady: string;
|
|
395
|
-
OnWdpSceneChanged: string;
|
|
396
|
-
OnMouseEnterEntity: string;
|
|
397
|
-
OnMouseOutEntity: string;
|
|
398
|
-
OnEntityClicked: string;
|
|
399
|
-
OnEntityDbClicked: string;
|
|
400
|
-
OnWebJSEvent: string;
|
|
401
|
-
MeasureResult: string;
|
|
402
|
-
OnMoveAlongPathProcessEvent: string;
|
|
403
|
-
OnRealTimeVideoEvent: string;
|
|
404
|
-
OnMoveAlongPathEndEvent: string;
|
|
405
|
-
OnCameraMotionStartEvent: string;
|
|
406
|
-
OnCameraMotionEndEvent: string;
|
|
407
|
-
OnCameraRoamingFrame: string;
|
|
408
|
-
PickPointEvent: string;
|
|
409
|
-
OnEntitySelectionChanged: string;
|
|
410
|
-
OnEntityNodeSelectionChanged: string;
|
|
411
|
-
OnEntityReady: string;
|
|
412
|
-
OnCreateGeoLayerEvent: string;
|
|
413
|
-
OnGeoLayerFeatureClicked: string;
|
|
414
|
-
};
|
|
415
|
-
|
|
416
|
-
export declare class Scene {
|
|
539
|
+
declare class Scene_2 {
|
|
417
540
|
private _viewer;
|
|
541
|
+
private _entitys;
|
|
542
|
+
private _layers;
|
|
543
|
+
get entitys(): any[];
|
|
544
|
+
get layers(): any[];
|
|
418
545
|
constructor(viewer: Viewer);
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
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 {
|
|
422
585
|
_camera: Camera;
|
|
423
|
-
_scene:
|
|
586
|
+
_scene: Scene;
|
|
424
587
|
_clock: Clock;
|
|
425
588
|
constructor(viewer: Viewer);
|
|
426
589
|
on(type: any, callback: any, context?: any): Event_3.RemoveCallback | undefined;
|
|
427
590
|
off(type: any, callback: any, context?: any): boolean;
|
|
428
591
|
}
|
|
429
592
|
|
|
430
|
-
|
|
431
|
-
CAMERA_MOVE_END: string;
|
|
432
|
-
CAMERA_CHANGED: string;
|
|
433
|
-
PRE_UPDATE: string;
|
|
434
|
-
POST_UPDATE: string;
|
|
435
|
-
PRE_RENDER: string;
|
|
436
|
-
POST_RENDER: string;
|
|
437
|
-
MORPH_COMPLETE: string;
|
|
438
|
-
CLOCK_TICK: string;
|
|
439
|
-
RENDER_ERROR: string;
|
|
440
|
-
};
|
|
441
|
-
|
|
442
|
-
export declare class SkyBox {
|
|
593
|
+
declare class SkyBox {
|
|
443
594
|
private _defaultSkyBox;
|
|
444
595
|
private _groundSkyBox;
|
|
445
596
|
private _height;
|
|
@@ -467,7 +618,7 @@ export declare class SkyBox {
|
|
|
467
618
|
|
|
468
619
|
declare const SkyBox_2: any;
|
|
469
620
|
|
|
470
|
-
|
|
621
|
+
declare class Terrain {
|
|
471
622
|
private _scene;
|
|
472
623
|
constructor(scene: Cesium.Scene);
|
|
473
624
|
createEllipsoidTerrain(options?: ConstructorParameters<typeof Cesium.EllipsoidTerrainProvider>[0]): Promise<Cesium.EllipsoidTerrainProvider>;
|
|
@@ -485,26 +636,24 @@ declare class TianDiTuImageryProvider extends Cesium.UrlTemplateImageryProvider
|
|
|
485
636
|
constructor(options: imageryProviderOptions);
|
|
486
637
|
}
|
|
487
638
|
|
|
488
|
-
|
|
639
|
+
declare type Tjustification = 'Left' | 'Center' | 'Right';
|
|
640
|
+
|
|
641
|
+
declare class Tools {
|
|
489
642
|
private _coordinate;
|
|
490
643
|
constructor(viewer: any);
|
|
491
644
|
get Coordinate(): Coordinate;
|
|
492
645
|
}
|
|
493
646
|
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
static transformWGS84ArrayToCartesianArray(WGS84Arr: any): any;
|
|
501
|
-
static transformWGS84ToMercator(position: any): Position;
|
|
502
|
-
static transformMercatorToWGS84(position: any): Position;
|
|
503
|
-
static transformWindowToWGS84(position: any, viewer: Viewer): Position;
|
|
504
|
-
static transformWindowToCartesian(position: any, viewer: Viewer): any;
|
|
505
|
-
static transformWGS84ToWindow(position: any, viewer: any): Cesium.Cartesian2;
|
|
647
|
+
/**
|
|
648
|
+
* @interface TransformAtom2DType
|
|
649
|
+
* @param {CoordType} location
|
|
650
|
+
*/
|
|
651
|
+
declare interface TransformAtom2DType {
|
|
652
|
+
location: CoordType_2;
|
|
506
653
|
}
|
|
507
654
|
|
|
655
|
+
declare type TscrollPolicy = 'default' | 'always';
|
|
656
|
+
|
|
508
657
|
declare class Viewer {
|
|
509
658
|
private _delegate;
|
|
510
659
|
private _baseLayerPicker;
|
|
@@ -525,6 +674,7 @@ declare class Viewer {
|
|
|
525
674
|
get clock(): Cesium.Clock;
|
|
526
675
|
get scene(): Cesium.Scene;
|
|
527
676
|
get camera(): Cesium.Camera;
|
|
677
|
+
get dataSources(): Cesium.DataSourceCollection;
|
|
528
678
|
get canvas(): HTMLCanvasElement;
|
|
529
679
|
get widgetContainer(): HTMLElement;
|
|
530
680
|
get widgets(): {
|
|
@@ -535,37 +685,42 @@ declare class Viewer {
|
|
|
535
685
|
get viewerEvent(): ViewerEvent;
|
|
536
686
|
get sceneEvent(): SceneEvent;
|
|
537
687
|
get Terrain(): Terrain;
|
|
538
|
-
get Scene():
|
|
688
|
+
get Scene(): Scene_2;
|
|
539
689
|
get CameraControl(): CameraControl;
|
|
540
690
|
get Tools(): Tools;
|
|
691
|
+
get imageryLayers(): Cesium.ImageryLayerCollection;
|
|
692
|
+
get Poi(): typeof Poi;
|
|
541
693
|
constructor(options: WWSYCesiumType);
|
|
542
694
|
private init;
|
|
543
695
|
destroy(): void;
|
|
544
696
|
addBaseLayer(baseLayer: Cesium.ImageryLayer | Cesium.ImageryLayer[], options: BaseImageryLayer['options']): this;
|
|
545
697
|
changeBaseLayer(index: number): void;
|
|
546
698
|
}
|
|
547
|
-
export { Viewer }
|
|
548
699
|
export default Viewer;
|
|
549
700
|
|
|
550
|
-
|
|
701
|
+
declare class ViewerEvent extends Event_2 {
|
|
551
702
|
constructor();
|
|
552
703
|
}
|
|
553
704
|
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
}
|
|
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
|
+
}
|
|
569
724
|
|
|
570
725
|
declare class Widget {
|
|
571
726
|
_enable: boolean;
|
|
@@ -585,6 +740,8 @@ declare interface WWSYCesiumType {
|
|
|
585
740
|
layerSource?: layerSource;
|
|
586
741
|
layerType?: 'vector' | 'raster' | 'topography';
|
|
587
742
|
layerMark?: boolean;
|
|
743
|
+
resolution: [number, number];
|
|
744
|
+
northFixAngle?: number;
|
|
588
745
|
}
|
|
589
746
|
|
|
590
747
|
export { }
|