@wemap/geo 9.0.0 → 9.0.1

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
@@ -13,7 +13,7 @@
13
13
  "directory": "packages/geo"
14
14
  },
15
15
  "name": "@wemap/geo",
16
- "version": "9.0.0",
16
+ "version": "9.0.1",
17
17
  "bugs": {
18
18
  "url": "https://github.com/wemap/wemap-modules-js/issues"
19
19
  },
@@ -31,5 +31,5 @@
31
31
  "@wemap/logger": "^9.0.0",
32
32
  "@wemap/maths": "^9.0.0"
33
33
  },
34
- "gitHead": "9f16c3cebf6f0e6d03a83835607528f5c37707cf"
34
+ "gitHead": "d69a71a799b6893ba677ccf5b1510bb0bb78c166"
35
35
  }
@@ -95,7 +95,7 @@ class MapMatching {
95
95
  (location.level !== null || edge.level !== null)
96
96
  && (
97
97
  // if edge level intersect location level
98
- !Level.intersect(location.level, edge.level)
98
+ !(Level.intersect(location.level, edge.level) !== null)
99
99
  // ignore MultiLevelSegments if option used
100
100
  || (!useMultiLevelSegments && Level.isRange(edge.level))
101
101
  )) {
@@ -192,12 +192,12 @@ class MapMatching {
192
192
  projection.distanceFromNearestElement = distNode1;
193
193
  projection.nearestElement = edge.node1;
194
194
  MapMatching._assignLatLngLevel(edge.node1.coords, projection.projection);
195
- MapMatching._updateProjectionLevelFromEdge(edge, projection.projection);
196
195
 
197
196
  if (distNode1 <= Constants.EPS_MM
198
197
  && location.level === edge.node1.coords.level) {
199
198
  break;
200
199
  }
200
+ MapMatching._updateProjectionLevelFromEdge(edge, projection.projection);
201
201
  }
202
202
  }
203
203
 
@@ -209,12 +209,12 @@ class MapMatching {
209
209
  projection.distanceFromNearestElement = distNode2;
210
210
  projection.nearestElement = edge.node2;
211
211
  MapMatching._assignLatLngLevel(edge.node2.coords, projection.projection);
212
- MapMatching._updateProjectionLevelFromEdge(edge, projection.projection);
213
212
 
214
213
  if (distNode2 <= Constants.EPS_MM
215
214
  && location.level === edge.node2.coords.level) {
216
215
  break;
217
216
  }
217
+ MapMatching._updateProjectionLevelFromEdge(edge, projection.projection);
218
218
  }
219
219
  }
220
220