import { BasePlugin } from "../base/base.plugin.js"; import type { $GeolocationPosition, $LocationOptions } from "./geolocation.type.js"; export declare class GeolocationPlugin extends BasePlugin { constructor(); /** * 单次获取定位 * (会自动跟用户申请权限) * @returns Promise<$GeolocationPosition> */ getLocation(): Promise<$GeolocationPosition>; /** * 创建对位置的监听控制器 * (会自动跟用户申请权限) * @param fps 位置更新之间的最小时间间隔(以毫秒为单位) default 3000 * @param precise 是否使用精确位置 default false * @returns Promise<$GeolocationController> */ createLocation(option?: $LocationOptions): Promise; } export declare class GeolocationController { #private; constructor(ws: WebSocket); listen(callback: (position: $GeolocationPosition) => void): () => void; get isClosed(): boolean; stop(): void; get onclose(): ((this: WebSocket, ev: CloseEvent) => any) | null; set onclose(value: ((this: WebSocket, ev: CloseEvent) => any) | null); } export declare const geolocationPlugin: GeolocationPlugin; //# sourceMappingURL=geolocation.plugin.d.ts.map