@wwsy/cesium 0.0.2 → 0.0.4
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 +590 -0
- package/package.json +9 -6
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,590 @@
|
|
|
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 as Scene_2 } from 'cesium';
|
|
6
|
+
|
|
7
|
+
declare class AmapImageryProvider extends Cesium.UrlTemplateImageryProvider {
|
|
8
|
+
constructor(options: imageryProviderOptions);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare class Animation_2 {
|
|
12
|
+
_viewer: Viewer;
|
|
13
|
+
constructor(viewer: Viewer);
|
|
14
|
+
_bindEvent(): void;
|
|
15
|
+
_unbindEvent(): void;
|
|
16
|
+
start(): this;
|
|
17
|
+
stop(): this;
|
|
18
|
+
}
|
|
19
|
+
export { Animation_2 as Animation }
|
|
20
|
+
|
|
21
|
+
export declare class AroundPoint extends Animation_2 {
|
|
22
|
+
constructor(viewer: Viewer, options: any);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export declare class AroundView extends Animation_2 {
|
|
26
|
+
private _options;
|
|
27
|
+
private _aroundAmount;
|
|
28
|
+
constructor(viewer: Viewer);
|
|
29
|
+
_bindEvent(): void;
|
|
30
|
+
_unbindEvent(): void;
|
|
31
|
+
private _update;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export declare class Attachment {
|
|
35
|
+
private _viewer;
|
|
36
|
+
constructor(viewer: Viewer);
|
|
37
|
+
createEvent(): void;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
declare interface BaseImageryLayer {
|
|
41
|
+
id: string;
|
|
42
|
+
layers: Cesium.ImageryLayer[];
|
|
43
|
+
cache: Cesium.ImageryLayer[];
|
|
44
|
+
options: Cesium.ImageryLayer.ConstructorOptions & {
|
|
45
|
+
name: string;
|
|
46
|
+
iconUrl?: string;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export declare class BaseLayerPicker {
|
|
51
|
+
private _imageryLayers;
|
|
52
|
+
private _selectedImageryLayer;
|
|
53
|
+
private _count;
|
|
54
|
+
private _viewer;
|
|
55
|
+
set selectedImageryLayer(imageryLayer: BaseImageryLayer);
|
|
56
|
+
get selectedImageryLayer(): BaseImageryLayer;
|
|
57
|
+
constructor(viewer: Viewer);
|
|
58
|
+
addImageryLayer(imageryLayer: Cesium.ImageryLayer | Cesium.ImageryLayer[], options: BaseImageryLayer['options']): this;
|
|
59
|
+
changeImageryLayer(index: number): this;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export declare class CameraControl {
|
|
63
|
+
private _options;
|
|
64
|
+
private _viewer;
|
|
65
|
+
private _animationInstance;
|
|
66
|
+
constructor(viewer: Viewer);
|
|
67
|
+
ToggleCameraSelfRotate(enable: boolean): void;
|
|
68
|
+
GetCameraPose(): void;
|
|
69
|
+
SetCameraPose(options: {
|
|
70
|
+
location: number[];
|
|
71
|
+
rotation: {
|
|
72
|
+
pitch: number;
|
|
73
|
+
yaw: number;
|
|
74
|
+
};
|
|
75
|
+
flyTime: number;
|
|
76
|
+
}): void;
|
|
77
|
+
ResetCameraPose(): void;
|
|
78
|
+
GetCameraLimit(): void;
|
|
79
|
+
SetCameraLimit(): void;
|
|
80
|
+
SetCameraLockLimit(): void;
|
|
81
|
+
ResetCameraLimit(): void;
|
|
82
|
+
SetCameraSpeed(): void;
|
|
83
|
+
GetCameraSpeed(): void;
|
|
84
|
+
SetCameraAnimation(): void;
|
|
85
|
+
GetCameraAnimation(): void;
|
|
86
|
+
GetCameraInfo(): void;
|
|
87
|
+
UpdateCamera(): void;
|
|
88
|
+
Move(): void;
|
|
89
|
+
Rotate(): void;
|
|
90
|
+
Around(): void;
|
|
91
|
+
Stop(): void;
|
|
92
|
+
CameraStepMove(): void;
|
|
93
|
+
CameraStepRotate(): void;
|
|
94
|
+
CameraStepZoom(): void;
|
|
95
|
+
StopCameraStepUpdate(): void;
|
|
96
|
+
FlyTo(): void;
|
|
97
|
+
FocusToNodes(): void;
|
|
98
|
+
Focus(): void;
|
|
99
|
+
FocusToAll(): void;
|
|
100
|
+
Follow(): void;
|
|
101
|
+
PlayRoam(): void;
|
|
102
|
+
StopRoam(): void;
|
|
103
|
+
GetCameraRoamingInfo(): void;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export declare class CameraRoam {
|
|
107
|
+
constructor();
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export declare class Coordinate {
|
|
111
|
+
private _viewer;
|
|
112
|
+
get Picker(): {
|
|
113
|
+
PickWorldPointByScreenPos: any;
|
|
114
|
+
};
|
|
115
|
+
constructor(viewer: any);
|
|
116
|
+
GISToCartesian(coord: CoordType[]): Promise<{
|
|
117
|
+
message: string;
|
|
118
|
+
success: boolean;
|
|
119
|
+
result: any;
|
|
120
|
+
}>;
|
|
121
|
+
CartesianToGIS(coord: CoordType[]): Promise<{
|
|
122
|
+
message: string;
|
|
123
|
+
success: boolean;
|
|
124
|
+
result: any;
|
|
125
|
+
}>;
|
|
126
|
+
GISToScreenPos(coord: CoordType[]): Promise<{
|
|
127
|
+
message: string;
|
|
128
|
+
success: boolean;
|
|
129
|
+
result: any;
|
|
130
|
+
}>;
|
|
131
|
+
PickWorldPointByScreenPos(position: number[]): Promise<{
|
|
132
|
+
message: string;
|
|
133
|
+
success: boolean;
|
|
134
|
+
result: any;
|
|
135
|
+
}>;
|
|
136
|
+
CreateCADGeoRef(): void;
|
|
137
|
+
LocalToGlobalGeoRef(): void;
|
|
138
|
+
Exchange(): void;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* @Author : Caven Chen
|
|
143
|
+
*/
|
|
144
|
+
export declare class CoordTransform {
|
|
145
|
+
/**
|
|
146
|
+
* BD-09 To GCJ-02
|
|
147
|
+
* @param lng
|
|
148
|
+
* @param lat
|
|
149
|
+
* @returns {number[]}
|
|
150
|
+
*/
|
|
151
|
+
static BD09ToGCJ02(lng: any, lat: any): number[];
|
|
152
|
+
/**
|
|
153
|
+
* GCJ-02 To BD-09
|
|
154
|
+
* @param lng
|
|
155
|
+
* @param lat
|
|
156
|
+
* @returns {number[]}
|
|
157
|
+
* @constructor
|
|
158
|
+
*/
|
|
159
|
+
static GCJ02ToBD09(lng: any, lat: any): number[];
|
|
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;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
declare type CoordType = Array<number>;
|
|
206
|
+
|
|
207
|
+
declare class Event_2 {
|
|
208
|
+
_types: {
|
|
209
|
+
[key: string]: any;
|
|
210
|
+
};
|
|
211
|
+
_cache: {
|
|
212
|
+
[key: string]: Cesium.Event;
|
|
213
|
+
};
|
|
214
|
+
constructor(types?: {
|
|
215
|
+
[key: string]: any;
|
|
216
|
+
});
|
|
217
|
+
on(type: any, callback: any, context?: any): Cesium.Event.RemoveCallback | undefined;
|
|
218
|
+
once(type: any, callback: any, context?: any): void;
|
|
219
|
+
off(type: any, callback: any, context?: any): boolean;
|
|
220
|
+
emit(type: any, ...args: any[]): void;
|
|
221
|
+
_registerEvent(): void;
|
|
222
|
+
getEvent(type: string): Cesium.Event | undefined;
|
|
223
|
+
}
|
|
224
|
+
export { Event_2 as Event }
|
|
225
|
+
|
|
226
|
+
declare class GroundSkyBox extends SkyBox_2 {
|
|
227
|
+
constructor(options?: any);
|
|
228
|
+
update(frameState: any, useHdr: any): any;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export declare class ImageryProvider {
|
|
232
|
+
static createAmapImageryProvider(options: imageryProviderOptions): Promise<AmapImageryProvider>;
|
|
233
|
+
static createTianDiTuImageryProvider(options: imageryProviderOptions): Promise<TianDiTuImageryProvider>;
|
|
234
|
+
static createImageryProvider(type: string, options: imageryProviderOptions): Promise<AmapImageryProvider>;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
declare interface imageryProviderOptions extends Partial<Cesium.UrlTemplateImageryProvider.ConstructorOptions> {
|
|
238
|
+
style: imageryProviderStyle;
|
|
239
|
+
key?: string;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* 地图图层类型
|
|
244
|
+
* - VECTOR: 矢量图层
|
|
245
|
+
* - RASTER: 影像图层
|
|
246
|
+
* - TOPOGRAPHY: 地形图层
|
|
247
|
+
*/
|
|
248
|
+
declare type imageryProviderStyle = 'vector' | 'raster' | 'topography' | 'vectorMark' | 'rasterMark' | 'topographyMark';
|
|
249
|
+
|
|
250
|
+
declare type layerSource = 'gaode' | 'tianditu';
|
|
251
|
+
|
|
252
|
+
declare class MapSwitch extends Widget {
|
|
253
|
+
private _cache;
|
|
254
|
+
private _config;
|
|
255
|
+
constructor(viewer: Viewer);
|
|
256
|
+
_installHook(): void;
|
|
257
|
+
_addItem(map: BaseImageryLayer['options']): void;
|
|
258
|
+
addMap(map: BaseImageryLayer['options']): void;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
declare class MouseEvent_2 extends Event_2 {
|
|
262
|
+
private _viewer;
|
|
263
|
+
constructor(viewer: Viewer);
|
|
264
|
+
_registerEvent(): void;
|
|
265
|
+
_initDefaultEvent(): void;
|
|
266
|
+
_leftDownHandler(): void;
|
|
267
|
+
_leftUpHandler(): void;
|
|
268
|
+
_clickHandler(movement: any): boolean;
|
|
269
|
+
_dbClickHandler(): void;
|
|
270
|
+
_rightDownHandler(): void;
|
|
271
|
+
_rightUpHandler(): void;
|
|
272
|
+
_rightClickHandler(): void;
|
|
273
|
+
_mouseMoveHandler(): void;
|
|
274
|
+
_mouseWheelHandler(): void;
|
|
275
|
+
_getMouseInfo(position: Cesium.Cartesian2): {
|
|
276
|
+
target: any;
|
|
277
|
+
windowPosition: Cesium.Cartesian2;
|
|
278
|
+
position: any;
|
|
279
|
+
wgs84Position: any;
|
|
280
|
+
surfacePosition: any;
|
|
281
|
+
wgs84SurfacePosition: any;
|
|
282
|
+
};
|
|
283
|
+
_getMousePosition(windowPosition: Cesium.Cartesian2): {
|
|
284
|
+
windowPosition: Cesium.Cartesian2;
|
|
285
|
+
position: any;
|
|
286
|
+
wgs84Position: any;
|
|
287
|
+
surfacePosition: any;
|
|
288
|
+
wgs84SurfacePosition: any;
|
|
289
|
+
};
|
|
290
|
+
/**
|
|
291
|
+
* 调整位置,将视图位置从像素坐标转换为归一化设备独立像素坐标。
|
|
292
|
+
* 这个函数用于处理不同设备上因DPI不同导致的显示问题,确保在高DPI设备上也能正确显示。
|
|
293
|
+
*
|
|
294
|
+
* @param {Object} position - 像素坐标,包含x和y属性。
|
|
295
|
+
* @returns {Cesium.Cartesian2} - 归一化设备独立像素坐标。
|
|
296
|
+
*/
|
|
297
|
+
_adjustPosition(position: Cesium.Cartesian2): Cesium.Cartesian2;
|
|
298
|
+
_getTargetObject(target: any): {
|
|
299
|
+
overlayId: any;
|
|
300
|
+
layerId: any;
|
|
301
|
+
object: any;
|
|
302
|
+
feature: any;
|
|
303
|
+
};
|
|
304
|
+
_raiseEvent(type: any, mouseInfo: any): void;
|
|
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
|
+
};
|
|
321
|
+
|
|
322
|
+
export declare class Position {
|
|
323
|
+
private _lng;
|
|
324
|
+
private _lat;
|
|
325
|
+
private _alt;
|
|
326
|
+
private _heading;
|
|
327
|
+
private _pitch;
|
|
328
|
+
private _roll;
|
|
329
|
+
constructor(lng?: number, lat?: number, alt?: number, heading?: number, pitch?: number, roll?: number);
|
|
330
|
+
set lng(lng: number);
|
|
331
|
+
get lng(): number;
|
|
332
|
+
set lat(lat: number);
|
|
333
|
+
get lat(): number;
|
|
334
|
+
set alt(alt: number);
|
|
335
|
+
get alt(): number;
|
|
336
|
+
set heading(heading: number);
|
|
337
|
+
get heading(): number;
|
|
338
|
+
set pitch(pitch: number);
|
|
339
|
+
get pitch(): number;
|
|
340
|
+
set roll(roll: number);
|
|
341
|
+
get roll(): number;
|
|
342
|
+
serialize(): string;
|
|
343
|
+
distance(target: any): number;
|
|
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;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
declare interface RegisterEvent {
|
|
363
|
+
name: any;
|
|
364
|
+
func: (...args: any) => void;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
export declare class Renderer {
|
|
368
|
+
private _rendererEvent;
|
|
369
|
+
private _viewer;
|
|
370
|
+
private _removeEventsCache;
|
|
371
|
+
constructor(viewer: Viewer);
|
|
372
|
+
Stop(): void;
|
|
373
|
+
RegisterEvent(events: RegisterEvent[]): void;
|
|
374
|
+
RegisterSceneEvent(events: RegisterEvent[]): void;
|
|
375
|
+
RegisterErrorEvent(events: RegisterEvent[]): void;
|
|
376
|
+
UnRegisterEvent(data: string[]): void;
|
|
377
|
+
UnRegisterSceneEvent(data: string[]): void;
|
|
378
|
+
UnRegisterErrorEvent(data: string[]): void;
|
|
379
|
+
emit(eventName: string, ...args: any): void;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
export declare class RendererEvent extends Event_2 {
|
|
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 {
|
|
417
|
+
private _viewer;
|
|
418
|
+
constructor(viewer: Viewer);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
export declare class SceneEvent extends Event_2 {
|
|
422
|
+
_camera: Camera;
|
|
423
|
+
_scene: Scene_2;
|
|
424
|
+
_clock: Clock;
|
|
425
|
+
constructor(viewer: Viewer);
|
|
426
|
+
on(type: any, callback: any, context?: any): Event_3.RemoveCallback | undefined;
|
|
427
|
+
off(type: any, callback: any, context?: any): boolean;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
export declare const SceneEventType: {
|
|
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 {
|
|
443
|
+
private _defaultSkyBox;
|
|
444
|
+
private _groundSkyBox;
|
|
445
|
+
private _height;
|
|
446
|
+
private _viewer;
|
|
447
|
+
constructor(viewer: Viewer);
|
|
448
|
+
/**
|
|
449
|
+
* 创建近地天空盒
|
|
450
|
+
* @param options 近地天空盒参数
|
|
451
|
+
* @returns 近地天空盒实例
|
|
452
|
+
*/
|
|
453
|
+
GroundSkyBox(options: ConstructorParameters<typeof GroundSkyBox>[0] & {
|
|
454
|
+
offsetAngle?: number;
|
|
455
|
+
}): void;
|
|
456
|
+
/**
|
|
457
|
+
* 设置默认天空盒
|
|
458
|
+
*/
|
|
459
|
+
Default(options: ConstructorParameters<typeof Cesium.SkyBox>[0]): void;
|
|
460
|
+
/**
|
|
461
|
+
* 重置天空盒为默认值
|
|
462
|
+
*/
|
|
463
|
+
Reset(): void;
|
|
464
|
+
_SetSkyBox(skyBox: Cesium.SkyBox, skyAtmosphere: boolean): void;
|
|
465
|
+
EventListener(): void;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
declare const SkyBox_2: any;
|
|
469
|
+
|
|
470
|
+
export declare class Terrain {
|
|
471
|
+
private _scene;
|
|
472
|
+
constructor(scene: Cesium.Scene);
|
|
473
|
+
createEllipsoidTerrain(options?: ConstructorParameters<typeof Cesium.EllipsoidTerrainProvider>[0]): Promise<Cesium.EllipsoidTerrainProvider>;
|
|
474
|
+
createWorldTerrain(options?: Parameters<typeof Cesium.Terrain.fromWorldTerrain>[0]): Cesium.Terrain;
|
|
475
|
+
createUrlTerrain(options?: Cesium.CesiumTerrainProvider.ConstructorOptions & {
|
|
476
|
+
url: string;
|
|
477
|
+
}): Promise<Cesium.CesiumTerrainProvider>;
|
|
478
|
+
createGoogleTerrain(options?: Cesium.GoogleEarthEnterpriseTerrainProvider.ConstructorOptions): Promise<Cesium.GoogleEarthEnterpriseTerrainProvider>;
|
|
479
|
+
createArcgisTerrain(options: any): Promise<Cesium.ArcGISTiledElevationTerrainProvider>;
|
|
480
|
+
createTerrain(type: any, options?: any): Promise<Cesium.CesiumTerrainProvider> | Cesium.Terrain;
|
|
481
|
+
setTerrain(terrain?: Cesium.Terrain | Promise<Cesium.TerrainProvider>): void;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
declare class TianDiTuImageryProvider extends Cesium.UrlTemplateImageryProvider {
|
|
485
|
+
constructor(options: imageryProviderOptions);
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
export declare class Tools {
|
|
489
|
+
private _coordinate;
|
|
490
|
+
constructor(viewer: any);
|
|
491
|
+
get Coordinate(): Coordinate;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
export declare class Transform {
|
|
495
|
+
static transformCartesianToWGS84(cartesian: Cesium.Cartesian3): Position;
|
|
496
|
+
static transformCartographicToWGS84(cartographic: any): Position;
|
|
497
|
+
static transformWGS84ToCartesian(position: any): Cesium.Cartesian3;
|
|
498
|
+
static transformWGS84ToCartographic(position: any): Cesium.Cartographic;
|
|
499
|
+
static transformCartesianArrayToWGS84Array(cartesianArr: any): any;
|
|
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;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
declare class Viewer {
|
|
509
|
+
private _delegate;
|
|
510
|
+
private _baseLayerPicker;
|
|
511
|
+
private _widgetContainer;
|
|
512
|
+
private _widgets;
|
|
513
|
+
private _skyBox;
|
|
514
|
+
private _renderer;
|
|
515
|
+
private _sceneEvent;
|
|
516
|
+
private _viewerEvent;
|
|
517
|
+
private _mouseEvent;
|
|
518
|
+
private _terrain;
|
|
519
|
+
private _scene;
|
|
520
|
+
private _cameraControl;
|
|
521
|
+
private _tools;
|
|
522
|
+
ImageryProvider: typeof ImageryProvider;
|
|
523
|
+
CameraRoam: typeof CameraRoam;
|
|
524
|
+
get delegate(): Cesium.CesiumWidget;
|
|
525
|
+
get clock(): Cesium.Clock;
|
|
526
|
+
get scene(): Cesium.Scene;
|
|
527
|
+
get camera(): Cesium.Camera;
|
|
528
|
+
get canvas(): HTMLCanvasElement;
|
|
529
|
+
get widgetContainer(): HTMLElement;
|
|
530
|
+
get widgets(): {
|
|
531
|
+
mapSwitch: MapSwitch;
|
|
532
|
+
};
|
|
533
|
+
get skyBox(): SkyBox;
|
|
534
|
+
get Renderer(): Renderer;
|
|
535
|
+
get viewerEvent(): ViewerEvent;
|
|
536
|
+
get sceneEvent(): SceneEvent;
|
|
537
|
+
get Terrain(): Terrain;
|
|
538
|
+
get Scene(): Scene;
|
|
539
|
+
get CameraControl(): CameraControl;
|
|
540
|
+
get Tools(): Tools;
|
|
541
|
+
constructor(options: WWSYCesiumType);
|
|
542
|
+
private init;
|
|
543
|
+
destroy(): void;
|
|
544
|
+
addBaseLayer(baseLayer: Cesium.ImageryLayer | Cesium.ImageryLayer[], options: BaseImageryLayer['options']): this;
|
|
545
|
+
changeBaseLayer(index: number): void;
|
|
546
|
+
}
|
|
547
|
+
export { Viewer }
|
|
548
|
+
export default Viewer;
|
|
549
|
+
|
|
550
|
+
export declare class ViewerEvent extends Event_2 {
|
|
551
|
+
constructor();
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
export declare const ViewerEventType: {
|
|
555
|
+
MOUSE_MOVE: Cesium.ScreenSpaceEventType;
|
|
556
|
+
WHEEL: Cesium.ScreenSpaceEventType;
|
|
557
|
+
ADD_LAYER: string;
|
|
558
|
+
REMOVE_LAYER: string;
|
|
559
|
+
ADD_EFFECT: string;
|
|
560
|
+
REMOVE_EFFECT: string;
|
|
561
|
+
LEFT_DOWN: Cesium.ScreenSpaceEventType;
|
|
562
|
+
LEFT_UP: Cesium.ScreenSpaceEventType;
|
|
563
|
+
CLICK: Cesium.ScreenSpaceEventType;
|
|
564
|
+
RIGHT_DOWN: Cesium.ScreenSpaceEventType;
|
|
565
|
+
RIGHT_UP: Cesium.ScreenSpaceEventType;
|
|
566
|
+
RIGHT_CLICK: Cesium.ScreenSpaceEventType;
|
|
567
|
+
DB_CLICK: Cesium.ScreenSpaceEventType;
|
|
568
|
+
};
|
|
569
|
+
|
|
570
|
+
declare class Widget {
|
|
571
|
+
_enable: boolean;
|
|
572
|
+
_wrapper: HTMLElement | undefined;
|
|
573
|
+
_ready: boolean;
|
|
574
|
+
_viewer: Viewer;
|
|
575
|
+
constructor(viewer: Viewer);
|
|
576
|
+
Start(): void;
|
|
577
|
+
End(): void;
|
|
578
|
+
hide(): void;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
declare interface WWSYCesiumType {
|
|
582
|
+
target: string;
|
|
583
|
+
accessToken: string;
|
|
584
|
+
tiandituKey?: string;
|
|
585
|
+
layerSource?: layerSource;
|
|
586
|
+
layerType?: 'vector' | 'raster' | 'topography';
|
|
587
|
+
layerMark?: boolean;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
export { }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wwsy/cesium",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "WWSY的Cesium插件库",
|
|
5
5
|
"author": "Answer™",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
],
|
|
21
21
|
"main": "./dist/index.umd.cjs",
|
|
22
22
|
"module": "./dist/index.js",
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
23
24
|
"exports": {
|
|
24
25
|
".": {
|
|
25
26
|
"import": "./dist/index.js",
|
|
@@ -39,11 +40,8 @@
|
|
|
39
40
|
"lint": "eslint . --fix --cache",
|
|
40
41
|
"format": "prettier --write --experimental-cli src/"
|
|
41
42
|
},
|
|
42
|
-
"
|
|
43
|
-
"cesium": "
|
|
44
|
-
"vite-plugin-cesium": "^1.2.23",
|
|
45
|
-
"vue": "^3.5.25",
|
|
46
|
-
"vue-router": "^4.6.3"
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"cesium": ">=1.100.0"
|
|
47
45
|
},
|
|
48
46
|
"devDependencies": {
|
|
49
47
|
"@tsconfig/node24": "^24.0.3",
|
|
@@ -52,6 +50,7 @@
|
|
|
52
50
|
"@vue/eslint-config-prettier": "^10.2.0",
|
|
53
51
|
"@vue/eslint-config-typescript": "^14.6.0",
|
|
54
52
|
"@vue/tsconfig": "^0.8.1",
|
|
53
|
+
"cesium": "^1.134.1",
|
|
55
54
|
"eslint": "^9.39.1",
|
|
56
55
|
"eslint-plugin-vue": "~10.5.1",
|
|
57
56
|
"jiti": "^2.6.1",
|
|
@@ -60,8 +59,12 @@
|
|
|
60
59
|
"sass": "^1.97.1",
|
|
61
60
|
"typescript": "~5.9.0",
|
|
62
61
|
"vite": "^7.2.4",
|
|
62
|
+
"vite-plugin-cesium": "^1.2.23",
|
|
63
63
|
"vite-plugin-cesium-build": "^0.7.2",
|
|
64
|
+
"vite-plugin-dts": "^4.5.4",
|
|
64
65
|
"vite-plugin-vue-devtools": "^8.0.5",
|
|
66
|
+
"vue": "^3.5.25",
|
|
67
|
+
"vue-router": "^4.6.3",
|
|
65
68
|
"vue-tsc": "^3.1.5"
|
|
66
69
|
}
|
|
67
70
|
}
|