mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 05:18:39 +08:00
namespaces removed (except Application)
This commit is contained in:
90
Location/location.d.ts
vendored
90
Location/location.d.ts
vendored
@ -1,66 +1,62 @@
|
||||
export declare module tk {
|
||||
export module location {
|
||||
export enum DesiredAccuracy {
|
||||
// in meters
|
||||
ANY,
|
||||
HIGH,
|
||||
}
|
||||
export declare enum DesiredAccuracy {
|
||||
// in meters
|
||||
ANY,
|
||||
HIGH,
|
||||
}
|
||||
|
||||
export class LocationPoint {
|
||||
public latitude: number;
|
||||
public longitude: number;
|
||||
export declare class LocationPoint {
|
||||
public latitude: number;
|
||||
public longitude: number;
|
||||
|
||||
public altitude: number;
|
||||
public altitude: number;
|
||||
|
||||
public horizontalAccuracy: number;
|
||||
public verticalAccuracy: number;
|
||||
public horizontalAccuracy: number;
|
||||
public verticalAccuracy: number;
|
||||
|
||||
public speed: number; // in m/s ?
|
||||
public speed: number; // in m/s ?
|
||||
|
||||
public direction: number; // in degrees
|
||||
public direction: number; // in degrees
|
||||
|
||||
public timestamp: any;
|
||||
}
|
||||
public timestamp: any;
|
||||
}
|
||||
|
||||
export class LocationRegion {
|
||||
public latitude: number;
|
||||
public longitude: number;
|
||||
export declare class LocationRegion {
|
||||
public latitude: number;
|
||||
public longitude: number;
|
||||
|
||||
public raduis: number; // radius in meters
|
||||
}
|
||||
public raduis: number; // radius in meters
|
||||
}
|
||||
|
||||
export class LocationChangeListener {
|
||||
//onLocationChange(location: Location);
|
||||
}
|
||||
export declare class LocationChangeListener {
|
||||
//onLocationChange(location: Location);
|
||||
}
|
||||
|
||||
export class RegionChangeListener {
|
||||
onRegionEnter(region: LocationRegion);
|
||||
onRegionExit(region: LocationRegion);
|
||||
}
|
||||
export declare class RegionChangeListener {
|
||||
onRegionEnter(region: LocationRegion);
|
||||
onRegionExit(region: LocationRegion);
|
||||
}
|
||||
|
||||
export class LocationManager {
|
||||
isLocationEnabled(): boolean;
|
||||
desiredAccuracy: number;
|
||||
export declare class LocationManager {
|
||||
isLocationEnabled(): boolean;
|
||||
desiredAccuracy: number;
|
||||
|
||||
// listeners
|
||||
locationChangeListener: LocationChangeListener;
|
||||
/* regionChangeListener: RegionChangeListener;
|
||||
// listeners
|
||||
locationChangeListener: LocationChangeListener;
|
||||
/* regionChangeListener: RegionChangeListener;
|
||||
|
||||
// regions
|
||||
addRegion(region: LocationRegion);
|
||||
// regions
|
||||
addRegion(region: LocationRegion);
|
||||
|
||||
removeRegion(region: LocationRegion);
|
||||
removeRegion(region: LocationRegion);
|
||||
|
||||
clearRegions();*/
|
||||
clearRegions();*/
|
||||
|
||||
// monitoring
|
||||
// monitoring
|
||||
|
||||
startLocationMonitoring();
|
||||
stopLocationMonitoring();
|
||||
startLocationMonitoring();
|
||||
stopLocationMonitoring();
|
||||
|
||||
// other
|
||||
getLastKnownLocation(): LocationPoint;
|
||||
distanceInMeters(loc1: LocationPoint, loc2: LocationPoint): number;
|
||||
}
|
||||
}
|
||||
// other
|
||||
getLastKnownLocation(): LocationPoint;
|
||||
distanceInMeters(loc1: LocationPoint, loc2: LocationPoint): number;
|
||||
}
|
Reference in New Issue
Block a user