@wemap/routers 12.9.0 → 12.9.2

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/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "directory": "packages/routers"
13
13
  },
14
14
  "name": "@wemap/routers",
15
- "version": "12.9.0",
15
+ "version": "12.9.2",
16
16
  "bugs": {
17
17
  "url": "https://github.com/wemap/wemap-modules-js/issues"
18
18
  },
@@ -52,5 +52,5 @@
52
52
  },
53
53
  "./helpers/*": "./helpers/*"
54
54
  },
55
- "gitHead": "3a52e658a5933592bcc44488f936c150638532b2"
55
+ "gitHead": "184f537812866759dc10dd68c5c90d23ff05db43"
56
56
  }
@@ -150,4 +150,16 @@ describe('OsmGraph - complex', () => {
150
150
 
151
151
  });
152
152
 
153
+ it('horizontal elevator', () => {
154
+
155
+ const osmXmlString = loadFile('horizontal-elevator.osm');
156
+ const osmModel = OsmParser.parseOsmXmlString(osmXmlString);
157
+ const graph = OsmGraphUtils.createGraphFromOsmModel(osmModel);
158
+
159
+ verifyCoherence(graph);
160
+
161
+ expect(graph.vertices.length).equals(2);
162
+ expect(graph.edges.length).equals(1);
163
+ });
164
+
153
165
  });
@@ -134,7 +134,7 @@ export default class OsmGraphUtils {
134
134
  // It creates a graph from entries to the center of the elevator shape.
135
135
  let fakeOsmNodeId = -1;
136
136
  osmModel.ways
137
- .filter(way => way.isElevator)
137
+ .filter(way => way.isElevator && way.isGeometryClosed)
138
138
  .forEach(way => {
139
139
  const entryVertices = way.nodes.map(node => verticesMapping.filter(([osmId]) => osmId === node.id).map(vm => vm[1])).flat();
140
140