mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00

- Use relative imports in place of most of our absolute ones. - Add "private" ambient modules for modules that we need to import using an absolute path (e.g. when app/.../test-something.ts needs to import ui/styling/style-scope)
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();