@wemap/osm 4.0.11 → 4.0.13
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": "4.0.
|
|
14
|
+
"version": "4.0.13",
|
|
15
15
|
"bugs": {
|
|
16
16
|
"url": "https://github.com/wemap/wemap-modules-js/issues"
|
|
17
17
|
},
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
],
|
|
26
26
|
"license": "ISC",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@wemap/geo": "^4.0.
|
|
28
|
+
"@wemap/geo": "^4.0.13",
|
|
29
29
|
"@wemap/logger": "^4.0.0",
|
|
30
30
|
"@wemap/maths": "^4.0.3",
|
|
31
31
|
"sax": "^1.2.4"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "938eca06514ecc7ee1f4388866bbf7f174d51a9b"
|
|
34
34
|
}
|
|
@@ -76,6 +76,9 @@ class OsmNetworkUtils {
|
|
|
76
76
|
static _applyNodePropertiesFromTags(node, tags) {
|
|
77
77
|
node.name = tags.name || null;
|
|
78
78
|
node.subwayEntrance = tags.railway === 'subway_entrance';
|
|
79
|
+
if (node.subwayEntrance && tags.ref) {
|
|
80
|
+
node.subwayEntranceRef = tags.ref;
|
|
81
|
+
}
|
|
79
82
|
}
|
|
80
83
|
|
|
81
84
|
/**
|
package/src/osrm/OsrmUtils.js
CHANGED
|
@@ -111,6 +111,9 @@ export function itineraryToOsrmJson(itinerary) {
|
|
|
111
111
|
if (node.subwayEntrance) {
|
|
112
112
|
osrmStep.name = node.name;
|
|
113
113
|
osrmStep.subwayEntrance = true;
|
|
114
|
+
if (node.subwayEntranceRef) {
|
|
115
|
+
osrmStep.subwayEntranceRef = node.subwayEntranceRef;
|
|
116
|
+
}
|
|
114
117
|
}
|
|
115
118
|
|
|
116
119
|
// The first modifier is not mandatory by OSRM.
|
|
@@ -192,6 +195,10 @@ function _parseSteps(itinerary, jsonSteps) {
|
|
|
192
195
|
if (previousNode) {
|
|
193
196
|
const edge = Network.getEdgeByNodes(previousNode.edges, previousNode, node);
|
|
194
197
|
step.edges.push(edge);
|
|
198
|
+
|
|
199
|
+
if (jsonStep.name) {
|
|
200
|
+
edge.name = jsonStep.name;
|
|
201
|
+
}
|
|
195
202
|
}
|
|
196
203
|
|
|
197
204
|
previousNode = node;
|