@wwsy/cesium 0.0.5 → 0.0.7
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 +333 -17
- package/dist/index.js +40 -2
- package/dist/index.umd.cjs +3 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,12 +2,41 @@ 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 } from 'cesium';
|
|
5
|
+
import { Scene as Scene_2 } from 'cesium';
|
|
6
6
|
|
|
7
7
|
declare class AmapImageryProvider extends Cesium.UrlTemplateImageryProvider {
|
|
8
8
|
constructor(options: imageryProviderOptions);
|
|
9
9
|
}
|
|
10
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
|
+
|
|
11
40
|
/**
|
|
12
41
|
* 基础覆盖物、图层
|
|
13
42
|
* **/
|
|
@@ -75,6 +104,18 @@ declare interface BaseImageryLayer {
|
|
|
75
104
|
};
|
|
76
105
|
}
|
|
77
106
|
|
|
107
|
+
export declare class BaseLayerPicker {
|
|
108
|
+
private _imageryLayers;
|
|
109
|
+
private _selectedImageryLayer;
|
|
110
|
+
private _count;
|
|
111
|
+
private _viewer;
|
|
112
|
+
set selectedImageryLayer(imageryLayer: BaseImageryLayer);
|
|
113
|
+
get selectedImageryLayer(): BaseImageryLayer;
|
|
114
|
+
constructor(viewer: Viewer);
|
|
115
|
+
addImageryLayer(imageryLayer: Cesium.ImageryLayer | Cesium.ImageryLayer[], options: BaseImageryLayer['options']): this;
|
|
116
|
+
changeImageryLayer(index: number): this;
|
|
117
|
+
}
|
|
118
|
+
|
|
78
119
|
declare type BasicEntityLayerType = Partial<BasicInfoAtomType> & Partial<VisibleAtomType> & Partial<EntityFlagAtomType>;
|
|
79
120
|
|
|
80
121
|
/**
|
|
@@ -104,7 +145,7 @@ declare interface CameraBase {
|
|
|
104
145
|
fieldOfView: number;
|
|
105
146
|
}
|
|
106
147
|
|
|
107
|
-
declare class CameraControl {
|
|
148
|
+
export declare class CameraControl {
|
|
108
149
|
private _options;
|
|
109
150
|
private _viewer;
|
|
110
151
|
private _animationInstance;
|
|
@@ -162,7 +203,7 @@ declare interface CameraPoseData extends Pick<CameraBase, 'location' | 'rotation
|
|
|
162
203
|
flyTime: number;
|
|
163
204
|
}
|
|
164
205
|
|
|
165
|
-
declare class CameraRoam {
|
|
206
|
+
export declare class CameraRoam {
|
|
166
207
|
constructor();
|
|
167
208
|
}
|
|
168
209
|
|
|
@@ -172,7 +213,7 @@ declare class CameraRoam {
|
|
|
172
213
|
*/
|
|
173
214
|
declare type Coord2DType = Array<number>;
|
|
174
215
|
|
|
175
|
-
declare class Coordinate {
|
|
216
|
+
export declare class Coordinate {
|
|
176
217
|
private _viewer;
|
|
177
218
|
get Picker(): {
|
|
178
219
|
PickWorldPointByScreenPos: any;
|
|
@@ -203,6 +244,70 @@ declare class Coordinate {
|
|
|
203
244
|
Exchange(): void;
|
|
204
245
|
}
|
|
205
246
|
|
|
247
|
+
/**
|
|
248
|
+
* @Author : Caven Chen
|
|
249
|
+
*/
|
|
250
|
+
export declare class CoordTransform {
|
|
251
|
+
/**
|
|
252
|
+
* BD-09 To GCJ-02
|
|
253
|
+
* @param lng
|
|
254
|
+
* @param lat
|
|
255
|
+
* @returns {number[]}
|
|
256
|
+
*/
|
|
257
|
+
static BD09ToGCJ02(lng: any, lat: any): number[];
|
|
258
|
+
/**
|
|
259
|
+
* GCJ-02 To BD-09
|
|
260
|
+
* @param lng
|
|
261
|
+
* @param lat
|
|
262
|
+
* @returns {number[]}
|
|
263
|
+
* @constructor
|
|
264
|
+
*/
|
|
265
|
+
static GCJ02ToBD09(lng: any, lat: any): number[];
|
|
266
|
+
/**
|
|
267
|
+
* WGS-84 To GCJ-02
|
|
268
|
+
* @param lng
|
|
269
|
+
* @param lat
|
|
270
|
+
* @returns {number[]}
|
|
271
|
+
*/
|
|
272
|
+
static WGS84ToGCJ02(lng: any, lat: any): any[];
|
|
273
|
+
/**
|
|
274
|
+
* GCJ-02 To WGS-84
|
|
275
|
+
* @param lng
|
|
276
|
+
* @param lat
|
|
277
|
+
* @returns {number[]}
|
|
278
|
+
* @constructor
|
|
279
|
+
*/
|
|
280
|
+
static GCJ02ToWGS84(lng: any, lat: any): any[];
|
|
281
|
+
/**
|
|
282
|
+
*
|
|
283
|
+
* @param lng
|
|
284
|
+
* @param lat
|
|
285
|
+
* @returns {number[]}
|
|
286
|
+
*/
|
|
287
|
+
static delta(lng: any, lat: any): any[];
|
|
288
|
+
/**
|
|
289
|
+
*
|
|
290
|
+
* @param lng
|
|
291
|
+
* @param lat
|
|
292
|
+
* @returns {number}
|
|
293
|
+
*/
|
|
294
|
+
static transformLng(lng: any, lat: any): any;
|
|
295
|
+
/**
|
|
296
|
+
*
|
|
297
|
+
* @param lng
|
|
298
|
+
* @param lat
|
|
299
|
+
* @returns {number}
|
|
300
|
+
*/
|
|
301
|
+
static transformLat(lng: any, lat: any): number;
|
|
302
|
+
/**
|
|
303
|
+
*
|
|
304
|
+
* @param lng
|
|
305
|
+
* @param lat
|
|
306
|
+
* @returns {boolean}
|
|
307
|
+
*/
|
|
308
|
+
static out_of_china(lng: any, lat: any): boolean;
|
|
309
|
+
}
|
|
310
|
+
|
|
206
311
|
declare type CoordType = Array<number>;
|
|
207
312
|
|
|
208
313
|
/**
|
|
@@ -269,6 +374,7 @@ declare class Event_2 {
|
|
|
269
374
|
_registerEvent(): void;
|
|
270
375
|
getEvent(type: string): Cesium.Event | undefined;
|
|
271
376
|
}
|
|
377
|
+
export { Event_2 as Event }
|
|
272
378
|
|
|
273
379
|
declare class GroundSkyBox extends SkyBox_2 {
|
|
274
380
|
constructor(options?: any);
|
|
@@ -317,7 +423,7 @@ declare interface IInteraction {
|
|
|
317
423
|
hoverTop: boolean;
|
|
318
424
|
}
|
|
319
425
|
|
|
320
|
-
declare class ImageryProvider {
|
|
426
|
+
export declare class ImageryProvider {
|
|
321
427
|
static createAmapImageryProvider(options: imageryProviderOptions): Promise<AmapImageryProvider>;
|
|
322
428
|
static createTianDiTuImageryProvider(options: imageryProviderOptions): Promise<TianDiTuImageryProvider>;
|
|
323
429
|
static createImageryProvider(type: string, options: imageryProviderOptions): Promise<AmapImageryProvider>;
|
|
@@ -344,6 +450,18 @@ declare interface IOperations {
|
|
|
344
450
|
calculateCoordZ: ICalculateCoordZ;
|
|
345
451
|
}
|
|
346
452
|
|
|
453
|
+
export declare const LayerEventType: {
|
|
454
|
+
LEFT_DOWN: Cesium.ScreenSpaceEventType;
|
|
455
|
+
LEFT_UP: Cesium.ScreenSpaceEventType;
|
|
456
|
+
CLICK: Cesium.ScreenSpaceEventType;
|
|
457
|
+
RIGHT_DOWN: Cesium.ScreenSpaceEventType;
|
|
458
|
+
RIGHT_UP: Cesium.ScreenSpaceEventType;
|
|
459
|
+
RIGHT_CLICK: Cesium.ScreenSpaceEventType;
|
|
460
|
+
DB_CLICK: Cesium.ScreenSpaceEventType;
|
|
461
|
+
ADD: string;
|
|
462
|
+
REMOVE: string;
|
|
463
|
+
};
|
|
464
|
+
|
|
347
465
|
declare type layerSource = 'gaode' | 'tianditu';
|
|
348
466
|
|
|
349
467
|
declare class MapSwitch extends Widget {
|
|
@@ -361,7 +479,73 @@ declare class MapSwitch extends Widget {
|
|
|
361
479
|
*/
|
|
362
480
|
declare type MinMaxType = Array<number>;
|
|
363
481
|
|
|
364
|
-
declare class
|
|
482
|
+
declare class MouseEvent_2 extends Event_2 {
|
|
483
|
+
private _viewer;
|
|
484
|
+
private _selected;
|
|
485
|
+
constructor(viewer: Viewer);
|
|
486
|
+
_registerEvent(): void;
|
|
487
|
+
private _initDefaultEvent;
|
|
488
|
+
private _createHandler;
|
|
489
|
+
private _mouseMoveHandler;
|
|
490
|
+
private _mouseWheelHandler;
|
|
491
|
+
private _getMouseInfo;
|
|
492
|
+
/**
|
|
493
|
+
* 获取鼠标位置信息,包括窗口位置,场景位置,WGS84位置,表面位置,WGS84表面位置。
|
|
494
|
+
* @param {Object} windowPosition - 窗口位置,包含x和y属性。
|
|
495
|
+
* @returns {Object} - 包含windowPosition,position,wgs84Position,surfacePosition,wgs84SurfacePosition属性的对象。
|
|
496
|
+
*/
|
|
497
|
+
private _getMousePosition;
|
|
498
|
+
/**
|
|
499
|
+
* 调整位置,将视图位置从像素坐标转换为归一化设备独立像素坐标。
|
|
500
|
+
* 这个函数用于处理不同设备上因DPI不同导致的显示问题,确保在高DPI设备上也能正确显示。
|
|
501
|
+
*
|
|
502
|
+
* @param {Object} position - 像素坐标,包含x和y属性。
|
|
503
|
+
* @returns {Cesium.Cartesian2} - 归一化设备独立像素坐标。
|
|
504
|
+
*/
|
|
505
|
+
private _adjustPosition;
|
|
506
|
+
/**
|
|
507
|
+
* 获取穿透目标信息,排除指定覆盖物
|
|
508
|
+
* @param {Object} windowPosition - 窗口位置,包含x和y属性。
|
|
509
|
+
* @param {Object} exclude - 排除项,包含overlayId属性。
|
|
510
|
+
* @returns {Array} - 穿透目标信息数组。
|
|
511
|
+
*/
|
|
512
|
+
private _getDrillInfos;
|
|
513
|
+
/**
|
|
514
|
+
* 获取目标对象,包括实体,3DTileFeature,3DTileset,Primitive
|
|
515
|
+
* @param {Object} target - 目标对象,可能是实体,3DTileFeature,3DTileset,Primitive等。
|
|
516
|
+
* @returns {Object} - 包含overlayEid,layerId,object,feature属性的对象。
|
|
517
|
+
*/
|
|
518
|
+
private _getTargetObject;
|
|
519
|
+
/**
|
|
520
|
+
* 获取目标信息,包括覆盖物,图层,特征,实例ID
|
|
521
|
+
* @param {Object} target - 目标对象,可能是实体,3DTileFeature,3DTileset,Primitive等。
|
|
522
|
+
* @returns {Object} - 包含layer,overlay,feature,instanceId属性的对象。
|
|
523
|
+
*/
|
|
524
|
+
private _getTargetInfo;
|
|
525
|
+
/**
|
|
526
|
+
* 关键函数,分发事件到覆盖物,图层,场景,Renderer
|
|
527
|
+
* @param {string} type - 事件类型。
|
|
528
|
+
* @param {Object} mouseInfo - 鼠标信息,包含target,windowPosition,position,wgs84Position,surfacePosition,wgs84SurfacePosition属性。
|
|
529
|
+
*/
|
|
530
|
+
private _raiseEvent;
|
|
531
|
+
}
|
|
532
|
+
export { MouseEvent_2 as MouseEvent }
|
|
533
|
+
|
|
534
|
+
export declare const MouseEventType: {
|
|
535
|
+
MOUSE_MOVE: Cesium.ScreenSpaceEventType;
|
|
536
|
+
WHEEL: Cesium.ScreenSpaceEventType;
|
|
537
|
+
MOUSE_OVER: string;
|
|
538
|
+
MOUSE_OUT: string;
|
|
539
|
+
LEFT_DOWN: Cesium.ScreenSpaceEventType;
|
|
540
|
+
LEFT_UP: Cesium.ScreenSpaceEventType;
|
|
541
|
+
CLICK: Cesium.ScreenSpaceEventType;
|
|
542
|
+
RIGHT_DOWN: Cesium.ScreenSpaceEventType;
|
|
543
|
+
RIGHT_UP: Cesium.ScreenSpaceEventType;
|
|
544
|
+
RIGHT_CLICK: Cesium.ScreenSpaceEventType;
|
|
545
|
+
DB_CLICK: Cesium.ScreenSpaceEventType;
|
|
546
|
+
};
|
|
547
|
+
|
|
548
|
+
export declare class Overlay extends BaseEntityLayer {
|
|
365
549
|
private _eid;
|
|
366
550
|
protected oType: string;
|
|
367
551
|
protected type: string;
|
|
@@ -395,11 +579,26 @@ declare class Overlay extends BaseEntityLayer {
|
|
|
395
579
|
};
|
|
396
580
|
}
|
|
397
581
|
|
|
398
|
-
declare class OverlayEvent extends Event_2 {
|
|
582
|
+
export declare class OverlayEvent extends Event_2 {
|
|
399
583
|
constructor();
|
|
400
584
|
}
|
|
401
585
|
|
|
402
|
-
declare
|
|
586
|
+
export declare const OverlayEventType: {
|
|
587
|
+
MOUSE_OVER: string;
|
|
588
|
+
MOUSE_OUT: string;
|
|
589
|
+
POSITION_UPDATE: string;
|
|
590
|
+
LEFT_DOWN: Cesium.ScreenSpaceEventType;
|
|
591
|
+
LEFT_UP: Cesium.ScreenSpaceEventType;
|
|
592
|
+
CLICK: Cesium.ScreenSpaceEventType;
|
|
593
|
+
RIGHT_DOWN: Cesium.ScreenSpaceEventType;
|
|
594
|
+
RIGHT_UP: Cesium.ScreenSpaceEventType;
|
|
595
|
+
RIGHT_CLICK: Cesium.ScreenSpaceEventType;
|
|
596
|
+
DB_CLICK: Cesium.ScreenSpaceEventType;
|
|
597
|
+
ADD: string;
|
|
598
|
+
REMOVE: string;
|
|
599
|
+
};
|
|
600
|
+
|
|
601
|
+
export declare class Poi extends Overlay {
|
|
403
602
|
private _styleCache;
|
|
404
603
|
private _bHover;
|
|
405
604
|
constructor(data: PoiType);
|
|
@@ -516,12 +715,52 @@ declare interface PoiType extends EntityEidType, Partial<BasicInfoAtomType>, Par
|
|
|
516
715
|
visible2D?: deepPartial<Visible2DAtomType>;
|
|
517
716
|
}
|
|
518
717
|
|
|
718
|
+
export declare class Position {
|
|
719
|
+
private _lng;
|
|
720
|
+
private _lat;
|
|
721
|
+
private _alt;
|
|
722
|
+
private _heading;
|
|
723
|
+
private _pitch;
|
|
724
|
+
private _roll;
|
|
725
|
+
constructor(lng?: number, lat?: number, alt?: number, heading?: number, pitch?: number, roll?: number);
|
|
726
|
+
set lng(lng: number);
|
|
727
|
+
get lng(): number;
|
|
728
|
+
set lat(lat: number);
|
|
729
|
+
get lat(): number;
|
|
730
|
+
set alt(alt: number);
|
|
731
|
+
get alt(): number;
|
|
732
|
+
set heading(heading: number);
|
|
733
|
+
get heading(): number;
|
|
734
|
+
set pitch(pitch: number);
|
|
735
|
+
get pitch(): number;
|
|
736
|
+
set roll(roll: number);
|
|
737
|
+
get roll(): number;
|
|
738
|
+
serialize(): string;
|
|
739
|
+
distance(target: any): number;
|
|
740
|
+
clone(): Position;
|
|
741
|
+
copy(): Position;
|
|
742
|
+
toArray(): number[];
|
|
743
|
+
toString(): string;
|
|
744
|
+
toObject(): {
|
|
745
|
+
lng: number;
|
|
746
|
+
lat: number;
|
|
747
|
+
alt: number;
|
|
748
|
+
heading: number;
|
|
749
|
+
pitch: number;
|
|
750
|
+
roll: number;
|
|
751
|
+
};
|
|
752
|
+
static fromArray(arr: any): Position;
|
|
753
|
+
static fromString(str: any): Position;
|
|
754
|
+
static fromObject(obj: any): Position;
|
|
755
|
+
static deserialize(valStr: any): Position;
|
|
756
|
+
}
|
|
757
|
+
|
|
519
758
|
declare interface RegisterEvent {
|
|
520
759
|
name: any;
|
|
521
760
|
func: (...args: any) => void;
|
|
522
761
|
}
|
|
523
762
|
|
|
524
|
-
declare class Renderer {
|
|
763
|
+
export declare class Renderer {
|
|
525
764
|
private _rendererEvent;
|
|
526
765
|
private _viewer;
|
|
527
766
|
private _removeEventsCache;
|
|
@@ -536,7 +775,41 @@ declare class Renderer {
|
|
|
536
775
|
emit(eventName: string, ...args: any): void;
|
|
537
776
|
}
|
|
538
777
|
|
|
539
|
-
declare class
|
|
778
|
+
export declare class RendererEvent extends Event_2 {
|
|
779
|
+
_viewer: Viewer;
|
|
780
|
+
constructor(viewer: Viewer);
|
|
781
|
+
on(type: any, callback: any, context?: any): Cesium.Event.RemoveCallback | undefined;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
export declare const RenderEventType: {
|
|
785
|
+
onVideoReady: string;
|
|
786
|
+
stopedRenderCloud: string;
|
|
787
|
+
};
|
|
788
|
+
|
|
789
|
+
export declare const RenderSceneEventType: {
|
|
790
|
+
OnWdpSceneIsReady: string;
|
|
791
|
+
OnWdpSceneChanged: string;
|
|
792
|
+
OnMouseEnterEntity: string;
|
|
793
|
+
OnMouseOutEntity: string;
|
|
794
|
+
OnEntityClicked: string;
|
|
795
|
+
OnEntityDbClicked: string;
|
|
796
|
+
OnWebJSEvent: string;
|
|
797
|
+
MeasureResult: string;
|
|
798
|
+
OnMoveAlongPathProcessEvent: string;
|
|
799
|
+
OnRealTimeVideoEvent: string;
|
|
800
|
+
OnMoveAlongPathEndEvent: string;
|
|
801
|
+
OnCameraMotionStartEvent: string;
|
|
802
|
+
OnCameraMotionEndEvent: string;
|
|
803
|
+
OnCameraRoamingFrame: string;
|
|
804
|
+
PickPointEvent: string;
|
|
805
|
+
OnEntitySelectionChanged: string;
|
|
806
|
+
OnEntityNodeSelectionChanged: string;
|
|
807
|
+
OnEntityReady: string;
|
|
808
|
+
OnCreateGeoLayerEvent: string;
|
|
809
|
+
OnGeoLayerFeatureClicked: string;
|
|
810
|
+
};
|
|
811
|
+
|
|
812
|
+
export declare class Scene {
|
|
540
813
|
private _viewer;
|
|
541
814
|
private _entitys;
|
|
542
815
|
private _layers;
|
|
@@ -581,16 +854,28 @@ declare class Scene_2 {
|
|
|
581
854
|
GetBound(): void;
|
|
582
855
|
}
|
|
583
856
|
|
|
584
|
-
declare class SceneEvent extends Event_2 {
|
|
857
|
+
export declare class SceneEvent extends Event_2 {
|
|
585
858
|
_camera: Camera;
|
|
586
|
-
_scene:
|
|
859
|
+
_scene: Scene_2;
|
|
587
860
|
_clock: Clock;
|
|
588
861
|
constructor(viewer: Viewer);
|
|
589
862
|
on(type: any, callback: any, context?: any): Event_3.RemoveCallback | undefined;
|
|
590
863
|
off(type: any, callback: any, context?: any): boolean;
|
|
591
864
|
}
|
|
592
865
|
|
|
593
|
-
declare
|
|
866
|
+
export declare const SceneEventType: {
|
|
867
|
+
CAMERA_MOVE_END: string;
|
|
868
|
+
CAMERA_CHANGED: string;
|
|
869
|
+
PRE_UPDATE: string;
|
|
870
|
+
POST_UPDATE: string;
|
|
871
|
+
PRE_RENDER: string;
|
|
872
|
+
POST_RENDER: string;
|
|
873
|
+
MORPH_COMPLETE: string;
|
|
874
|
+
CLOCK_TICK: string;
|
|
875
|
+
RENDER_ERROR: string;
|
|
876
|
+
};
|
|
877
|
+
|
|
878
|
+
export declare class SkyBox {
|
|
594
879
|
private _defaultSkyBox;
|
|
595
880
|
private _groundSkyBox;
|
|
596
881
|
private _height;
|
|
@@ -618,7 +903,7 @@ declare class SkyBox {
|
|
|
618
903
|
|
|
619
904
|
declare const SkyBox_2: any;
|
|
620
905
|
|
|
621
|
-
declare class Terrain {
|
|
906
|
+
export declare class Terrain {
|
|
622
907
|
private _scene;
|
|
623
908
|
constructor(scene: Cesium.Scene);
|
|
624
909
|
createEllipsoidTerrain(options?: ConstructorParameters<typeof Cesium.EllipsoidTerrainProvider>[0]): Promise<Cesium.EllipsoidTerrainProvider>;
|
|
@@ -638,12 +923,26 @@ declare class TianDiTuImageryProvider extends Cesium.UrlTemplateImageryProvider
|
|
|
638
923
|
|
|
639
924
|
declare type Tjustification = 'Left' | 'Center' | 'Right';
|
|
640
925
|
|
|
641
|
-
declare class Tools {
|
|
926
|
+
export declare class Tools {
|
|
642
927
|
private _coordinate;
|
|
643
928
|
constructor(viewer: any);
|
|
644
929
|
get Coordinate(): Coordinate;
|
|
645
930
|
}
|
|
646
931
|
|
|
932
|
+
export declare class Transform {
|
|
933
|
+
static transformCartesianToWGS84(cartesian: Cesium.Cartesian3): Position;
|
|
934
|
+
static transformCartographicToWGS84(cartographic: any): Position;
|
|
935
|
+
static transformWGS84ToCartesian(position: any): Cesium.Cartesian3;
|
|
936
|
+
static transformWGS84ToCartographic(position: any): Cesium.Cartographic;
|
|
937
|
+
static transformCartesianArrayToWGS84Array(cartesianArr: any): any;
|
|
938
|
+
static transformWGS84ArrayToCartesianArray(WGS84Arr: any): any;
|
|
939
|
+
static transformWGS84ToMercator(position: any): Position;
|
|
940
|
+
static transformMercatorToWGS84(position: any): Position;
|
|
941
|
+
static transformWindowToWGS84(position: any, viewer: Viewer): Position;
|
|
942
|
+
static transformWindowToCartesian(position: any, viewer: Viewer): any;
|
|
943
|
+
static transformWGS84ToWindow(position: any, viewer: any): Cesium.Cartesian2;
|
|
944
|
+
}
|
|
945
|
+
|
|
647
946
|
/**
|
|
648
947
|
* @interface TransformAtom2DType
|
|
649
948
|
* @param {CoordType} location
|
|
@@ -685,7 +984,7 @@ declare class Viewer {
|
|
|
685
984
|
get viewerEvent(): ViewerEvent;
|
|
686
985
|
get sceneEvent(): SceneEvent;
|
|
687
986
|
get Terrain(): Terrain;
|
|
688
|
-
get Scene():
|
|
987
|
+
get Scene(): Scene;
|
|
689
988
|
get CameraControl(): CameraControl;
|
|
690
989
|
get Tools(): Tools;
|
|
691
990
|
get imageryLayers(): Cesium.ImageryLayerCollection;
|
|
@@ -696,12 +995,29 @@ declare class Viewer {
|
|
|
696
995
|
addBaseLayer(baseLayer: Cesium.ImageryLayer | Cesium.ImageryLayer[], options: BaseImageryLayer['options']): this;
|
|
697
996
|
changeBaseLayer(index: number): void;
|
|
698
997
|
}
|
|
998
|
+
export { Viewer }
|
|
699
999
|
export default Viewer;
|
|
700
1000
|
|
|
701
|
-
declare class ViewerEvent extends Event_2 {
|
|
1001
|
+
export declare class ViewerEvent extends Event_2 {
|
|
702
1002
|
constructor();
|
|
703
1003
|
}
|
|
704
1004
|
|
|
1005
|
+
export declare const ViewerEventType: {
|
|
1006
|
+
MOUSE_MOVE: Cesium.ScreenSpaceEventType;
|
|
1007
|
+
WHEEL: Cesium.ScreenSpaceEventType;
|
|
1008
|
+
ADD_LAYER: string;
|
|
1009
|
+
REMOVE_LAYER: string;
|
|
1010
|
+
ADD_EFFECT: string;
|
|
1011
|
+
REMOVE_EFFECT: string;
|
|
1012
|
+
LEFT_DOWN: Cesium.ScreenSpaceEventType;
|
|
1013
|
+
LEFT_UP: Cesium.ScreenSpaceEventType;
|
|
1014
|
+
CLICK: Cesium.ScreenSpaceEventType;
|
|
1015
|
+
RIGHT_DOWN: Cesium.ScreenSpaceEventType;
|
|
1016
|
+
RIGHT_UP: Cesium.ScreenSpaceEventType;
|
|
1017
|
+
RIGHT_CLICK: Cesium.ScreenSpaceEventType;
|
|
1018
|
+
DB_CLICK: Cesium.ScreenSpaceEventType;
|
|
1019
|
+
};
|
|
1020
|
+
|
|
705
1021
|
/**
|
|
706
1022
|
* @interface Visible2DAtomType
|
|
707
1023
|
* @param {ICamera} camera
|
package/dist/index.js
CHANGED
|
@@ -196401,6 +196401,11 @@ class Animation {
|
|
|
196401
196401
|
return this._viewer.clock.shouldAnimate = !1, this._unbindEvent(), this;
|
|
196402
196402
|
}
|
|
196403
196403
|
}
|
|
196404
|
+
class AroundPoint extends Animation {
|
|
196405
|
+
constructor(t, n) {
|
|
196406
|
+
super(t);
|
|
196407
|
+
}
|
|
196408
|
+
}
|
|
196404
196409
|
class AroundView extends Animation {
|
|
196405
196410
|
_options = {};
|
|
196406
196411
|
_aroundAmount = 0.1;
|
|
@@ -196840,9 +196845,9 @@ class Layer extends BaseEntityLayer {
|
|
|
196840
196845
|
this._viewer = t, this._delegate && (this._delegate instanceof PrimitiveCollection ? this._viewer.scene.primitives.add(this._delegate) : this._delegate instanceof ImageryLayer ? this._viewer.imageryLayers.add(this._delegate) : this._viewer.dataSources.add(this._delegate), this._addedHook && this._addedHook(), this._state = State.ADDED);
|
|
196841
196846
|
}
|
|
196842
196847
|
_onRemove() {
|
|
196843
|
-
this._delegate && this._viewer && (this._cache.clear(), this._delegate instanceof PrimitiveCollection ? (this._delegate.removeAll(), this._viewer.scene.primitives.remove(this._delegate)) : this._delegate instanceof ImageryLayer ? this._viewer.imageryLayers.remove(this._delegate, !1) : this._delegate instanceof Promise ?
|
|
196848
|
+
this._delegate && this._viewer && (this._cache.clear(), this._delegate instanceof PrimitiveCollection ? (this._delegate.removeAll(), this._viewer.scene.primitives.remove(this._delegate)) : this._delegate instanceof ImageryLayer ? this._viewer.imageryLayers.remove(this._delegate, !1) : this._delegate instanceof Promise ? this._delegate.then((t) => {
|
|
196844
196849
|
t.entities.removeAll();
|
|
196845
|
-
})
|
|
196850
|
+
}) : (this._delegate.entities && this._delegate.entities.removeAll(), this._viewer.dataSources.remove(this._delegate)), this._removedHook && this._removedHook(), this._state = State.REMOVED, this._bRemoved = !0);
|
|
196846
196851
|
}
|
|
196847
196852
|
_removedHook() {
|
|
196848
196853
|
}
|
|
@@ -197227,5 +197232,38 @@ class Renderer {
|
|
|
197227
197232
|
}
|
|
197228
197233
|
}
|
|
197229
197234
|
export {
|
|
197235
|
+
Animation,
|
|
197236
|
+
AroundPoint,
|
|
197237
|
+
AroundView,
|
|
197238
|
+
Attachment,
|
|
197239
|
+
BaseLayerPicker,
|
|
197240
|
+
CameraControl,
|
|
197241
|
+
CameraRoam,
|
|
197242
|
+
CoordTransform,
|
|
197243
|
+
Coordinate,
|
|
197244
|
+
Event,
|
|
197245
|
+
ImageryProvider,
|
|
197246
|
+
LayerEventType,
|
|
197247
|
+
MouseEvent,
|
|
197248
|
+
MouseEventType,
|
|
197249
|
+
Overlay,
|
|
197250
|
+
OverlayEvent,
|
|
197251
|
+
OverlayEventType,
|
|
197252
|
+
Poi,
|
|
197253
|
+
Position,
|
|
197254
|
+
RenderEventType,
|
|
197255
|
+
RenderSceneEventType,
|
|
197256
|
+
Renderer,
|
|
197257
|
+
RenderEvent as RendererEvent,
|
|
197258
|
+
Scene,
|
|
197259
|
+
SceneEvent,
|
|
197260
|
+
SceneEventType,
|
|
197261
|
+
SkyBox,
|
|
197262
|
+
Terrain,
|
|
197263
|
+
Tools,
|
|
197264
|
+
Transform,
|
|
197265
|
+
Viewer,
|
|
197266
|
+
ViewerEvent,
|
|
197267
|
+
ViewerEventType,
|
|
197230
197268
|
Viewer as default
|
|
197231
197269
|
};
|