mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
renamed folders with lower cases and renamed user preferences to local settings
This commit is contained in:
23
location/Readme.md
Normal file
23
location/Readme.md
Normal file
@@ -0,0 +1,23 @@
|
||||
Initializing location:
|
||||
|
||||
```
|
||||
var LocationManager = require("Location").LocationManager;
|
||||
|
||||
console.log('is location enabled: ' + LocationManager.isLocationEnabled());
|
||||
|
||||
this.locationManager = new LocationManager();
|
||||
|
||||
console.dump(this.locationManager.getLastKnownLocation());
|
||||
|
||||
this.locationManager.startLocationMonitoring(function(location) {
|
||||
console.dump(location);
|
||||
}, function(error) {
|
||||
console.error(error);
|
||||
});
|
||||
```
|
||||
|
||||
Stopping location:
|
||||
|
||||
```
|
||||
this.locationManager.stopLocationMonitoring();
|
||||
```
|
||||
Reference in New Issue
Block a user