aircitytype 1.0.19 → 1.0.21

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.
Files changed (2) hide show
  1. package/index.d.ts +21 -12
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -9,6 +9,7 @@ interface Misc {
9
9
  setMainUIVisibility(flag: boolean): void;
10
10
  isApiVersionMatched(): boolean;
11
11
  callBPFunction(v: BPData): void;
12
+ getBPFunction(path: string): Promise<{ data: { params: { functionName: string, functionParams: any[] }[] }[] }>;
12
13
  apiVersion: string;
13
14
  apiVersionServer: string;
14
15
  }
@@ -239,7 +240,7 @@ interface Tools {
239
240
  * fn function
240
241
  * 可选的回调函数,请参考二次开发:异步接口调用方式
241
242
  */
242
- startPolygonClip(coordinates: [number, number, number][], isReverseCut?: boolean, fn?: () => void): void;
243
+ startPolygonClip(coordinates: [number, number, number][] | number[], isReverseCut?: boolean, fn?: () => void): void;
243
244
  }
244
245
 
245
246
  interface Settings {
@@ -312,6 +313,7 @@ declare enum MapMode {
312
313
  interface AircityEvent {
313
314
  Id: string;
314
315
  eventtype: string;
316
+ coordinates: number[];
315
317
  Type: string;
316
318
  Text: string;
317
319
  BoundsMax: [number, number, number];
@@ -467,7 +469,7 @@ type CustomObjectParams = {
467
469
  location?: number[]; //位置坐标
468
470
  rotation?: [number, number, number]; //旋转
469
471
  localRotation?: [number, number, number];
470
- scale?: [number, number, number]; //缩放
472
+ scale?: [number, number, number] | number[]; //缩放
471
473
  smoothMotion?: number; //1: 平滑插值,0: 跳跃
472
474
  UserData?: string; //
473
475
  };
@@ -480,7 +482,7 @@ interface CustomObjectParam {
480
482
 
481
483
  interface CustomObject {
482
484
  delete: any;
483
- focus(id: string, t: number): void;
485
+ focus(id: string, t?: number): void;
484
486
  startMove(id: string, v: number, t: any[]): void;
485
487
  add(p: CustomObjectParams | CustomObjectParams[]): void;
486
488
  focus(p: string, a: number, c: number): Promise<void>;
@@ -505,7 +507,7 @@ interface CustomObject {
505
507
  timestamp: number;
506
508
  }>;
507
509
  callBatchBPFunction(v: CustomObjectParam | CustomObjectParam[]): void;
508
- setLocation(id: string | string[], arr: [number, number, number]): void;
510
+ setLocation(id: string | string[], arr: number[], smoothTime?: number): void;
509
511
  show(ids: string[] | string, fn?: () => void): void;
510
512
  hide(ids: string[] | string, fn?: () => void): void;
511
513
  restoreMaterial(ids: string | string[]): void;
@@ -529,7 +531,7 @@ interface Heatmap {
529
531
  clear(): void;
530
532
  }
531
533
 
532
- type marker3d = {
534
+ type marker3dType = {
533
535
  id: string;
534
536
  groupId?: string;
535
537
  text?: string; //3D标注显示文字
@@ -545,7 +547,7 @@ type marker3d = {
545
547
  pointName?: string; //3D标注展示的特效名称
546
548
  pointVisible?: boolean; //3D标注是否显示
547
549
  pointScale?: number; //3D标注整体缩放比例
548
- coordinate?: [number, number, number]; //3D标注的位置坐标
550
+ coordinate?: [number, number, number] | number[]; //3D标注的位置坐标
549
551
  userData?: string;
550
552
  };
551
553
  type markType = {
@@ -587,11 +589,17 @@ type markType = {
587
589
 
588
590
  interface PolygonType {
589
591
  id: string;
590
- coordinates: Array<number[]>; //左上,右上,右下,做下这样的顺序
591
- color: number[]; //多边形的填充颜色
592
- frameColor: Color;
593
- frameThickness: number;
594
- depthTest: boolean;
592
+ groupId?: string;
593
+ coordinateType?: number;
594
+ range?: [number, number];
595
+ coordinates?: Array<number[]>; //左上,右上,右下,做下这样的顺序
596
+ color?: string | number[]; //多边形的填充颜色
597
+ frameColor?: Color;
598
+ frameThickness?: number;
599
+ intensity?: number;//亮度
600
+ style?: number;
601
+ userData?: string;
602
+ depthTest?: boolean;
595
603
  }
596
604
 
597
605
  interface PolyLineType {
@@ -635,7 +643,7 @@ interface Marker {
635
643
 
636
644
  interface Marker3D {
637
645
  clear(): void;
638
- add(p: marker3d | marker3d[]): Promise<null>;
646
+ add(p: marker3dType | marker3dType[]): Promise<null>;
639
647
  /**
640
648
  * o1 distance
641
649
  * o2 flytime
@@ -644,6 +652,7 @@ interface Marker3D {
644
652
  show(ids: string[] | string, fn?: () => void): void;
645
653
  hide(ids: string[] | string, fn?: () => void): void;
646
654
  delete(ids: string[] | string): void;
655
+ hideByGroupId(id: string | string[]): void;
647
656
  deleteByGroupId(id: string): void;
648
657
  }
649
658
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aircitytype",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {