@wemap/routers 12.10.4 → 12.10.5
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/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/graph/GraphRouter.spec.ts +2 -2
- package/src/graph/GraphRouter.ts +2 -1
- package/src/graph/GraphRouterOptions.ts +1 -0
- package/src/graph/GraphRouterOptionsBuilder.ts +8 -2
package/dist/index.mjs
CHANGED
|
@@ -2257,6 +2257,7 @@ const _GraphRouterOptionsBuilder = class _GraphRouterOptionsBuilder {
|
|
|
2257
2257
|
__publicField(this, "avoidElevators", false);
|
|
2258
2258
|
__publicField(this, "avoidMovingWalkways", false);
|
|
2259
2259
|
__publicField(this, "avoidTicketRestrictedAreas", false);
|
|
2260
|
+
__publicField(this, "useMultiLevelSegments", false);
|
|
2260
2261
|
__publicField(this, "projectionMaxDistance");
|
|
2261
2262
|
}
|
|
2262
2263
|
setAvoidStairs(avoidStairs) {
|
|
@@ -2279,6 +2280,10 @@ const _GraphRouterOptionsBuilder = class _GraphRouterOptionsBuilder {
|
|
|
2279
2280
|
this.avoidTicketRestrictedAreas = avoidTicketRestrictedAreas;
|
|
2280
2281
|
return this;
|
|
2281
2282
|
}
|
|
2283
|
+
setUseMultiLevelSegments(useMultiLevelSegments) {
|
|
2284
|
+
this.useMultiLevelSegments = useMultiLevelSegments;
|
|
2285
|
+
return this;
|
|
2286
|
+
}
|
|
2282
2287
|
static fromJson(options) {
|
|
2283
2288
|
const builder = new _GraphRouterOptionsBuilder();
|
|
2284
2289
|
Object.assign(builder, options);
|
|
@@ -2323,7 +2328,8 @@ const _GraphRouterOptionsBuilder = class _GraphRouterOptionsBuilder {
|
|
|
2323
2328
|
},
|
|
2324
2329
|
weightEdgeFn,
|
|
2325
2330
|
acceptEdgeFn,
|
|
2326
|
-
projectionMaxDistance: this.projectionMaxDistance
|
|
2331
|
+
projectionMaxDistance: this.projectionMaxDistance,
|
|
2332
|
+
useMultiLevelSegments: this.useMultiLevelSegments
|
|
2327
2333
|
};
|
|
2328
2334
|
}
|
|
2329
2335
|
};
|
|
@@ -2594,7 +2600,8 @@ class GraphRouter extends GraphRouterEngine {
|
|
|
2594
2600
|
const createdVerticesByOriginalEdges = [];
|
|
2595
2601
|
const projectionsOptions = {
|
|
2596
2602
|
maxDistance: options.projectionMaxDistance,
|
|
2597
|
-
acceptEdgeFn: options.acceptEdgeFn
|
|
2603
|
+
acceptEdgeFn: options.acceptEdgeFn,
|
|
2604
|
+
useMultiLevelSegments: options.useMultiLevelSegments
|
|
2598
2605
|
};
|
|
2599
2606
|
const getOrCreateVertex = (coords) => {
|
|
2600
2607
|
const projection = this.graph.getProjection(coords, projectionsOptions);
|