aircitytype 1.0.9 → 1.0.11

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 +20 -20
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -158,7 +158,7 @@ interface TileLayer {
158
158
  }>;
159
159
  // getActorInfo(data, fn)
160
160
  // getObjectIDs(ids, fn)
161
- hide(p: string | string[], fn?: any): void;
161
+ hide(p: string, fn?: any): void;
162
162
  // hideActor(id, objectId, fn)
163
163
  // hideActors(data, fn)
164
164
  // hideAllActors(tileLayerId)
@@ -321,7 +321,6 @@ interface AircityEvent {
321
321
  PropertyName: string;
322
322
  Position: [number, number, number];
323
323
  UserData: string;
324
- coordinates: [number, number, number][]
325
324
  }
326
325
 
327
326
  declare class CameraTourKeyFrame {
@@ -343,8 +342,14 @@ declare class CameraTour {
343
342
  }
344
343
 
345
344
  interface Polygon {
346
- add(v: PolygonType | PolygonType[]): void;
347
- delete(id: string | string[]): void;
345
+ add(v: {
346
+ id: string;
347
+ coordinates: Array<number[]>; //左上,右上,右下,做下这样的顺序
348
+ color: number[]; //多边形的填充颜色
349
+ frameColor: Color;
350
+ frameThickness: number;
351
+ depthTest: boolean;
352
+ }): void;
348
353
  clear(): void;
349
354
  }
350
355
 
@@ -357,7 +362,7 @@ interface Polygon3D {
357
362
  interface Polyline {
358
363
  add(arg0: PolyLineType): void;
359
364
  focus(id: string, distance?: number): void;
360
- delete(id: string | string[]): void;
365
+ delete(id: string): void;
361
366
  hide(id: string): void;
362
367
  clear(): void;
363
368
  }
@@ -471,8 +476,14 @@ type CustomObjectParams = {
471
476
  UserData?: string; //
472
477
  };
473
478
 
479
+ interface CustomObjectParam {
480
+ id: string;
481
+ functionName: string
482
+ parameters: { [key: string]: string | number | any[] }[],
483
+ }
484
+
474
485
  interface CustomObject {
475
- delete(id: string | string[]): void;
486
+ delete: any;
476
487
  focus(id: string, t: number): void;
477
488
  startMove(id: string, v: number, t: any[]): void;
478
489
  add(p: CustomObjectParams | CustomObjectParams[]): void;
@@ -497,11 +508,11 @@ interface CustomObject {
497
508
  resultMessage: string;
498
509
  timestamp: number;
499
510
  }>;
511
+ callBatchBPFunction(v: CustomObjectParam | CustomObjectParam[]): void;
500
512
  setLocation(id: string | string[], arr: [number, number, number]): void;
501
513
  show(ids: string[] | string, fn?: () => void): void;
502
514
  hide(ids: string[] | string, fn?: () => void): void;
503
515
  restoreMaterial(ids: string | string[]): void;
504
- callBatchBPFunction(param: { id: string, functionName: string, parameters: any } | { id: string, functionName: string, parameters: any }[]): void;
505
516
  /**
506
517
  *
507
518
  * data object | array
@@ -515,7 +526,7 @@ interface CustomObject {
515
526
  可选的回调函数,请参考二次开发:异步接口调用方式
516
527
  */
517
528
 
518
- overrideMaterial(data: any, fn?: () => void): void;
529
+ overrideMaterial(data: any, fn: () => void): void;
519
530
  }
520
531
 
521
532
  interface Heatmap {
@@ -585,7 +596,7 @@ interface PolyLineType {
585
596
  color?: string | [number, number, number, number]; // 颜色值,支持四种格式,取值示例
586
597
  coordinates?: [number, number, number][]; // 坐标点数组,取值示例
587
598
  coordinateType?: number; // 坐标系类型,取值范围:0为Projection类型,1为WGS84类型,默认值:0
588
- style?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7; // {Arrow: 0, Arrow1: 1, Flow: 2, Beam: 3, Normal: 4,OnTerrain:5} 参考 PolylineStyle
599
+ style?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7; // 折线样式,箭头/光流/贴地/实线/虚线等,取值范围:[0~7],参考 PolylineStyle
589
600
  thickness?: number; //线宽,单位:米,默认值20
590
601
  intensity?: number; //亮度,取值范围:[0~1000],默认值:0.5
591
602
  flowRate?: number; // 流速,取值范围:[0~1.0],默认值:0.5
@@ -594,15 +605,6 @@ interface PolyLineType {
594
605
  shape?: number; //样式,0:直线, 1:曲线
595
606
  }
596
607
 
597
- interface PolygonType {
598
- id: string;
599
- coordinates: Array<number[]>; //左上,右上,右下,做下这样的顺序
600
- color: number[]; //多边形的填充颜色
601
- frameColor: Color;
602
- frameThickness: number;
603
- depthTest: boolean;
604
- }
605
-
606
608
  interface Marker {
607
609
  clear(): void;
608
610
  add(p: markType | markType[]): Promise<null>;
@@ -631,8 +633,6 @@ interface Marker3D {
631
633
  hide(ids: string[] | string, fn?: () => void): void;
632
634
  delete(ids: string[] | string): void;
633
635
  deleteByGroupId(id: string): void;
634
- hideByGroupId(groupID: string): void;
635
- showByGroupId(groupId: string, fn?: () => void): void;
636
636
  }
637
637
 
638
638
  interface EditHelper {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aircitytype",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {