aircitytype 1.0.0 → 1.0.3

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 +72 -1
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -211,6 +211,34 @@ interface Tools {
211
211
  ): Promise<{
212
212
  LineIntersectPoint: [number, number, number];
213
213
  }>;
214
+ /**
215
+ * startEndPointArr array
216
+ * 线段起止点坐标数组,数组元素对象支持以下属性:数组格式示例:[{"start":[1500,86600,3000],"end":[1512.514892578125,86679.796875,-10]},{"start":[1200,82600,3000],"end":[1512.514892578125,86679.796875,-10]}]
217
+ * start
218
+ * 线段起点坐标,取值示例
219
+ * end
220
+ * 线段终点坐标,取值示例
221
+ * highPrecision boolean
222
+ * 是否高精度,默认值:false
223
+ * returnDetails boolean
224
+ * 是否返回求交数据的详情,默认值:true,注意:设置为false后只返回交点信息LineIntersectPoint,且当数据量大时设置为false可以提升效率
225
+ *
226
+ *
227
+ */
228
+ linesIntersect(arr: { start: [number, number, number], end: [number, number, number] }[], start: boolean, end: boolean): Promise<{
229
+ intersects: { LineIntersectPoint: [number, number, number] }[]
230
+ }>;
231
+ /**
232
+ * coordinates array
233
+ * 多边形坐标数组(数组的格式与Polygon、Polygon3D、HighlightArea一样),取值示例
234
+
235
+ * isReverseCut boolean
236
+ * 多边形剖切是否反转,默认值:false
237
+
238
+ * fn function
239
+ * 可选的回调函数,请参考二次开发:异步接口调用方式
240
+ */
241
+ startPolygonClip(coordinates: [number, number, number][], isReverseCut?: boolean, fn?: () => void): void;
214
242
  }
215
243
 
216
244
  interface Settings {
@@ -227,6 +255,16 @@ interface Settings {
227
255
  setMainUIVisibility(visible: boolean, fn?: () => void): void;
228
256
  setMapMode(mode: any, options: any, fn?: any): void;
229
257
  setwmtsLayerVisible(a?: any): void;
258
+ /**
259
+ * alpha number
260
+ 透明度,取值范围:[0,1]
261
+
262
+ fn function
263
+ 可选的回调函数,请参考二次开发:异步接口调用方式
264
+ *
265
+ */
266
+
267
+ setTerrainAlpha(alpha: number, fn?: () => void): void;
230
268
  // setMapURL(url, fn)
231
269
  // setMousePickMask(mask, fn)
232
270
  // setOceanColor(color, fn)
@@ -297,7 +335,7 @@ declare class CameraTour {
297
335
  constructor(p1: string, p2: string, p3: CameraTourKeyFrame[]);
298
336
  add(p: CameraTourData): void;
299
337
  play(p: string): void;
300
- stop(p: string): void;
338
+ stop(p?: () => void): void;
301
339
  delete(v: string): void;
302
340
  pause(): void;
303
341
  resume(): void;
@@ -575,6 +613,38 @@ interface Marker3D {
575
613
  deleteByGroupId(id: string): void;
576
614
  }
577
615
 
616
+ interface EditHelper {
617
+ cancel(fn?: () => void): void;
618
+ /**
619
+ *
620
+ * withOffset boolean
621
+ 是否计算工程中心偏移,默认值是true
622
+
623
+ fn function
624
+ 可选的回调函数,请参考二次开发:异步接口调用方式
625
+ *
626
+ */
627
+
628
+ finish(withOffset: boolean, fn?: () => void): void;
629
+ /**
630
+
631
+ lineType number
632
+ 线类型,0:直线,1:曲线,默认值是0
633
+
634
+ buildType number
635
+ 绘制类型,0:画多点线段, 1:画多边形, 默认值是0
636
+
637
+ color Color
638
+ 颜色,支持四种格式,取值示例
639
+
640
+ fn function
641
+ 可选的回调函数,请参考二次开发:异步接口调用方式
642
+ *
643
+ */
644
+ setParam(lineType: number, buildType: number, color: [number, number, number, number], fn?: () => void): void;
645
+ start(fn?: () => void): void;
646
+ }
647
+
578
648
  declare class AirCityAPI {
579
649
  tag: any;
580
650
  coord: any;
@@ -597,6 +667,7 @@ declare class AirCityAPI {
597
667
  polyline: Polyline;
598
668
  marker: Marker;
599
669
  marker3d: Marker3D;
670
+ editHelper: EditHelper;
600
671
  }
601
672
 
602
673
  declare interface AirInstance {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aircitytype",
3
- "version": "1.0.0",
3
+ "version": "1.0.3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {