"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.LocationManager = void 0;
var _maps = require("@rnmapbox/maps");
class LocationManager {
  start() {
    _maps.locationManager.start();
  }
  /**
   * @example
   * {"coords":
   *  {
   *      "accuracy": 24.95806772832081,
   *      "altitude": 588.2273369943723,
   *      "course": -1,
   *      "heading": 89.29508972167969,
   *      "latitude": 30.673172799689635,
   *      "longitude": 104.00440663503657,
   *      "speed": 0
   *  },
   * "timestamp": 1710852623018.5007
   * }
   */

  async getLastKnownLocation() {
    return await _maps.locationManager.getLastKnownLocation();
  }
  on(event, listener) {
    if (event === 'locationChange') {
      _maps.locationManager.addListener(listener);
    }
  }
  off(event, listener) {
    if (event === 'locationChange') {
      _maps.locationManager.removeListener(listener);
    }
  }
}
exports.LocationManager = LocationManager;
//# sourceMappingURL=LocationManager.js.map