Files
Stanimir Karoserov 000530e4e8 updated location
2014-05-16 16:46:21 +03:00
..
2014-05-16 16:46:21 +03:00
2014-05-16 16:46:21 +03:00
2014-05-16 16:46:21 +03:00
2014-05-16 13:48:00 +03:00
2014-05-16 16:46:21 +03:00
2014-05-14 12:55:59 +03:00

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