@wemap/providers 8.0.0-alpha.0 → 8.0.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/index.js CHANGED
@@ -5,6 +5,8 @@ export * as Providers from './src/Providers.js';
5
5
  export { default as ProvidersInterface } from './src/ProvidersInterface.js';
6
6
  export { default as ProvidersOptions } from './src/ProvidersOptions.js';
7
7
 
8
+ export { default as MapMatchingHandler } from './src/mapmatching/MapMatchingHandler.js';
9
+
8
10
  export { default as PositionSmoother } from './src/smoothers/PositionSmoother.js';
9
11
  export { default as AttitudeSmoother } from './src/smoothers/AttitudeSmoother.js';
10
12
 
package/package.json CHANGED
@@ -41,6 +41,6 @@
41
41
  "url": "git+https://github.com/wemap/wemap-modules-js.git"
42
42
  },
43
43
  "type": "module",
44
- "version": "8.0.0-alpha.0",
45
- "gitHead": "b5cfa73ad766f0763ab980127281a561ecb9ddac"
44
+ "version": "8.0.0",
45
+ "gitHead": "d22587d4aa616ff930742d34b6b14803863475e4"
46
46
  }
@@ -23,19 +23,19 @@ import ProvidersOptions from '../ProvidersOptions.js';
23
23
  class MapMatchingHandler extends Provider {
24
24
 
25
25
  /** @type {number} in radians */
26
- static MM_MAX_ANGLE = deg2rad(30);
26
+ static DEFAULT_MM_MAX_ANGLE = deg2rad(30);
27
27
 
28
28
  /** @type {number} in meters */
29
- static MM_MAX_DIST = 30;
29
+ static DEFAULT_MM_MAX_DIST = 30;
30
30
 
31
31
  /** @type {number} in meters */
32
- static MM_MIN_DIST = 0;
32
+ static DEFAULT_MM_MIN_DIST = 0;
33
33
 
34
34
  /** @type {boolean} */
35
- static ORIENTATION_MATCHING = true;
35
+ static DEFAULT_USE_ITINERARY_START_AS_POSITION = false;
36
36
 
37
37
  /** @type {boolean} */
38
- static USE_ITINERARY_START_AS_POSITION = true;
38
+ static ORIENTATION_MATCHING = true;
39
39
 
40
40
  /** @type {number} in meters */
41
41
  static MM_HUGE_JUMP_DISTANCE = 3;
@@ -84,9 +84,10 @@ class MapMatchingHandler extends Provider {
84
84
  super();
85
85
 
86
86
  this._mapMatching = new MapMatching();
87
- this._mapMatching.maxDistance = MapMatchingHandler.MM_MAX_DIST;
88
- this._mapMatching.maxAngleBearing = MapMatchingHandler.MM_MAX_ANGLE;
89
- this._mapMatchingMinDistance = MapMatchingHandler.MM_MIN_DIST;
87
+ this._mapMatching.maxDistance = MapMatchingHandler.DEFAULT_MM_MAX_DIST;
88
+ this._mapMatching.maxAngleBearing = MapMatchingHandler.DEFAULT_MM_MAX_ANGLE;
89
+ this._mapMatchingMinDistance = MapMatchingHandler.DEFAULT_MM_MIN_DIST;
90
+ this._useItineraryStartAsPosition = MapMatchingHandler.DEFAULT_USE_ITINERARY_START_AS_POSITION;
90
91
  }
91
92
 
92
93
  /**
@@ -187,7 +188,7 @@ class MapMatchingHandler extends Provider {
187
188
  */
188
189
  _notifyPositionFromItineraryInput(itinerary) {
189
190
 
190
- if (!MapMatchingHandler.USE_ITINERARY_START_AS_POSITION || itinerary.start) {
191
+ if (!this._useItineraryStartAsPosition || itinerary.start) {
191
192
  return;
192
193
  }
193
194
 
@@ -508,6 +509,14 @@ class MapMatchingHandler extends Provider {
508
509
  set maxAngleBearing(maxAngleBearing) {
509
510
  this._mapMatching.maxAngleBearing = maxAngleBearing;
510
511
  }
512
+
513
+ get useItineraryStartAsPosition() {
514
+ return this._useItineraryStartAsPosition;
515
+ }
516
+
517
+ set useItineraryStartAsPosition(useItineraryStartAsPosition) {
518
+ this._useItineraryStartAsPosition = useItineraryStartAsPosition;
519
+ }
511
520
  }
512
521
 
513
522
  export default new MapMatchingHandler();