Files
NativeScript/Location/Readme.md
2014-04-17 15:46:38 +03:00

23 lines
499 B
Markdown

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();
```