@wemap/providers 3.1.15 → 3.1.17
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
|
@@ -65,6 +65,6 @@
|
|
|
65
65
|
"lint": "eslint --ext .js,.jsx --quiet src",
|
|
66
66
|
"test": "mocha -r esm \"src/**/*.spec.js\""
|
|
67
67
|
},
|
|
68
|
-
"version": "3.1.
|
|
69
|
-
"gitHead": "
|
|
68
|
+
"version": "3.1.17",
|
|
69
|
+
"gitHead": "86f10be874c865261ae07521d64c31d7db1445f4"
|
|
70
70
|
}
|
|
@@ -127,6 +127,30 @@ class ProvidersInterface {
|
|
|
127
127
|
static set logger(enabled) {
|
|
128
128
|
ProvidersLogger.enabled = enabled;
|
|
129
129
|
}
|
|
130
|
+
|
|
131
|
+
static get mapMatchingMaxDistance() {
|
|
132
|
+
return AbsolutePosition.mapMatchingMaxDistance;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
static set mapMatchingMaxDistance(maxDistance) {
|
|
136
|
+
AbsolutePosition.mapMatchingMaxDistance = maxDistance;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
static get mapMatchingMinDistance() {
|
|
140
|
+
return AbsolutePosition.mapMatchingMinDistance;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
static set mapMatchingMinDistance(minDistance) {
|
|
144
|
+
AbsolutePosition.mapMatchingMinDistance = minDistance;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
static get mapMatchingMaxAngleBearing() {
|
|
148
|
+
return AbsolutePosition.mapMatchingMaxAngleBearing;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
static set mapMatchingMaxAngleBearing(maxAngleBearing) {
|
|
152
|
+
AbsolutePosition.mapMatchingMaxAngleBearing = maxAngleBearing;
|
|
153
|
+
}
|
|
130
154
|
}
|
|
131
155
|
|
|
132
156
|
export default ProvidersInterface;
|
|
@@ -32,6 +32,7 @@ class AbsolutePositionProvider extends MetaProvider {
|
|
|
32
32
|
this.mapMatching = new MapMatching();
|
|
33
33
|
this.mapMatching.maxDistance = MM_MAX_DIST;
|
|
34
34
|
this.mapMatching.maxAngleBearing = MM_MAX_ANGLE;
|
|
35
|
+
this._mapMatchingMinDistance = MM_MIN_DIST;
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
/**
|
|
@@ -142,7 +143,7 @@ class AbsolutePositionProvider extends MetaProvider {
|
|
|
142
143
|
|
|
143
144
|
// Do not use projection if it too close from itinerary,
|
|
144
145
|
// this allows left/right movements (ie with ArCore)
|
|
145
|
-
if (projection.distanceFromNearestElement >
|
|
146
|
+
if (projection.distanceFromNearestElement > this._mapMatchingMinDistance) {
|
|
146
147
|
projectedPosition.lat = projection.projection.lat;
|
|
147
148
|
projectedPosition.lng = projection.projection.lng;
|
|
148
149
|
}
|
|
@@ -180,6 +181,29 @@ class AbsolutePositionProvider extends MetaProvider {
|
|
|
180
181
|
|
|
181
182
|
}
|
|
182
183
|
|
|
184
|
+
get mapMatchingMaxDistance() {
|
|
185
|
+
return this.mapMatching.maxDistance;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
set mapMatchingMaxDistance(maxDistance) {
|
|
189
|
+
this.mapMatching.maxDistance = maxDistance;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
get mapMatchingMinDistance() {
|
|
193
|
+
return this._mapMatchingMinDistance;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
set mapMatchingMinDistance(minDistance) {
|
|
197
|
+
this._mapMatchingMinDistance = minDistance;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
get mapMatchingMaxAngleBearing() {
|
|
201
|
+
return this.mapMatching.maxAngleBearing;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
set mapMatchingMaxAngleBearing(maxAngleBearing) {
|
|
205
|
+
this.mapMatching.maxAngleBearing = maxAngleBearing;
|
|
206
|
+
}
|
|
183
207
|
}
|
|
184
208
|
|
|
185
209
|
export default AbsolutePositionProvider;
|