cesium-pocket 0.4.0-alpha → 0.4.2-alpha

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cesium-pocket",
3
- "version": "0.4.0-alpha",
3
+ "version": "0.4.2-alpha",
4
4
  "description": "cesium的插件库;基于vue3的开发",
5
5
  "module": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -21,7 +21,7 @@
21
21
  "import": "./drawer.js",
22
22
  "types": "./drawer.d.ts"
23
23
  },
24
- "./gauger": {
24
+ "./gauger": {
25
25
  "import": "./gauger.js",
26
26
  "types": "./gauger.d.ts"
27
27
  },
@@ -34,9 +34,9 @@
34
34
  "cesium",
35
35
  "pocket",
36
36
  "vue3",
37
- "compass",
38
- "ruler",
39
- "coord"
37
+ "czml",
38
+ "组件库",
39
+ "WEBGIS"
40
40
  ],
41
41
  "author": "nineamgo",
42
42
  "license": "Apache 2.0",
@@ -0,0 +1,39 @@
1
+ import { Clock, Viewer } from 'cesium';
2
+ /** 默认可选倍速列表 */
3
+ export declare const DEFAULT_SPEED_OPTIONS: readonly [0.5, 1, 2, 4, 8, 16, 32, 60, 120, 240, 360];
4
+ export interface DataItem {
5
+ id: string;
6
+ name: string;
7
+ }
8
+ export declare class CzmlManager {
9
+ private viewer;
10
+ /** CZML 资源地址或 JSON 对象 */
11
+ private czml;
12
+ private dataSource;
13
+ /** 是否正在播放 */
14
+ isPlaying: boolean;
15
+ /** 是否循环播放 */
16
+ isLooping: boolean;
17
+ /** 播放倍速(Cesium clock.multiplier,1 为实时) */
18
+ speedIndex: number;
19
+ speedDirect: boolean;
20
+ /** 可选倍速列表 */
21
+ speedOptions: number[];
22
+ constructor(viewer: Viewer, czml: Array<any> | string);
23
+ static loadData(viewer: Viewer, czml: Array<any> | string): Promise<CzmlManager>;
24
+ private loadData;
25
+ private loadCzml;
26
+ getData(): Array<DataItem>;
27
+ setSpeedDirect(speedDirect: boolean): void;
28
+ track(id: string | null): void;
29
+ getDataSource(): any;
30
+ getStartTime(): string;
31
+ getStopTime(): string;
32
+ getCurrentTime(): string;
33
+ speedUp(): void;
34
+ speedDown(): void;
35
+ stop(): void;
36
+ private setSpeed;
37
+ getCurrentRatio(clock: Clock): number;
38
+ percentToTime(clock: Clock, percent: number): any;
39
+ }
@@ -0,0 +1,10 @@
1
+ import { DataSource, JulianDate } from 'cesium';
2
+ export declare const formatDatetime: (julianDate: JulianDate) => string;
3
+ /**
4
+ * 根据百分比计算目标JulianDate
5
+ * @param {number} percent 0~1
6
+ * @param {JulianDate} startTime 动画起始时间
7
+ * @param {JulianDate} stopTime 动画结束时间
8
+ * @returns {JulianDate} 目标时间点
9
+ */
10
+ export declare const percentToJulianDate: (percent: number, dataSource: DataSource) => any;
@@ -1,6 +1,6 @@
1
1
  import { Cartesian3, Viewer, EllipseGraphics, PointGraphics } from 'cesium';
2
2
  import { DataCenter } from './DataCenter';
3
- export type CircleCallbackFn = (firstPoint: Cartesian3, endPoint: Cartesian3) => void;
3
+ export type CircleCallbackFn = (startPoint: Cartesian3, endPoint: Cartesian3) => void;
4
4
  export type CircleOptions = {
5
5
  point?: PointGraphics.ConstructorOptions;
6
6
  ellipse?: EllipseGraphics.ConstructorOptions;
@@ -23,6 +23,7 @@ export declare class CircleDrawer extends DataCenter {
23
23
  constructor(viewer: Viewer, options?: CircleOptions);
24
24
  start(): void;
25
25
  getEntity(): any;
26
+ getPositions(): Cartesian3[];
26
27
  clearAll(): void;
27
28
  private circle_L_ClickEvent;
28
29
  private setAngle;
@@ -25,7 +25,7 @@ export declare class DataCenter extends DrawerStatus {
25
25
  * 获取所有节点数据
26
26
  * @returns Cartesian3[]
27
27
  */
28
- refreshPositionsData(): Cartesian3[];
28
+ protected refreshPositionsData(): Cartesian3[];
29
29
  protected clearAllData(): void;
30
30
  protected getEntityIndex(): void;
31
31
  protected deleteMoveFun(event: any): void;