@wemap/osm 5.4.5 → 5.4.6

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
@@ -11,7 +11,7 @@
11
11
  "directory": "packages/osm"
12
12
  },
13
13
  "name": "@wemap/osm",
14
- "version": "5.4.5",
14
+ "version": "5.4.6",
15
15
  "bugs": {
16
16
  "url": "https://github.com/wemap/wemap-modules-js/issues"
17
17
  },
@@ -31,5 +31,5 @@
31
31
  "@wemap/maths": "^5.1.1",
32
32
  "saxes": "^5.0.1"
33
33
  },
34
- "gitHead": "206963038989691cf0d01ebf11afb2c3ac9da3c9"
34
+ "gitHead": "3e1281575d667fcf2e911258a449695022a61910"
35
35
  }
@@ -118,7 +118,7 @@ export function createRouterResponseFromJson(json) {
118
118
  leg.endTime = jsonDateToTimestamp(jsonLeg.Arrival.Time);
119
119
  leg.coords = [];
120
120
 
121
- if (leg.mode === 'WALK') {
121
+ if (leg.mode === 'WALK' || leg.mode === 'BICYCLE') {
122
122
 
123
123
  leg.from = {
124
124
  name: jsonLeg.Departure.Site.Name,
@@ -82,5 +82,16 @@ describe('CitywayUtils - createRouterResponseFromJson', () => {
82
82
  expect(routerResponse.itineraries[0].legs[1].mode).equal('FUNICULAR');
83
83
  });
84
84
 
85
+ it('RouterResponse - 4', () => {
86
+ const filePath = path.resolve(__dirname, '../../../assets/itinerary-lehavre-cityway-4.json');
87
+ const fileString = fs.readFileSync(filePath, 'utf8');
88
+ const json = JSON.parse(fileString);
89
+
90
+ const routerResponse = createRouterResponseFromJson(json);
91
+ verifyRouterResponseData(routerResponse);
92
+
93
+ expect(routerResponse.itineraries[0].legs[0].mode).equal('BICYCLE');
94
+ });
95
+
85
96
  });
86
97