@aibee/crc-bmap 0.2.25 → 0.3.0

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.
@@ -16,7 +16,7 @@ export declare class NavPath extends EventDispatcher<EventMap> {
16
16
  initRoadStatus: boolean;
17
17
  constructor();
18
18
  setRoadData(roadData: RoadData2[], facilities: Facility[]): Promise<void>;
19
- getPath(start: Start2, end: End2, type?: RouteType2): Promise<PathData>;
19
+ getPath(start: Start2, end: End2, type?: RouteType2, permission?: number): Promise<PathData>;
20
20
  getDirectionPath(points: [number, number][]): Promise<DirectionPathData[]>;
21
21
  dispose(): Promise<void>;
22
22
  }
@@ -25,6 +25,10 @@ export interface RoadData2 {
25
25
  userData: Record<string, string>;
26
26
  escalatorType: "" | "single" | "double" | "jd";
27
27
  escalatorDirection: "" | "up" | "down" | "exit";
28
+ openStatus?: boolean;
29
+ startTime?: string;
30
+ endTime?: string;
31
+ permission?: number;
28
32
  }>;
29
33
  }
30
34
  export interface Facility {
@@ -90,6 +94,10 @@ export declare class RoadNetwork2 {
90
94
  userData: Record<string, string>;
91
95
  escalatorType: "" | "single" | "double" | "jd";
92
96
  escalatorDirection: "" | "up" | "down" | "exit";
97
+ openStatus?: boolean;
98
+ startTime?: string;
99
+ endTime?: string;
100
+ permission?: number;
93
101
  }>;
94
102
  nodeMap: Map<string, string>;
95
103
  facilityMap: Map<string, {
@@ -105,6 +113,10 @@ export declare class RoadNetwork2 {
105
113
  userData: Record<string, string>;
106
114
  escalatorType: "" | "single" | "double" | "jd";
107
115
  escalatorDirection: "" | "up" | "down" | "exit";
116
+ openStatus?: boolean;
117
+ startTime?: string;
118
+ endTime?: string;
119
+ permission?: number;
108
120
  }[]>;
109
121
  straightLadderMap: Map<string, {
110
122
  id: string;
@@ -119,6 +131,10 @@ export declare class RoadNetwork2 {
119
131
  userData: Record<string, string>;
120
132
  escalatorType: "" | "single" | "double" | "jd";
121
133
  escalatorDirection: "" | "up" | "down" | "exit";
134
+ openStatus?: boolean;
135
+ startTime?: string;
136
+ endTime?: string;
137
+ permission?: number;
122
138
  }[]>;
123
139
  escalatorMap: Map<string, {
124
140
  start?: RoadData2["points"][0];
@@ -141,6 +157,10 @@ export declare class RoadNetwork2 {
141
157
  userData: Record<string, string>;
142
158
  escalatorType: "" | "single" | "double" | "jd";
143
159
  escalatorDirection: "" | "up" | "down" | "exit";
160
+ openStatus?: boolean;
161
+ startTime?: string;
162
+ endTime?: string;
163
+ permission?: number;
144
164
  }[]>;
145
165
  parkingMap: Map<string, {
146
166
  id: string;
@@ -155,6 +175,10 @@ export declare class RoadNetwork2 {
155
175
  userData: Record<string, string>;
156
176
  escalatorType: "" | "single" | "double" | "jd";
157
177
  escalatorDirection: "" | "up" | "down" | "exit";
178
+ openStatus?: boolean;
179
+ startTime?: string;
180
+ endTime?: string;
181
+ permission?: number;
158
182
  }>;
159
183
  lineMap: Map<string, Map<string, number>>;
160
184
  baseRoute: Graph;
@@ -166,6 +190,26 @@ export declare class RoadNetwork2 {
166
190
  isFacilityByType(type: string): boolean;
167
191
  private initFacilities;
168
192
  initRoute(roadInfo: RoadData2[], facilities: Facility[]): void;
193
+ /**
194
+ * 权限
195
+ * 先弄一个不包含权限的路网
196
+ * 如果规划的路线是需要权限的
197
+ * 在根据权限创建一次性使用的路网
198
+ * 1。保存有权限的点和路线???
199
+ * 2。创建一次性路网的时候,怎么给默认的权重
200
+ * 3. 通行设施怎么保存
201
+ * 在添加通行设施时,如果是有权限的跳过
202
+ * 在处理完设施点之后,先给设施添加到权限表里
203
+ */
204
+ getPermissionMap(permission: number): Set<{
205
+ fromKey: string;
206
+ toKey: string;
207
+ distance: number;
208
+ type: Exclude<Facility['entry_infra_type'], 'facility'> | '';
209
+ }>;
210
+ setPermissionLine(fromKey: string, toKey: string, permission: number, distance: number, type: Exclude<Facility['entry_infra_type'], 'facility'> | ''): void;
211
+ addPermissionFacility(): void;
212
+ addPermissionLineToMap(permission: number, types: (Exclude<Facility['entry_infra_type'], 'facility'> | '')[], lineMap: Map<string, Map<string, number>>, weightMap: Map<typeof types[0], number>): void;
169
213
  addLineItem(start: string, end: string, distance: number, lineMap?: Map<string, Map<string, number>>): void;
170
214
  /**
171
215
  * 把设施添加的路网图中
@@ -196,9 +240,10 @@ export declare class RoadNetwork2 {
196
240
  * @param start 起点
197
241
  * @param end 终点
198
242
  * @param type '' 最短路径 escalator 扶梯优先 straightLadder 直梯优先
243
+ * @param permission 0 无权限 1 通行卡
199
244
  * @returns
200
245
  */
201
- getPath(start: Start2, end: End2, type?: RouteType2): "start-error" | "end-error" | "no-start" | "no-end" | PathData2 | null | undefined;
246
+ getPath(start: Start2, end: End2, type?: RouteType2, permission?: number): "start-error" | "end-error" | "no-start" | "no-end" | PathData2 | null | undefined;
202
247
  private getRoutePath;
203
248
  private getBasePath;
204
249
  private getEscalatorPath;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aibee/crc-bmap",
3
- "version": "0.2.25",
3
+ "version": "0.3.0",
4
4
  "description": "",
5
5
  "main": "lib/bmap.min.js",
6
6
  "module": "lib/bmap.esm.js",