t-comm
Version:
专业、稳定、纯粹的工具库
24 lines (23 loc) • 648 B
TypeScript
export declare enum LocationFlagInPixui {
LocationSuccess = 1,
LocationNoPermission = 2,
LocationFailed = 3
}
/**
* 获取游戏定位信息,回调数据
* {
* flag: LocationFlagInPixui,
* lat: number,
* lng: number,
* }
* @example
* ```ts
* const res = await getLocationInPixui(platformAPI);
* if (res.flag === LocationFlagInPixui.LocationSuccess) {
* console.log('lat:', res.lat, 'lng:', res.lng);
* } else if (res.flag === LocationFlagInPixui.LocationNoPermission) {
* console.log('未开启系统定位权限');
* }
* ```
*/
export declare const getLocationInPixui: (platformAPI: any) => Promise<unknown>;