Files
NativeScript/apps/tests/location.md
Erjan Gavalji f15f283c74 Reorder test file structure to match the modules
Needed to have a nice structured cookbook dir in the docs

Includes:
Move the data-module tests under the data dir
Move the frame tests under the ui dir
Rename the dialog.md file to dialogs.md
Fix the web-view title
Add previous_url attributes to each article for SEO
Rename the style dir to styling to match the reference
Fix the frame-tests path
2016-05-05 10:43:35 +03:00

29 lines
946 B
Markdown

---
nav-title: "location How-To"
title: "location"
description: "Examples for using location"
previous_url: /ApiReference/location/HOW-TO
---
# 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'/>