@wemap/routers 12.8.8 → 12.8.9
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
CHANGED
|
@@ -449,7 +449,7 @@ class StepsBuilder {
|
|
|
449
449
|
const forceEndOfLevelChange = Boolean(
|
|
450
450
|
previousEdgeProperties.incline && previousEdgeProperties.areStairs && (!incline || !areStairs)
|
|
451
451
|
);
|
|
452
|
-
const
|
|
452
|
+
const isEntrance = vertex.properties.isSubwayEntrance;
|
|
453
453
|
const stepName = edge.properties.name || null;
|
|
454
454
|
const duration = graphRoute.edgesWeights[i];
|
|
455
455
|
const stepExtras = {
|
|
@@ -461,7 +461,7 @@ class StepsBuilder {
|
|
|
461
461
|
const splitByLevel = geo.Level.isRange(edge.level) && !geo.Level.isRange(currentCoords.level) || forceLevelChange;
|
|
462
462
|
splitByAngle = splitByAngle && !(currentCoords.level && geo.Level.isRange(currentCoords.level));
|
|
463
463
|
const splitByEndOfLevelChange = (previousStep == null ? void 0 : previousStep.levelChange) && !geo.Level.isRange(currentCoords.level) || forceEndOfLevelChange;
|
|
464
|
-
const splitStepCondition = splitByAngle || splitByLevel || splitByEndOfLevelChange ||
|
|
464
|
+
const splitStepCondition = splitByAngle || splitByLevel || splitByEndOfLevelChange || isEntrance;
|
|
465
465
|
if (isFirstStep || splitStepCondition) {
|
|
466
466
|
let levelChange;
|
|
467
467
|
if (splitByLevel) {
|
|
@@ -2788,7 +2788,10 @@ const _OsmGraphUtils = class _OsmGraphUtils {
|
|
|
2788
2788
|
})) == null ? void 0 : _a[1]) || null;
|
|
2789
2789
|
if (vertex) {
|
|
2790
2790
|
if (!geo.Level.equals(vertex.coords.level, nodeLevel)) {
|
|
2791
|
-
vertex.coords.level = geo.Level.intersection(vertex.coords.level, nodeLevel)
|
|
2791
|
+
vertex.coords.level = geo.Level.intersection(vertex.coords.level, nodeLevel);
|
|
2792
|
+
if (vertex.coords.level === null) {
|
|
2793
|
+
vertex.coords.level = nodeLevel;
|
|
2794
|
+
}
|
|
2792
2795
|
}
|
|
2793
2796
|
return vertex;
|
|
2794
2797
|
}
|