@nativescript/geolocation
Version:
Provides API for getting and monitoring location for NativeScript app.
23 lines (22 loc) • 1.47 kB
TypeScript
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): number;
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 getIOSLocationManagerStatus(): CLAuthorizationStatus;
export declare function distance(loc1: Location, loc2: Location): number;
export declare class LocationMonitor {
static getLastKnownLocation(): Location;
static requestLocation(options: Options, locListener: any): void;
static startLocationMonitoring(options: Options, locListener: any): void;
static stopLocationMonitoring(iosLocManagerId: number): void;
static createiOSLocationManager(locListener: any, options?: Options): CLLocationManager;
}
export declare function setCustomLocationManager(manager: any): void;
export declare class Location extends LocationBase {
ios: CLLocation;
}