47 lines
1.3 KiB
TypeScript
47 lines
1.3 KiB
TypeScript
import { WebPlugin } from '@capacitor/core';
|
|
import type { PositioningData } from './definitions';
|
|
|
|
export class DumonGeolocationWeb extends WebPlugin {
|
|
async startPositioning(): Promise<void> {
|
|
console.log('DumonGeolocationWeb: startPositioning() called (no-op)');
|
|
}
|
|
|
|
async stopPositioning(): Promise<void> {
|
|
console.log('DumonGeolocationWeb: stopPositioning() called (no-op)');
|
|
}
|
|
|
|
async getLatestPosition(): Promise<PositioningData> {
|
|
console.log('DumonGeolocationWeb: getLatestPosition() called (returning dummy data)');
|
|
return {
|
|
source: 'GNSS',
|
|
timestamp: Date.now(),
|
|
latitude: 0,
|
|
longitude: 0,
|
|
accuracy: 999,
|
|
speed: 0,
|
|
acceleration: 0,
|
|
directionRad: 0,
|
|
isMocked: false,
|
|
};
|
|
}
|
|
|
|
async checkAndRequestPermissions(): Promise<{
|
|
location: 'granted' | 'denied';
|
|
wifi: 'granted' | 'denied';
|
|
}> {
|
|
console.info('[dumon-geolocation] checkAndRequestPermissions mocked for web.');
|
|
return {
|
|
location: 'granted',
|
|
wifi: 'granted',
|
|
};
|
|
}
|
|
|
|
async configureEdgeToEdge(options: {
|
|
bgColor: string;
|
|
style: 'DARK' | 'LIGHT';
|
|
overlay?: boolean;
|
|
}): Promise<void> {
|
|
console.info('[dumon-geolocation] configureEdgeToEdge called on web with:', options);
|
|
// No-op
|
|
}
|
|
} |