Update Readme.md

This commit is contained in:
Vladimir Enchev
2016-05-19 09:57:43 +03:00
parent b43fa0d5e6
commit 8526e1fe5c

View File

@@ -1,23 +1 @@
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();
```
Allows you to use the geolocation of the device.