mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
948 B
948 B
nav-title | title | environment | description | previous_url |
---|---|---|---|---|
location How-To | location | nativescript | Examples for using location | /ApiReference/location/HOW-TO |
Location
Using the location requires the Location module. {%snippet location-require%}
Other functions
Test are location services available for this device
{%snippet location-funcs%}
Get distance between two locations
{%snippet location-distance%}
Getting location
Receive continuous location updates
{%snippet location-updates%}
Get last known location
{%snippet 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 location-timeour%}