Nativescript Doc
Preparing search index...
The search index is not available
Track GPS location updates
Track GPS location updates
GPS
Class GPS
Hierarchy
GPSCommon
GPS
Index
Constructors
constructor
Properties
enabled
ios
Change
Loc
Listener
ios
Change
Loc
Manager
gps_
status_
event
Methods
authorize
clear
Watch
distance
enable
get
Current
Location
get
Last
Known
Location
hasGPS
is
Authorized
is
Enabled
on
Listener
Added
on
Listener
Removed
openGPSSettings
prepare
For
Request
watch
Location
Constructors
constructor
new GPS
(
)
:
GPS
Returns
GPS
Properties
enabled
enabled
:
boolean
ios
Change
Loc
Listener
ios
Change
Loc
Listener
:
LocationChangeListenerImpl
ios
Change
Loc
Manager
ios
Change
Loc
Manager
:
CLLocationManager
Static
gps_
status_
event
gps_
status_
event
:
string
Methods
authorize
authorize
(
always
?:
boolean
)
:
Promise
<
boolean
>
Parameters
Optional
always:
boolean
Returns
Promise
<
boolean
>
clear
Watch
clear
Watch
(
watchId
:
number
)
:
void
Parameters
watchId:
number
Returns
void
distance
distance
<
T
>
(
loc1
:
GenericGeoLocation
<
T
>
, loc2
:
GenericGeoLocation
<
T
>
)
:
number
Type Parameters
T =
DefaultLatLonKeys
Parameters
loc1:
GenericGeoLocation
<
T
>
loc2:
GenericGeoLocation
<
T
>
Returns
number
enable
enable
(
)
:
Promise
<
boolean
>
Returns
Promise
<
boolean
>
get
Current
Location
get
Current
Location
<
T
>
(
options
:
Options
)
:
Promise
<
GenericGeoLocation
<
T
>
>
Type Parameters
T =
DefaultLatLonKeys
Parameters
options:
Options
Returns
Promise
<
GenericGeoLocation
<
T
>
>
get
Last
Known
Location
get
Last
Known
Location
<
T
>
(
)
:
GenericGeoLocation
<
T
>
Type Parameters
T =
DefaultLatLonKeys
Returns
GenericGeoLocation
<
T
>
hasGPS
hasGPS
(
)
:
boolean
Returns
boolean
is
Authorized
is
Authorized
(
always
?:
boolean
)
:
Promise
<
boolean
>
Parameters
Optional
always:
boolean
Returns
Promise
<
boolean
>
is
Enabled
is
Enabled
(
)
:
boolean
Returns
boolean
on
Listener
Added
on
Listener
Added
(
eventName
:
string
, count
:
number
)
:
void
Parameters
eventName:
string
count:
number
Returns
void
on
Listener
Removed
on
Listener
Removed
(
eventName
:
string
, count
:
number
)
:
void
Parameters
eventName:
string
count:
number
Returns
void
openGPSSettings
openGPSSettings
(
)
:
Promise
<
boolean
>
Returns
Promise
<
boolean
>
prepare
For
Request
prepare
For
Request
(
options
:
Options
)
:
Promise
<
boolean
>
Parameters
options:
Options
Returns
Promise
<
boolean
>
watch
Location
watch
Location
<
T
>
(
successCallback
:
successCallbackType
<
T
>
, errorCallback
:
errorCallbackType
, options
:
Options
)
:
Promise
<
number
>
Type Parameters
T =
DefaultLatLonKeys
Parameters
successCallback:
successCallbackType
<
T
>
errorCallback:
errorCallbackType
options:
Options
Returns
Promise
<
number
>
Settings
Member Visibility
Protected
Private
Inherited
Theme
OS
Light
Dark
Modules
Track GPS location updates
GPS
constructor
enabled
ios
Change
Loc
Listener
ios
Change
Loc
Manager
gps_
status_
event
authorize
clear
Watch
distance
enable
get
Current
Location
get
Last
Known
Location
hasGPS
is
Authorized
is
Enabled
on
Listener
Added
on
Listener
Removed
openGPSSettings
prepare
For
Request
watch
Location
Generated using
TypeDoc