UNPKG

@nativescript/geolocation

Version:

Provides API for getting and monitoring location for NativeScript app.

23 lines (22 loc) 1.47 kB
import { LocationBase } from './common'; import { Options, successCallbackType, errorCallbackType, permissionCallbackType } from '.'; export * from './common'; export declare function getCurrentLocation(options?: Options): Promise<Location>; export declare function watchLocation(successCallback: successCallbackType, errorCallback: errorCallbackType, options?: Options): Promise<number>; export declare function watchPermissionStatus(permissionCallback: permissionCallbackType, errorCallback: errorCallbackType): any; export declare function clearWatch(watchId: number): void; export declare function enableLocationRequest(always?: boolean, openSettingsIfLocationHasBeenDenied?: boolean): Promise<void>; export declare function isEnabled(options?: Options): Promise<boolean>; export declare function distance(loc1: Location, loc2: Location): number; export declare class LocationManager { static getLastLocation(maximumAge: any, resolve: any, reject: any): Promise<Location>; static requestLocationUpdates(locationRequest: any, locationCallback: any): void; static removeLocationUpdates(listener: any): void; static shouldSkipChecks(): boolean; static setMockLocationManager(MockLocationManager: any): void; } export declare class Location extends LocationBase { android: android.location.Location; constructor(androidLocation: android.location.Location); } export declare function setCustomLocationManager(MockLocationManager: any): void;