Nativescript Doc
Preparing search index...
The search index is not available
Track GPS location updates
Track GPS location updates
GPS
Class GPS
Hierarchy (
View Summary
)
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
iosChangeLocListener
:
LocationChangeListenerImpl
ios
Change
Loc
Manager
iosChangeLocManager
:
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
clearWatch
(
watchId
:
number
)
:
void
Parameters
watchId
:
number
Returns
void
distance
distance
<
T
=
DefaultLatLonKeys
>
(
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
getCurrentLocation
<
T
=
DefaultLatLonKeys
>
(
options
:
Options
,
)
:
Promise
<
GenericGeoLocation
<
T
>
>
Type Parameters
T
=
DefaultLatLonKeys
Parameters
options
:
Options
Returns
Promise
<
GenericGeoLocation
<
T
>
>
get
Last
Known
Location
getLastKnownLocation
<
T
=
DefaultLatLonKeys
>
()
:
GenericGeoLocation
<
T
>
Type Parameters
T
=
DefaultLatLonKeys
Returns
GenericGeoLocation
<
T
>
hasGPS
hasGPS
()
:
boolean
Returns
boolean
is
Authorized
isAuthorized
(
always
?:
boolean
)
:
Promise
<
boolean
>
Parameters
Optional
always
:
boolean
Returns
Promise
<
boolean
>
is
Enabled
isEnabled
()
:
boolean
Returns
boolean
on
Listener
Added
onListenerAdded
(
eventName
:
string
,
count
:
number
)
:
void
Parameters
eventName
:
string
count
:
number
Returns
void
on
Listener
Removed
onListenerRemoved
(
eventName
:
string
,
count
:
number
)
:
void
Parameters
eventName
:
string
count
:
number
Returns
void
openGPSSettings
openGPSSettings
()
:
Promise
<
boolean
>
Returns
Promise
<
boolean
>
prepare
For
Request
prepareForRequest
(
options
:
Options
)
:
Promise
<
boolean
>
Parameters
options
:
Options
Returns
Promise
<
boolean
>
watch
Location
watchLocation
<
T
=
DefaultLatLonKeys
>
(
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
Inherited
Theme
OS
Light
Dark
On This Page
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
Nativescript Doc
Track GPS location updates
Loading...