nativescript-geolocation
Advanced tools
Comparing version 4.3.0 to 4.3.1
@@ -14,2 +14,3 @@ "use strict"; | ||
var fusedLocationClient; | ||
var attachedForErrorHandling = false; | ||
function _ensureLocationClient() { | ||
@@ -44,2 +45,8 @@ fusedLocationClient = fusedLocationClient || | ||
} | ||
function errorHandler(errData) { | ||
while (watchIdCounter !== 0) { | ||
clearWatch(watchIdCounter); | ||
watchIdCounter--; | ||
} | ||
} | ||
function getCurrentLocation(options) { | ||
@@ -150,2 +157,6 @@ return new Promise(function (resolve, reject) { | ||
} | ||
if (!attachedForErrorHandling) { | ||
attachedForErrorHandling = true; | ||
application_1.on(application_1.uncaughtErrorEvent, errorHandler.bind(this)); | ||
} | ||
var locationRequest = _getLocationRequest(options); | ||
@@ -353,2 +364,1 @@ var watchId = _getNextWatchId(); | ||
exports.setCustomLocationManager = setCustomLocationManager; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VvbG9jYXRpb24uYW5kcm9pZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImdlb2xvY2F0aW9uLmFuZHJvaWQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSwyQ0FBZ0Y7QUFDaEYsa0NBQW9DO0FBQ3BDLCtCQUFpRDtBQUNqRCwyREFBaUg7QUFFakgsc0RBQXdEO0FBR3hELElBQUksdUJBQXVCLEdBQUcsSUFBSSxDQUFDO0FBQ25DLElBQUksd0JBQXdCLEdBQUcsSUFBSSxDQUFDO0FBQ3BDLElBQUkscUJBQXFCLEdBQUcsSUFBSSxDQUFDO0FBRWpDLElBQU0saUJBQWlCLEdBQUcsRUFBRSxDQUFDO0FBQzdCLElBQUksY0FBYyxHQUFHLENBQUMsQ0FBQztBQUN2QixJQUFJLG1CQUFtQixDQUFDO0FBRXhCO0lBRUksbUJBQW1CLEdBQUcsbUJBQW1CO1FBQ3JDLEdBQUcsQ0FBQyxNQUFNLENB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ge1xuICAgICAgICAgICAgcGVybWlzc2lvbnMucmVxdWVzdFBlcm1pc3Npb24oKDxhbnk+YW5kcm9pZCkuTWFuaWZlc3QucGVybWlzc2lvbi5BQ0NFU1NfRklORV9MT0NBVElPTikudGhlbihyZXNvbHZlLCByZWplY3QpO1xuICAgICAgICB9XG4gICAgfSk7XG59XG5cbmZ1bmN0aW9uIF9nZXRMb2NhdGlvbkxpc3RlbmVyKG1heEFnZSwgb25Mb2NhdGlvbiwgb25FcnJvcikge1xuICAgIHJldHVybiBfZ2V0VGFza1N1Y2Nlc3NMaXN0ZW5lcigobmF0aXZlTG9jYXRpb246IGFuZHJvaWQubG9jYXRpb24uTG9jYXRpb24pID0+IHtcbiAgICAgICAgaWYgKG5hdGl2ZUxvY2F0aW9uICE9IG51bGwpIHtcbiAgICAgICAgICAgIGxldCBsb2NhdGlvbiA9IG5ldyBMb2NhdGlvbihuYXRpdmVMb2NhdGlvbik7XG4gICAgICAgICAgICBpZiAodHlwZW9mIG1heEFnZSA9PT0gXCJudW1iZXJcIiAmJiBuYXRpdmVMb2NhdGlvbiAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgaWYgKGxvY2F0aW9uLnRpbWVzdGFtcC52YWx1ZU9mKCkgKyBtYXhBZ2UgPiBuZXcgRGF0ZSgpLnZhbHVlT2YoKSkge1xuICAgICAgICAgICAgICAgICAgICBvbkxvY2F0aW9uKGxvY2F0aW9uKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBvbkVycm9yKG5ldyBFcnJvcihcIkxhc3Qga25vd24gbG9jYXRpb24gdG9vIG9sZCFcIikpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgb25Mb2NhdGlvbihsb2NhdGlvbik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBvbkVycm9yKG5ldyBFcnJvcihcIlRoZ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aW9uVXBkYXRlcyhsaXN0ZW5lcik7XG4gICAgICAgIGRlbGV0ZSBsb2NhdGlvbkxpc3RlbmVyc1t3YXRjaElkXTtcbiAgICB9XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBlbmFibGVMb2NhdGlvblJlcXVlc3QoYWx3YXlzPzogYm9vbGVhbik6IFByb21pc2U8dm9pZD4ge1xuICAgIHJldHVybiBuZXcgUHJvbWlzZTx2b2lkPihmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7XG4gICAgICAgIF9yZXF1ZXN0TG9jYXRpb25QZXJtaXNzaW9ucygpLnRoZW4oKCkgPT4ge1xuICAgICAgICAgICAgX21ha2VHb29nbGVQbGF5U2VydmljZXNBdmFpbGFibGUoKS50aGVuKCgpID0+IHtcbiAgICAgICAgICAgICAgICBfaXNMb2NhdGlvblNlcnZpY2VFbmFibGVkKCkudGhlbigoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHJlc29sdmUoKTtcbiAgICAgICAgICAgICAgICB9LCAoZXgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBleC5nZXRTdGF0dXNDb2RlID09PSBcImZ1bmN0aW9uXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHN0YXR1c0NvZGUgPSBleC5nZXRTdGF0dXNDb2RlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdHVzQ29kZSA9PT0gY29tLmdvb2dsZS5hbmRyb2lkLmdtcy5sb2NhdGlvbi5Mb2NhdGlvblNldHRpbmdzU3RhdHVzQ29kZXMuUkVTT0xVVElPTl9SRVFVSVJFRCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNhY2hlIHJlc29sdmUgYW5kIHJlamVjdCBjYWxsYmFja3MgaW4gb3JkZXIgdG8gY2FsbCB0aGVtXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIG9uIFJFUVVFU1RfRU5BQkxFX0xPQ0FUSU9OIEFjdGl2aXR5IFJlc3VsdFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfb25FbmFibGVMb2NhdGlvblN1Y2Nlc3MgPSByZXNvbHZlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfb25FbmFibGVMb2NhdGlvbkZhaWwgPSByZWplY3Q7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBleC5zdGFydFJlc29sdXRpb25Gb3JSZXN1bHQoYW5kcm9pZEFwcEluc3RhbmNlLmZvcmVncm91bmRBY3Rpdml0eSwgUkVRVUVTVF9FTkFCTEVfTE9DQVRJT04pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKHNlbmRFeCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBJZ25vcmUgdGhlIGVycm9yLlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzb2x2ZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc3RhdHVzQ29kZSA9PT0gY29tLmdvb2dsZS5hbmRyb2lkLmdtcy5sb2NhdGlvbi5Mb2NhdGlvblNldHRpbmdzU3RhdHVzQ29kZXMuU0VUVElOR1NfQ0hBTkdFX1VOQVZBSUxBQkxFXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgaXNBaXJwbGFuZU1vZGVPbigpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgaXNQcm92aWRlckVuYWJsZWQoYW5kcm9pZC5sb2NhdGlvbi5Mb2NhdGlvbk1hbmFnZXIuR1BTX1BST1ZJREVSKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXNvbHZlKCk7XG4gICAgICAgICAgICAgICAgICAgICA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wdWJsaWMgbG9uZ2l0dWRlOiBudW1iZXI7XG4gIHB1YmxpYyBhbHRpdHVkZTogbnVtYmVyO1xuICBwdWJsaWMgaG9yaXpvbnRhbEFjY3VyYWN5OiBudW1iZXI7XG4gIHB1YmxpYyB2ZXJ0aWNhbEFjY3VyYWN5OiBudW1iZXI7XG4gIHB1YmxpYyBzcGVlZDogbnVtYmVyOyAvLyBpbiBtL3MgP1xuICBwdWJsaWMgZGlyZWN0aW9uOiBudW1iZXI7IC8vIGluIGRlZ3JlZXNcbiAgcHVibGljIHRpbWVzdGFtcDogRGF0ZTtcbn1cblxuZXhwb3J0IGNvbnN0IGRlZmF1bHRHZXRMb2NhdGlvblRpbWVvdXQgPSA1ICogNjAgKiAxMDAwOyAvLyA1IG1pbnV0ZXNcbmV4cG9ydCBjb25zdCBtaW5SYW5nZVVwZGF0ZSA9IDAuMTsgLy8gMCBtZXRlcnNcbmV4cG9ydCBjb25zdCBtaW5UaW1lVXBkYXRlID0gMSAqIDYwICogMTAwMDsgLy8gMSBtaW51dGVcbmV4cG9ydCBjb25zdCBmYXN0ZXN0VGltZVVwZGF0ZSA9IDUgKiAxMDAwOyAvLyA1IHNlY3NcbiJdfQ== |
@@ -5,2 +5,3 @@ "use strict"; | ||
var timer_1 = require("timer"); | ||
var application_1 = require("application"); | ||
var geolocation_common_1 = require("./geolocation.common"); | ||
@@ -11,2 +12,3 @@ var Platform = require("platform"); | ||
var watchId = 0; | ||
var attachedForErrorHandling = false; | ||
var LocationListenerImpl = (function (_super) { | ||
@@ -50,7 +52,7 @@ __extends(LocationListenerImpl, _super); | ||
switch (status) { | ||
case CLAuthorizationStatus.kCLAuthorizationStatusNotDetermined: | ||
case 0: | ||
break; | ||
case CLAuthorizationStatus.kCLAuthorizationStatusRestricted: | ||
case 1: | ||
break; | ||
case CLAuthorizationStatus.kCLAuthorizationStatusDenied: | ||
case 2: | ||
if (this._reject) { | ||
@@ -61,3 +63,3 @@ LocationMonitor.stopLocationMonitoring(this.id); | ||
break; | ||
case CLAuthorizationStatus.kCLAuthorizationStatusAuthorizedAlways: | ||
case 3: | ||
if (this.authorizeAlways && this._resolve) { | ||
@@ -72,3 +74,3 @@ LocationMonitor.stopLocationMonitoring(this.id); | ||
break; | ||
case CLAuthorizationStatus.kCLAuthorizationStatusAuthorizedWhenInUse: | ||
case 4: | ||
if (!this.authorizeAlways && this._resolve) { | ||
@@ -115,2 +117,8 @@ LocationMonitor.stopLocationMonitoring(this.id); | ||
} | ||
function errorHandler(errData) { | ||
while (watchId !== 0) { | ||
clearWatch(watchId); | ||
watchId--; | ||
} | ||
} | ||
function getCurrentLocation(options) { | ||
@@ -175,2 +183,6 @@ return new Promise(function (resolve, reject) { | ||
function watchLocation(successCallback, errorCallback, options) { | ||
if (!attachedForErrorHandling) { | ||
attachedForErrorHandling = true; | ||
application_1.on(application_1.uncaughtErrorEvent, errorHandler.bind(this)); | ||
} | ||
var zonedSuccessCallback = global.zonedCallback(successCallback); | ||
@@ -220,6 +232,6 @@ var zonedErrorCallback = global.zonedCallback(errorCallback); | ||
if (CLLocationManager.locationServicesEnabled()) { | ||
var AUTORIZED_WHEN_IN_USE = CLAuthorizationStatus.kCLAuthorizationStatusAuthorizedWhenInUse; | ||
var AUTORIZED_WHEN_IN_USE = 4; | ||
return (CLLocationManager.authorizationStatus() === AUTORIZED_WHEN_IN_USE | ||
|| CLLocationManager.authorizationStatus() === CLAuthorizationStatus.kCLAuthorizationStatusAuthorizedAlways | ||
|| CLLocationManager.authorizationStatus() === CLAuthorizationStatus.kCLAuthorizationStatusAuthorized); | ||
|| CLLocationManager.authorizationStatus() === 3 | ||
|| CLLocationManager.authorizationStatus() === 3); | ||
} | ||
@@ -326,2 +338,1 @@ return false; | ||
exports.Location = Location; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VvbG9jYXRpb24uaW9zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZ2VvbG9jY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XG4gICAgICAgICAgICB0aGlzLl9vbkVycm9yKG5ldyBFcnJvcihlcnJvci5sb2NhbGl6ZWREZXNjcmlwdGlvbikpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgcHVibGljIGxvY2F0aW9uTWFuYWdlckRpZENoYW5nZUF1dGhvcml6YXRpb25TdGF0dXMobWFuYWdlcjogQ0xMb2NhdGlvbk1hbmFnZXIsIHN0YXR1czogQ0xBdXRob3JpemF0aW9uU3RhdHVzKSB7XG4gICAgICAgIHN3aXRjaCAoc3RhdHVzKSB7XG4gICAgICAgICAgICBjYXNlIENMQXV0aG9yaXphdGlvblN0YXR1cy5rQ0xBdXRob3JpemF0aW9uU3RhdHVzTm90RGV0ZXJtaW5lZDpcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSBDTEF1dGhvcml6YXRpb25TdGF0dXMua0NMQXV0aG9yaXphdGlvblN0YXR1c1Jlc3RyaWN0ZWQ6XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgQ0xBdXRob3JpemF0aW9uU3RhdHVzLmtDTEF1dGhvcml6YXRpb25TdGF0dXNEZW5pZWQ6XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuX3JlamVjdCkge1xuICAgICAgICAgICAgICAgICAgICBMb2NhdGlvbk1vbml0b3Iuc3RvcExvY2F0aW9uTW9uaXRvcmluZyh0aGlzLmlkKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fcmVqZWN0KG5ldyBFcnJvcihcIkF1dGhvcml6YXRpb24gRGVuaWVkLlwiKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlIENMQXV0aG9yaXphdGlvblN0YXR1cy5rQ0xBdXRob3JpemF0aW9uU3RhdHVzQXV0aG9yaXplZEFsd2F5czpcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5hdXRob3JpemVBbHdheXMgJiYgdGhpcy5fcmVzb2x2ZSkge1xuICAgICAgICAgICAgICAgICAgICBMb2NhdGlvbk1vbml0b3Iuc3RvcExvY2F0aW9uTW9uaXRvcmluZyh0aGlzLmlkKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fcmVzb2x2ZSgpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodGhpcy5fcmVqZWN0KSB7XG4gICAgICAgICAgICAgICAgICAgIExvY2F0aW9uTW9uaXRvci5zdG9wTG9jYXRpb25Nb25pdG9yaW5nKHRoaXMuaWQpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9yZWplY3QobmV3IEVycm9yKFwiQXV0aG9yaXphdGlvbiBEZW5pZWQuXCIpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgQ0xBdXRob3JpemF0aW9uU3RhdHVzLmtDTEF1dGhvcml6YXRpb25TdGF0dXNBdXRob3JpemVkV2hlbkluVXNlOlxuICAgICAgICAgICAgICAgIGlmICghdGhpcy5hdXRob3JpemVBbHdheXMgJiYgdGhpcy5fcmVzb2x2ZSkge1xuICAgICAgICAgICAgICAgICAgICBMb2NhdGlvbk1vbml0b3Iuc3RvcExvY2F0aW9uTW9uaXRvcmluZyh0aGlzLmlkKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fcmVzb2x2ZSgpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodGhpcy5fcmVqZWN0KSB7XG4gICAgICAgICAgICAgICAgICAgIExvY2F0aW9uTW9uaXRvci5zdG9wTG9jYXRpb25Nb25pdG9yaW5nKHRoaXMuaWQpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9yZWplY3QobmV3IEVycm9yKFwiQXV0aG9yaXphdGlvbiBEZW5pZWQuXCIpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgI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IGRlc2lyZWRBY2N1cmFjeSwgdXBkYXRlRGlzdGFuY2UsIG1pbmltdW1VcGRhdGVUaW1lLCBtYXhpbXVtQWdlLCB0aW1lb3V0XG5leHBvcnQgZnVuY3Rpb24gZ2V0Q3VycmVudExvY2F0aW9uKG9wdGlvbnM6IE9wdGlvbnMpOiBQcm9taXNlPExvY2F0aW9uPiB7XG4gICAgcmV0dXJuIG5ldyBQcm9taXNlKGZ1bmN0aW9uIChyZXNvbHZlLCByZWplY3QpIHtcbiAgICAgICAgZW5hYmxlTG9jYXRpb25SZXF1ZXN0KCkudGhlbigoKSA9PiB7XG4gICAgICAgICAgICBvcHRpb25zID0gb3B0aW9ucyB8fCB7fTtcbiAgICAgICAgICAgIGlmIChvcHRpb25zLnRpbWVvdXQgPT09IDApIHtcbiAgICAgICAgICAgICAgICAvLyB3ZSBzaG91bGQgdGFrZSBhbnkgY2FjaGVkIGxvY2F0aW9uIGUuZy4gbGFzdEtub3duTG9jYXRpb25cbiAgICAgICAgICAgICAgICBsZXQgbGFzdExvY2F0aW9uID0gTG9jYXRpb25Nb25pdG9yLmdldExhc3RLbm93bkxvY2F0aW9uKCk7XG4gICAgICAgICAgICAgICAgaWYgKGxhc3RMb2NhdGlvbikge1xuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMubWF4aW11bUFnZSA9PT0gXCJudW1iZXJcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGxhc3RMb2NhdGlvbi50aW1lc3RhbXAudmFsdWVPZigpICsgb3B0aW9ucy5tYXhpbXVtQWdlID4gbmV3IERhdGUoKS52YWx1ZU9mKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKGxhc3RMb2NhdGlvbik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdChuZXcgRXJyb3IoXCJMYXN0IGtub3duIGxvY2F0aW9uIHRvbyBvbGQhXCIpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUobGFzdExvY2F0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHJlamVjdChuZXcgRXJyb3IoXCJUaGVyZSBpcyBubyBsYXN0IGtub3duIGxvY2F0aW9uIVwiKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBsZXQgdGltZXJJZDtcbiAgICAgICAgICAgICAgICBsZXQgbG9jTGlzdGVuZXI7XG5cbiAgICAgICAgICAgICAgICBsZXQgc3RvcFRpbWVyQW5kTW9uaXRvciA9IGZ1bmN0aW9uIChsb2NMaXN0ZW5lcklkKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aW1lcklkICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aW1lcklkKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIExvY2F0aW9uTW9uaXRvci5zdG9wTG9jYXRpb25Nb25pdG9yaW5nKGxvY0xpc3RlbmVySWQpO1xuICAgICAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgICAgICBsZXQgc3VjY2Vzc0NhbGxiYWNrID0gZnVuY3Rpb24gKGxvY2F0aW9uOiBMb2NhdGlvbikge1xuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMubWF4aW11bUFnZSA9PT0gXCJudW1iZXJcIiAmJiBsb2NhdGlvbi50aW1lc3RhbXAudmFsdWVPZigpICsgb3B0aW9ucy5tYXhpbXVtQWdlIDwgbmV3IERhdGUoKS52YWx1ZU9mKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHJldHVybmVkIGxvY2F0aW9uIGlzIHRvbyBvbGQsIGJ1dCB3ZSBzdGlsbCBoYXZlIHNvbWUgdGltZSBiZWZvcmUgdGhlIHRpbWVvdXQgc28gbWF5YmUgd2FpdCBhIGJpdD9cbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHN0b3BUaW1lckFuZE1vbml0b3IobG9jTGlzdGVuZXIuaWQpO1xuICAgICAgICAgICAgICAgICAgICByZXNvbHZlKGxvY2F0aW9uKTtcbiAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgbG9jTGlzdGVuZXIgPSBMb2NhdGlvbkxpc3RlbmVySW1wbC5pbml0V2l0aExvY2F0aW9uRXJyb3Ioc3VjY2Vzc0NhbGxiYWNrKTtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICBMb2NhdGlvbk1vbml0b3Iuc3RhcnRMb2NhdGlvbk1vbml0b3Jpbmcob3B0aW9ucywgbG9jTGlzdGVuZXIpO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgc3RvcFRpbWVyQW5kTW9uaXRvcihsb2NMaXN0ZW5lci5pZCk7XG4gICAgICAgICAgICAgICAgICAgIHJlamVjdChlKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMudGltZW91dCA9PT0gXCJudW1iZXJcIikge1xuICAgICAgICAgICAgICAgICAgICB0aW1lcklkID0gc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBMb2NhdGlvbk1vbml0b3Iuc3RvcExvY2F0aW9uTW9uaXRvcmluZyhsb2NMaXN0ZW5lci5pZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZWplY3QobmV3IEV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ICAgICAgbGV0IG1hbmFnZXIgPSBuZXcgaW9zTG9jYXRpb25NYW5hZ2VyKCk7XG5cbiAgICAgICAgbWFuYWdlci5kZWxlZ2F0ZSA9IGxvY0xpc3RlbmVyO1xuICAgICAgICBtYW5hZ2VyLmRlc2lyZWRBY2N1cmFjeSA9IG9wdGlvbnMgPyBvcHRpb25zLmRlc2lyZWRBY2N1cmFjeSA6IEFjY3VyYWN5LmhpZ2g7XG4gICAgICAgIG1hbmFnZXIuZGlzdGFuY2VGaWx0ZXIgPSBvcHRpb25zID8gb3B0aW9ucy51cGRhdGVEaXN0YW5jZSA6IG1pblJhbmdlVXBkYXRlO1xuXG4gICAgICAgIGxvY2F0aW9uTWFuYWdlcnNbbG9jTGlzdGVuZXIuaWRdID0gbWFuYWdlcjtcbiAgICAgICAgbG9jYXRpb25MaXN0ZW5lcnNbbG9jTGlzdGVuZXIuaWRdID0gbG9jTGlzdGVuZXI7XG5cbiAgICAgICAgcmV0dXJuIG1hbmFnZXI7XG4gICAgfVxufVxuXG4vLyB1c2VkIGZvciB0ZXN0cyBvbmx5XG5leHBvcnQgZnVuY3Rpb24gc2V0Q3VzdG9tTG9jYXRpb25NYW5hZ2VyKG1hbmFnZXIpIHtcbiAgICBpb3NMb2NhdGlvbk1hbmFnZXIgPSBmdW5jdGlvbiAoKSB7IHJldHVybiBtYW5hZ2VyOyB9O1xufVxuXG5leHBvcnQgY2xhc3MgTG9jYXRpb24gZXh0ZW5kcyBMb2NhdGlvbkJhc2Uge1xuICAgIHB1YmxpYyBpb3M6IENMTG9jYXRpb247ICAgICAgLy8gaU9TIG5hdGl2ZSBsb2NhdGlvblxufSJdfQ== |
{ | ||
"name": "nativescript-geolocation", | ||
"version": "4.3.0", | ||
"version": "4.3.1", | ||
"description": "Provides API for getting and monitoring location for NativeScript app.", | ||
@@ -5,0 +5,0 @@ "main": "geolocation", |
@@ -121,5 +121,5 @@ # NativeScript Geolocation ![apple](https://cdn3.iconfinder.com/data/icons/picons-social/57/16-apple-32.png) ![android](https://cdn4.iconfinder.com/data/icons/logos-3/228/android-32.png) | ||
## Get Help | ||
Please, use [github issues](https://github.com/NativeScript/nativescript-geolocation/issues) strictly for [reporting bugs](CONTRIBUTING.md#reporting-bugs) or [requesting features](CONTRIBUTING.md#requesting-new-features). For general questions and support, check out the [NativeScript community forum](https://discourse.nativescript.org/) or ask our experts in [NativeScript community Slack channel](http://developer.telerik.com/wp-login.php?action=slack-invitation). | ||
Please, use [github issues](https://github.com/NativeScript/nativescript-geolocation/issues) strictly for [reporting bugs](CONTRIBUTING.md#reporting-bugs) or [requesting features](CONTRIBUTING.md#requesting-new-features). For general questions and support, check out [Stack Overflow](https://stackoverflow.com/questions/tagged/nativescript) or ask our experts in [NativeScript community Slack channel](http://developer.telerik.com/wp-login.php?action=slack-invitation). | ||
![](https://ga-beacon.appspot.com/UA-111455-24/nativescript/nativescript-geolocation?pixel) | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
820
62719