mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
how-tos made with markdown snippet injector
This commit is contained in:
27
apps/tests/location.md
Normal file
27
apps/tests/location.md
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
nav-title: "location How-To"
|
||||
title: "How-To"
|
||||
description: "Examples for using location"
|
||||
---
|
||||
# Location
|
||||
Using the location requires the Location module.
|
||||
<snippet id='location-require'/>
|
||||
|
||||
## Other functions
|
||||
### Test are location services available for this device
|
||||
<snippet id='location-funcs'/>
|
||||
|
||||
### Get distance between two locations
|
||||
<snippet id='location-distance'/>
|
||||
|
||||
## Getting location
|
||||
### Receive continuous location updates
|
||||
<snippet id='location-updates'/>
|
||||
|
||||
### Get last known location
|
||||
<snippet id='location-last-known'/>
|
||||
|
||||
### Get location once
|
||||
if there is `options.timeout` you will receive error on timeout. If `options.timeout` is 0 then the result is the same as the result from `LocationManager.lastKnownLocation`
|
||||
and there will be no wait. You can use `options.maximumAge` to specify you don't want to receive locations older than specified time in ms.
|
||||
<snippet id='location-timeour'/>
|
||||
Reference in New Issue
Block a user