FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

NativeScript/location at master · iHaD/NativeScript · GitHub

Latest commit

 

History

History
 
 

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

Back | FazBrowse Home | New Git URL