@wemap/routers 10.5.2 → 10.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.
- package/package.json +5 -5
- package/src/Utils.js +7 -7
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"directory": "packages/routers"
|
|
13
13
|
},
|
|
14
14
|
"name": "@wemap/routers",
|
|
15
|
-
"version": "10.
|
|
15
|
+
"version": "10.6.0",
|
|
16
16
|
"bugs": {
|
|
17
17
|
"url": "https://github.com/wemap/wemap-modules-js/issues"
|
|
18
18
|
},
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"@turf/boolean-point-in-polygon": "^6.5.0",
|
|
31
31
|
"@turf/convex": "^6.5.0",
|
|
32
32
|
"@turf/helpers": "^6.5.0",
|
|
33
|
-
"@wemap/geo": "^10.
|
|
33
|
+
"@wemap/geo": "^10.6.0",
|
|
34
34
|
"@wemap/logger": "^10.0.0",
|
|
35
|
-
"@wemap/maths": "^10.
|
|
36
|
-
"@wemap/osm": "^10.
|
|
35
|
+
"@wemap/maths": "^10.6.0",
|
|
36
|
+
"@wemap/osm": "^10.6.0"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "4b046adea2d82a474aa3099f9ebea3c9f15eba19"
|
|
39
39
|
}
|
package/src/Utils.js
CHANGED
|
@@ -74,25 +74,25 @@ export function multiplyRouterResponseLevel(routerResponse, levelFactor) {
|
|
|
74
74
|
*/
|
|
75
75
|
export function forceUnknownItineraryLevelTo0(itinerary) {
|
|
76
76
|
|
|
77
|
-
itinerary.from.level
|
|
78
|
-
itinerary.to.level
|
|
77
|
+
itinerary.from.level = itinerary.from.level || 0;
|
|
78
|
+
itinerary.to.level = itinerary.to.level || 0;
|
|
79
79
|
|
|
80
80
|
for (const leg of itinerary.legs) {
|
|
81
|
-
leg.from.coords.level
|
|
82
|
-
leg.to.coords.level
|
|
81
|
+
leg.from.coords.level = leg.from.coords.level || 0;
|
|
82
|
+
leg.to.coords.level = leg.to.coords.level || 0;
|
|
83
83
|
for (const coords of leg.coords) {
|
|
84
|
-
coords.level
|
|
84
|
+
coords.level = coords.level || 0;
|
|
85
85
|
}
|
|
86
86
|
if (leg.steps) {
|
|
87
87
|
for (const step of leg.steps) {
|
|
88
|
-
step.coords.level
|
|
88
|
+
step.coords.level = step.coords.level || 0;
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
if (itinerary._coords) {
|
|
94
94
|
for (const coords of itinerary._coords) {
|
|
95
|
-
coords.level
|
|
95
|
+
coords.level = coords.level || 0;
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
}
|