cordova-plugin-geolocation
Advanced tools
Comparing version 0.3.5 to 0.3.6
@@ -52,2 +52,12 @@ <!--- | ||
### Firefox OS Quirks | ||
Create __www/manifest.webapp__ as described in | ||
[Manifest Docs](https://developer.mozilla.org/en-US/Apps/Developing/Manifest). | ||
Add permisions: | ||
"permissions": { | ||
"geolocation": { "description": "Used to position the map to your current position" } | ||
} | ||
## Supported Platforms | ||
@@ -58,2 +68,3 @@ | ||
- BlackBerry 10 | ||
- Firefox OS | ||
- iOS | ||
@@ -60,0 +71,0 @@ - Tizen |
{ | ||
"name": "cordova-plugin-geolocation", | ||
"version": "0.3.5", | ||
"version": "0.3.6", | ||
"description": "Cordova Geolocation Plugin", | ||
@@ -5,0 +5,0 @@ "cordova": { |
@@ -50,1 +50,6 @@ <!-- | ||
* Removing incorrectly added closing comments for wp7 platform in plugin.xml | ||
### 0.3.6 (Feb 05, 2014) | ||
* add ubuntu platform support | ||
* CB-5326 adding FFOS permission and updating supported platforms | ||
* CB-5729 [BlackBerry10] Update GeolocationProxy to return collapsed object |
@@ -22,10 +22,15 @@ /* | ||
var idsMap = {}; | ||
var idsMap = {}, | ||
geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation'); | ||
module.exports = { | ||
getLocation: function(success, error, args) { | ||
var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation'), | ||
successCallback = function (position) { | ||
success(position.coords); | ||
}; | ||
var successCallback = function (result) { | ||
var pos = result.coords; | ||
pos.timestamp = result.timestamp; | ||
if (success) { | ||
success(pos); | ||
} | ||
}; | ||
geo.getCurrentPosition(successCallback, error, { | ||
@@ -38,8 +43,13 @@ enableHighAccuracy: args[0], | ||
addWatch: function(success, error, args) { | ||
var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation'), | ||
id = args[0], | ||
nativeId = geo.watchPosition(success, error, { | ||
var id = args[0], | ||
successCallback = function (result) { | ||
var pos = result.coords; | ||
pos.timestamp = result.timestamp; | ||
if (success) { | ||
success(pos); | ||
} | ||
}, | ||
nativeId = geo.watchPosition(successCallback, error, { | ||
enableHighAccuracy: args[1] | ||
}); | ||
idsMap[id] = nativeId; | ||
@@ -49,5 +59,3 @@ }, | ||
clearWatch: function(success, error, args) { | ||
var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation'), | ||
id = args[0]; | ||
var id = args[0]; | ||
if(id in idsMap) { | ||
@@ -57,3 +65,2 @@ geo.clearWatch(idsMap[id]); | ||
} | ||
if(success) { | ||
@@ -63,4 +70,5 @@ success(); | ||
} | ||
}; | ||
require("cordova/exec/proxy").add("Geolocation", module.exports); |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
118115
27
1525
1