@wemap/routers 12.5.0 → 12.6.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.
@@ -0,0 +1,47 @@
1
+ <?xml version='1.0' encoding='UTF-8'?>
2
+ <osm version='0.6' generator='JOSM'>
3
+ <node id='-1610618489058234' action='modify' visible='true' lat='48.87601173273' lon='2.32555037119'>
4
+ <tag k='name' v='p1' />
5
+ </node>
6
+ <node id='-1610618489058235' action='modify' visible='true' lat='48.87597991746' lon='2.3253223214'>
7
+ <tag k='name' v='p2' />
8
+ </node>
9
+ <node id='-1610618489058236' action='modify' visible='true' lat='48.87573599972' lon='2.32538912386'>
10
+ <tag k='name' v='p3' />
11
+ </node>
12
+ <node id='-1610618489058237' action='modify' visible='true' lat='48.87575872503' lon='2.32561026305'>
13
+ <tag k='name' v='p4' />
14
+ </node>
15
+ <node id='-1610618489058238' action='modify' visible='true' lat='48.87619959391' lon='2.32495145256' />
16
+ <node id='-1610618489058239' action='modify' visible='true' lat='48.87625261911' lon='2.32559874539' />
17
+ <node id='-1610618489058240' action='modify' visible='true' lat='48.87542996461' lon='2.32583140224' />
18
+ <node id='-1610618489058241' action='modify' visible='true' lat='48.87539057382' lon='2.32522557301' />
19
+ <way id='-921430905799056' action='modify' visible='true'>
20
+ <nd ref='-1610618489058234' />
21
+ <nd ref='-1610618489058235' />
22
+ <tag k='highway' v='steps' />
23
+ <tag k='level' v='0;1' />
24
+ <tag k='name' v='e1' />
25
+ </way>
26
+ <way id='-921430905799057' action='modify' visible='true'>
27
+ <nd ref='-1610618489058236' />
28
+ <nd ref='-1610618489058237' />
29
+ <tag k='highway' v='footway' />
30
+ <tag k='name' v='e3' />
31
+ </way>
32
+ <way id='-921430905799058' action='modify' visible='true'>
33
+ <nd ref='-1610618489058238' />
34
+ <nd ref='-1610618489058239' />
35
+ <nd ref='-1610618489058240' />
36
+ <nd ref='-1610618489058241' />
37
+ <nd ref='-1610618489058238' />
38
+ <tag k='wemap:routing-bounds' v='yes' />
39
+ </way>
40
+ <way id='-921430905799059' action='modify' visible='true'>
41
+ <nd ref='-1610618489058235' />
42
+ <nd ref='-1610618489058236' />
43
+ <tag k='highway' v='footway' />
44
+ <tag k='level' v='0' />
45
+ <tag k='name' v='e2' />
46
+ </way>
47
+ </osm>
package/dist/index.js CHANGED
@@ -2271,6 +2271,10 @@ const _GraphRouterOptionsBuilder = class _GraphRouterOptionsBuilder {
2271
2271
  let duration = getDurationFromLength(edge.length, 4);
2272
2272
  if (edge.properties.areStairs) {
2273
2273
  duration *= 3;
2274
+ } else if (edge.properties.areEscalators) {
2275
+ duration *= 1.5;
2276
+ } else if (edge.properties.isMovingWalkway) {
2277
+ duration *= 0.8;
2274
2278
  }
2275
2279
  return duration;
2276
2280
  };
@@ -2746,7 +2750,7 @@ const _OsmGraphUtils = class _OsmGraphUtils {
2746
2750
  })) == null ? void 0 : _a[1]) || null;
2747
2751
  if (vertex) {
2748
2752
  if (!geo.Level.equals(vertex.coords.level, nodeLevel)) {
2749
- vertex.coords.level = geo.Level.intersection(vertex.coords.level, nodeLevel);
2753
+ vertex.coords.level = geo.Level.intersection(vertex.coords.level, nodeLevel) || nodeLevel;
2750
2754
  }
2751
2755
  return vertex;
2752
2756
  }