imports improved

This commit is contained in:
Vladimir Enchev
2015-12-14 17:08:24 +02:00
parent cbf69e60e8
commit 074ac89871
90 changed files with 529 additions and 266 deletions

View File

@@ -1,6 +1,6 @@
import timer = require("timer");
//import locationManagerModule = require("location/location-manager");
//import locationManagerModule = require("location/location-manager");
import defModule = require("location");
import * as timerModule from "timer";
var defaultGetLocationTimeout = 20000;
@@ -54,6 +54,9 @@ export var getLocation = function (options?: defModule.Options): Promise<defModu
if (!defModule.LocationManager.isEnabled()) {
return reject(new Error("Location service is disabled"));
}
var timer: typeof timerModule = require("timer");
locationManager.startLocationMonitoring(function (location: defModule.Location) {
if (options && ("number" === typeof options.maximumAge)) {
if (location.timestamp.valueOf() + options.maximumAge > new Date().valueOf()) {