Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nativescript-geolocation

Package Overview
Dependencies
Maintainers
2
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nativescript-geolocation - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

index.d.ts

17

nativescript-geolocation-common.js

@@ -1,3 +0,3 @@

var defModule = require("nativescript-geolocation");
var timer = require("timer");
var location = null;
var Location = (function () {

@@ -12,5 +12,8 @@ function Location() {

options = options || {};
if (!location) {
location = require("nativescript-geolocation");
}
if (options && options.timeout === 0) {
return new Promise(function (resolve, reject) {
var lastLocation = defModule.LocationMonitor.getLastKnownLocation();
var lastLocation = location.LocationMonitor.getLastKnownLocation();
if (lastLocation) {

@@ -39,5 +42,5 @@ if (options && typeof options.maximumAge === "number") {

}
defModule.LocationMonitor.stopLocationMonitoring(locListenerId);
location.LocationMonitor.stopLocationMonitoring(locListenerId);
};
if (!defModule.isEnabled()) {
if (!location.isEnabled()) {
reject(new Error("Location service is disabled"));

@@ -61,5 +64,5 @@ }

};
var locListener = defModule.LocationMonitor.createListenerWithCallbackAndOptions(successCallback, options);
var locListener = location.LocationMonitor.createListenerWithCallbackAndOptions(successCallback, options);
try {
defModule.LocationMonitor.startLocationMonitoring(options, locListener);
location.LocationMonitor.startLocationMonitoring(options, locListener);
}

@@ -72,3 +75,3 @@ catch (e) {

var timerId = timer.setTimeout(function () {
defModule.LocationMonitor.stopLocationMonitoring(locListener.id);
location.LocationMonitor.stopLocationMonitoring(locListener.id);
reject(new Error("Timeout while searching for location!"));

@@ -75,0 +78,0 @@ }, options.timeout || defaultGetLocationTimeout);

var appModule = require("application");
var enums = require("ui/enums");
var trace = require("trace");
var defModule = require("nativescript-geolocation");
var common = require("./nativescript-geolocation-common");

@@ -38,3 +37,3 @@ global.moduleMerge(common, exports);

function locationFromAndroidLocation(androidLocation) {
var location = new defModule.Location();
var location = new common.Location();
location.latitude = androidLocation.getLatitude();

@@ -41,0 +40,0 @@ location.longitude = androidLocation.getLongitude();

var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var enums = require("ui/enums");
var platformModule = require("platform");
var defModule = require("nativescript-geolocation");
var common = require("./nativescript-geolocation-common");

@@ -54,3 +52,3 @@ global.moduleMerge(common, exports);

function locationFromCLLocation(clLocation) {
var location = new defModule.Location();
var location = new common.Location();
location.latitude = clLocation.coordinate.latitude;

@@ -57,0 +55,0 @@ location.longitude = clLocation.coordinate.longitude;

{
"name": "nativescript-geolocation",
"version": "0.0.7",
"version": "0.0.8",
"description": "Provides API for getting and monitoring location for NativeScript app.",

@@ -5,0 +5,0 @@ "main": "nativescript-geolocation.js",

@@ -0,0 +0,0 @@ Welcome to the `nativescript-geolocation` plugin for NativeScript framework

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc