55 lines
1.7 KiB
JavaScript

var capacitorDumonGeolocation = (function (exports, core) {
'use strict';
const DumonGeolocation = core.registerPlugin('DumonGeolocation', {
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.DumonGeolocationWeb()),
});
class DumonGeolocationWeb extends core.WebPlugin {
async startPositioning() {
console.log('DumonGeolocationWeb: startPositioning() called (no-op)');
}
async stopPositioning() {
console.log('DumonGeolocationWeb: stopPositioning() called (no-op)');
}
async getLatestPosition() {
console.log('DumonGeolocationWeb: getLatestPosition() called (returning dummy data)');
return {
source: 'GNSS',
timestamp: Date.now(),
latitude: 0,
longitude: 0,
accuracy: 999,
gnssData: {
satellitesInView: 0,
usedInFix: 0,
constellationCounts: {}
},
wifiData: [],
imuData: {
accelX: 0,
accelY: 0,
accelZ: 0,
gyroX: 0,
gyroY: 0,
gyroZ: 0,
speed: 0,
acceleration: 0,
directionRad: 0
}
};
}
}
var web = /*#__PURE__*/Object.freeze({
__proto__: null,
DumonGeolocationWeb: DumonGeolocationWeb
});
exports.DumonGeolocation = DumonGeolocation;
return exports;
})({}, capacitorExports);
//# sourceMappingURL=plugin.js.map