@wemap/providers 11.0.0-alpha.7 → 11.0.0-alpha.9

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/dist/index.js CHANGED
@@ -307,6 +307,7 @@ const Constants = {
307
307
  const _GnssWifiProvider = class extends Provider {
308
308
  constructor() {
309
309
  super(...arguments);
310
+ __publicField(this, "discardPositionsAbove", _GnssWifiProvider.DEFAULT_DISCARD_POSITIONS_ABOVE);
310
311
  __publicField(this, "geoLocationId");
311
312
  __publicField(this, "getName", () => "GnssWifi");
312
313
  __publicField(this, "onNewPosition", (geolocation) => {
@@ -328,6 +329,9 @@ const _GnssWifiProvider = class extends Provider {
328
329
  coords.accuracy,
329
330
  bearing
330
331
  );
332
+ if (typeof this.discardPositionsAbove === "number" && coords.accuracy > this.discardPositionsAbove) {
333
+ return;
334
+ }
331
335
  this.notify(position);
332
336
  });
333
337
  __publicField(this, "onPositionError", (error) => {
@@ -370,6 +374,7 @@ __publicField(GnssWifiProvider, "POSITION_OPTIONS", {
370
374
  timeout: Infinity,
371
375
  maximumAge: 0
372
376
  });
377
+ __publicField(GnssWifiProvider, "DEFAULT_DISCARD_POSITIONS_ABOVE", 50);
373
378
  const GnssWifiProvider$1 = new GnssWifiProvider();
374
379
  const _MissingArCoreError = class extends Error {
375
380
  constructor(message) {