Files
NativeScript/Location
2014-04-16 18:46:07 +03:00
..
2014-03-27 11:04:24 +02:00
2014-04-14 19:03:48 +03:00
2014-04-16 18:46:07 +03:00

Initializing location:

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