@wemap/geo 9.0.2 → 9.0.3

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/index.d.ts CHANGED
@@ -9,7 +9,8 @@ declare module '@wemap/geo' {
9
9
  static clone(level: Level_t): Level_t;
10
10
  static fromString(str: string): Level_t;
11
11
  static contains(container: Level_t, targeted: Level_t): boolean;
12
- static intersect(first: Level_t, second: Level_t): Level_t;
12
+ static intersection(first: Level_t, second: Level_t): Level_t;
13
+ static intersect(first: Level_t, second: Level_t): boolean;
13
14
  static union(first: Level_t, second: Level_t): Level_t;
14
15
  static multiplyBy(level: Level_t, factor: number): Level_t;
15
16
  static toString(level: Level_t): string;
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "directory": "packages/geo"
14
14
  },
15
15
  "name": "@wemap/geo",
16
- "version": "9.0.2",
16
+ "version": "9.0.3",
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": "9571683c9d159110aaaea3033208ba6b5d7fef61"
34
+ "gitHead": "ba88e7b5fa491af11700ba59f793ccf571e8f39d"
35
35
  }
@@ -92,14 +92,14 @@ class MapMatching {
92
92
  let checkNode2 = Level.intersect(location.level, edge.node2.coords.level);
93
93
 
94
94
  // Second, in case of IO nodes, accept matching if location's level is null
95
- checkNode1 ||= edge.node1.io && location.level === null;
96
- checkNode2 ||= edge.node2.io && location.level === null;
95
+ checkNode1 = checkNode1 || edge.node1.io && location.level === null;
96
+ checkNode2 = checkNode2 || edge.node2.io && location.level === null;
97
97
 
98
98
  // Third, check if level is a range if useMultiLevelSegments is false
99
99
  if (!useMultiLevelSegments) {
100
- checkEdge &&= !Level.isRange(edge.level);
101
- checkNode1 &&= !Level.isRange(edge.node1.coords.level);
102
- checkNode2 &&= !Level.isRange(edge.node2.coords.level);
100
+ checkEdge = checkEdge && !Level.isRange(edge.level);
101
+ checkNode1 = checkNode1 && !Level.isRange(edge.node1.coords.level);
102
+ checkNode2 = checkNode2 && !Level.isRange(edge.node2.coords.level);
103
103
  }
104
104
 
105
105
  // Finally, check edges bearing if option is used