aircitytype 1.0.24 → 1.0.27
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/index.d.ts +84 -30
- package/package.json +34 -6
package/index.d.ts
CHANGED
@@ -12,6 +12,7 @@ interface Misc {
|
|
12
12
|
getBPFunction(path: string): Promise<{ data: { params: { functionName: string, functionParams: any[] }[] }[] }>;
|
13
13
|
apiVersion: string;
|
14
14
|
apiVersionServer: string;
|
15
|
+
getMaterial(path: string): void;
|
15
16
|
}
|
16
17
|
|
17
18
|
interface InfoTree {
|
@@ -22,7 +23,7 @@ interface InfoTree {
|
|
22
23
|
color: string | [number, number, number, number],
|
23
24
|
fn?: () => void
|
24
25
|
): void;
|
25
|
-
get(fn
|
26
|
+
get(fn?: (e: { infotree: InfoTreeItem[] }) => void): Promise<{ infotree: InfoTreeItem[] }>;
|
26
27
|
hide(ids: string[] | string, fn?: () => void): void;
|
27
28
|
hideByGroupId(groupId: string, fn?: () => void): void;
|
28
29
|
highlightByGroupId(groupId: string, fn: () => void): void;
|
@@ -116,15 +117,14 @@ interface Weather {
|
|
116
117
|
}
|
117
118
|
|
118
119
|
interface TileLayer {
|
119
|
-
[x: string]: any;
|
120
120
|
add(data: TileLayerType | TileLayerType[], fn?: () => void): void;
|
121
|
-
|
122
|
-
|
121
|
+
addModifier(id: string, tileLayerId: string, coordinates: number[][], ententBufferSize: number, fn?: any): void;
|
122
|
+
clearModifier(ids: string | string[], fn?: any): void;
|
123
123
|
delete(ids: string | string[], fn?: () => void): void;
|
124
|
-
|
125
|
-
|
124
|
+
deleteModifier(id: string, tileLayerId: string, fn?: any): void;
|
125
|
+
disableClip(ids: string | string[], fn?: any): void;
|
126
126
|
disableXRay(ids: string | string[], fn?: () => void): void;
|
127
|
-
|
127
|
+
enableClip(ids: string | string[], fn?: any): void;
|
128
128
|
enableXRay(
|
129
129
|
ids: string | string[],
|
130
130
|
color?: [number, number, number, number],
|
@@ -136,9 +136,8 @@ interface TileLayer {
|
|
136
136
|
flyTime?: number,
|
137
137
|
fn?: () => void
|
138
138
|
): void;
|
139
|
-
|
140
|
-
|
141
|
-
// focusActors(data, fn)
|
139
|
+
focusActor(id: string, objectId: string, fn?: any): void;
|
140
|
+
focusActors(data: { id: string; objectIds: string[] } | { id: string; objectIds: string[] }[], fn?: any): void;
|
142
141
|
get(ids: string[] | string, fn?: () => void): Promise<{
|
143
142
|
data: {
|
144
143
|
bFlattenSupported: number;
|
@@ -158,16 +157,16 @@ interface TileLayer {
|
|
158
157
|
visible: 1;
|
159
158
|
}[]
|
160
159
|
}>;
|
161
|
-
|
162
|
-
|
160
|
+
getActorInfo(data: { id: string; objectIds: string[] }, fn?: any): Promise<{ data: any }>;
|
161
|
+
getObjectIDs(ids: string | string[], fn?: () => void): Promise<{ data: { objectIds: string[] }[] }>;
|
163
162
|
hide(p: string | string[], fn?: any): void;
|
164
|
-
|
165
|
-
|
166
|
-
|
163
|
+
hideActor(id: string, objectId: string, fn?: any): void;
|
164
|
+
hideActors(data: { id: string; objectIds: string[] } | { id: string; objectIds: string[] }[], fn?: any): void;
|
165
|
+
hideAllActors(tileLayerId: string): void;
|
167
166
|
highlightActor(id: string, objectId: string, fn?: () => void): void;
|
168
|
-
|
169
|
-
|
170
|
-
|
167
|
+
highlightActors(data: { id: string; objectIds: string[] } | { id: string; objectIds: string[] }[], fn?: any): void;
|
168
|
+
setCollision(tileLayerIds: string | string[], enabled?: boolean, mouseInteract?: boolean, mouseFunction?: boolean, characterCollision?: boolean, fn?: any): void;
|
169
|
+
setFileName(id: string, newVal: string, fn?: () => void): void;
|
171
170
|
setLocation(
|
172
171
|
id: string | string[],
|
173
172
|
newVal: [number, number, number],
|
@@ -178,7 +177,7 @@ interface TileLayer {
|
|
178
177
|
newVal: [number, number, number],
|
179
178
|
fn?: () => void
|
180
179
|
): void;
|
181
|
-
|
180
|
+
setScale(id: string, newVal: [number, number, number], fn?: any): void;
|
182
181
|
setStyle(
|
183
182
|
ids: string[] | string,
|
184
183
|
style: number,
|
@@ -191,14 +190,31 @@ interface TileLayer {
|
|
191
190
|
): void;
|
192
191
|
// setViewportVisible(id, vp, fn)
|
193
192
|
show(p: string | string[], fn?: any): void;
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
stopHighlightActors(
|
199
|
-
|
200
|
-
|
201
|
-
|
193
|
+
showActor(id: string, objectId: string, fn?: any): void;
|
194
|
+
showActors(data: { id: string; objectIds: string[] } | { id: string; objectIds: string[] }[], fn?: any): void;
|
195
|
+
showAllActors(tileLayerId: string | string[]): void;
|
196
|
+
stopHighlightAllActors(): void;
|
197
|
+
stopHighlightActors(data: { id: string; objectIds: string[] } | { id: string; objectIds: string[] }[], fn?: () => void): void;
|
198
|
+
stopHighlightActor(id: string, objectId: string): void;
|
199
|
+
updateBegin(): void;
|
200
|
+
updateEnd(): void;
|
201
|
+
|
202
|
+
// Name Type Description
|
203
|
+
// id string
|
204
|
+
// 唯一标识符
|
205
|
+
|
206
|
+
// tileLayerId string
|
207
|
+
// TileLayer对象的ID
|
208
|
+
|
209
|
+
// coordinates array
|
210
|
+
// 压平多边形的坐标
|
211
|
+
|
212
|
+
// ententBufferSize number
|
213
|
+
// 羽化范围,取值范围:[任意正浮点数],单位:米
|
214
|
+
|
215
|
+
// fn function
|
216
|
+
// 可选的回调函数,请参考二次开发:异步接口调用方式
|
217
|
+
updateModifier(id: string, tileLayerId: string, coordinates: number[][], ententBufferSize: number, fn?: any): void;
|
202
218
|
}
|
203
219
|
|
204
220
|
interface Tools {
|
@@ -310,9 +326,19 @@ declare enum MapMode {
|
|
310
326
|
BigMap = 2,
|
311
327
|
}
|
312
328
|
|
329
|
+
type EventType =
|
330
|
+
| "LeftMouseButtonClick"
|
331
|
+
| "MouseHovered" //鼠标悬停时触发此事件
|
332
|
+
| "MouseMoved" //鼠标悬停时触发此事件
|
333
|
+
| "Measurement" //进入测量模式后,测量完成时触发此事件并返回测量结果
|
334
|
+
| "CameraChanged" //对象执行focus()或相机执行set()/lookAt()/lookAtBBox()方法时触发
|
335
|
+
| "CameraTourFinished" //播放导览结束触发此事件
|
336
|
+
| "EditHelperFinished"
|
337
|
+
| "MarkerCallBack"
|
338
|
+
|
313
339
|
interface AircityEvent {
|
314
340
|
Id: string;
|
315
|
-
eventtype:
|
341
|
+
eventtype: EventType;
|
316
342
|
Type: string;
|
317
343
|
Text: string;
|
318
344
|
BoundsMax: [number, number, number];
|
@@ -480,6 +506,17 @@ interface CustomObjectBPParam {
|
|
480
506
|
parameters: { [key: string]: string | number | any[] }[],
|
481
507
|
}
|
482
508
|
|
509
|
+
type CustomTileLayer = {
|
510
|
+
id: string; //CustomObject对象的ID
|
511
|
+
tileLayerId: string; //TileLayer图层的ID
|
512
|
+
objectId: string | string[]; //TileLayer图层中包含的待复制的模型(Actor)的ObjectId,同时也支持数组类型参数即把多个actor复制为一个customObject
|
513
|
+
location: number[]; //位置坐标:[X, Y, Z],取值示例,数组元素类型:(number),取值范围:[任意数值]
|
514
|
+
coordinateType: number; //坐标系类型,取值:0为Projection类型,1为WGS84类型,默认值:0
|
515
|
+
rotation: number[]; // 旋转:[Pitch, Yaw, Roll],数组元素类型:(number),取值范围:[任意数值]
|
516
|
+
scale: number[]; // 缩放:[X, Y, Z],数组元素类型:(number),取值范围:[任意正整数]
|
517
|
+
smoothMotion: number; // 1: 平滑插值,0: 跳跃
|
518
|
+
}
|
519
|
+
|
483
520
|
interface CustomObject {
|
484
521
|
delete: any;
|
485
522
|
focus(id: string, t?: number): void;
|
@@ -511,6 +548,8 @@ interface CustomObject {
|
|
511
548
|
show(ids: string[] | string, fn?: () => void): void;
|
512
549
|
hide(ids: string[] | string, fn?: () => void): void;
|
513
550
|
restoreMaterial(ids: string | string[]): void;
|
551
|
+
addByTileLayer(data: CustomTileLayer | CustomTileLayer[]): void;
|
552
|
+
|
514
553
|
/**
|
515
554
|
*
|
516
555
|
* data object | array
|
@@ -536,9 +575,9 @@ type marker3dType = {
|
|
536
575
|
groupId?: string;
|
537
576
|
text?: string; //3D标注显示文字
|
538
577
|
textSize?: number; //3D标注显示文字大小
|
539
|
-
textColor?: [number, number, number, number]; //3D标注显示文字颜色
|
578
|
+
textColor?: [number, number, number, number] | string; //3D标注显示文字颜色
|
540
579
|
textOutlineSize?: number; //3D标注显示文字轮廓大小
|
541
|
-
textOutlineColor?: [number, number, number, number]; // 3D标注显示文字轮廓颜色
|
580
|
+
textOutlineColor?: [number, number, number, number] | string; // 3D标注显示文字轮廓颜色
|
542
581
|
textFixed?: boolean; // 3D标注显示文字是否固定文本朝向
|
543
582
|
textVisible?: boolean; //3D标注显示文字是否显示文本
|
544
583
|
textLocation?: number[]; // 文字位置
|
@@ -548,6 +587,9 @@ type marker3dType = {
|
|
548
587
|
pointVisible?: boolean; //3D标注是否显示
|
549
588
|
pointScale?: number; //3D标注整体缩放比例
|
550
589
|
coordinate?: [number, number, number] | number[]; //3D标注的位置坐标
|
590
|
+
coordinateType?: number
|
591
|
+
range?: [number, number]
|
592
|
+
autoHeight?: boolean
|
551
593
|
userData?: string;
|
552
594
|
};
|
553
595
|
type markType = {
|
@@ -578,6 +620,7 @@ type markType = {
|
|
578
620
|
textBackgroundColor?: [number, number, number, number];
|
579
621
|
popupBackgroundColor?: number[];
|
580
622
|
hoverImagePath?: string;
|
623
|
+
clusterByImage?: boolean;
|
581
624
|
displayMode?: number;
|
582
625
|
priority?: number;
|
583
626
|
occlusionCull?: boolean;
|
@@ -634,6 +677,7 @@ interface Marker {
|
|
634
677
|
focus(id: string, o1?: number, o2?: number): any;
|
635
678
|
show(ids: string[] | string, fn?: () => void): void;
|
636
679
|
hide(ids: string[] | string, fn?: () => void): void;
|
680
|
+
hideAllPopupWindow(): void;
|
637
681
|
setCoordinate(
|
638
682
|
id: string,
|
639
683
|
newVal: [number, number, number],
|
@@ -653,6 +697,11 @@ interface Marker3D {
|
|
653
697
|
hide(ids: string[] | string, fn?: () => void): void;
|
654
698
|
delete(ids: string[] | string): void;
|
655
699
|
deleteByGroupId(id: string): void;
|
700
|
+
hideByGroupId(id: string): void;
|
701
|
+
}
|
702
|
+
|
703
|
+
interface Vehicle {
|
704
|
+
delete(id: string): void;
|
656
705
|
}
|
657
706
|
|
658
707
|
interface EditHelper {
|
@@ -708,8 +757,11 @@ declare class AirCityAPI {
|
|
708
757
|
polygon3d: Polygon3D;
|
709
758
|
polyline: Polyline;
|
710
759
|
marker: Marker;
|
760
|
+
vehicle: Vehicle;
|
711
761
|
marker3d: Marker3D;
|
712
762
|
editHelper: EditHelper;
|
763
|
+
reset(p?: number): void;
|
764
|
+
destroy(): void;
|
713
765
|
}
|
714
766
|
|
715
767
|
declare interface AirInstance {
|
@@ -805,3 +857,5 @@ declare var imgURL: string;
|
|
805
857
|
declare var Disk: string;
|
806
858
|
declare var objectIds: string[];
|
807
859
|
declare var wrap: (id: string, id1: string, url: string) => void;
|
860
|
+
|
861
|
+
|
package/package.json
CHANGED
@@ -1,12 +1,40 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
|
2
|
+
"_args": [
|
3
|
+
[
|
4
|
+
"aircitytype@1.0.26",
|
5
|
+
"E:\\projects\\srdnqd6.0"
|
6
|
+
]
|
7
|
+
],
|
8
|
+
"_from": "aircitytype@1.0.26",
|
9
|
+
"_id": "aircitytype@1.0.26",
|
10
|
+
"_inBundle": false,
|
11
|
+
"_integrity": "sha512-xSu2UsPN/cn0MlbdsI0X6VdKLBvnHS9T5bzMun58c/CpB4iviuJzP7gCxB7VGMesc71UBcst/SiB1InPEEP2PQ==",
|
12
|
+
"_location": "/aircitytype",
|
13
|
+
"_phantomChildren": {},
|
14
|
+
"_requested": {
|
15
|
+
"type": "version",
|
16
|
+
"registry": true,
|
17
|
+
"raw": "aircitytype@1.0.26",
|
18
|
+
"name": "aircitytype",
|
19
|
+
"escapedName": "aircitytype",
|
20
|
+
"rawSpec": "1.0.26",
|
21
|
+
"saveSpec": null,
|
22
|
+
"fetchSpec": "1.0.26"
|
23
|
+
},
|
24
|
+
"_requiredBy": [
|
25
|
+
"/"
|
26
|
+
],
|
27
|
+
"_resolved": "https://registry.npmmirror.com/aircitytype/-/aircitytype-1.0.26.tgz",
|
28
|
+
"_spec": "1.0.26",
|
29
|
+
"_where": "E:\\projects\\srdnqd6.0",
|
30
|
+
"author": "",
|
4
31
|
"description": "",
|
32
|
+
"keywords": [],
|
33
|
+
"license": "ISC",
|
5
34
|
"main": "index.js",
|
35
|
+
"name": "aircitytype",
|
6
36
|
"scripts": {
|
7
37
|
"test": "echo \"Error: no test specified\" && exit 1"
|
8
38
|
},
|
9
|
-
"
|
10
|
-
|
11
|
-
"license": "ISC"
|
12
|
-
}
|
39
|
+
"version": "1.0.27"
|
40
|
+
}
|