Skip to content
Permalink
Browse files
Wrong parameter in Firefox OS plugin
Calling geolocation.watchPosition() in Firefox OS will return empty coords because addWatch() omits same position object conversion like in getLocation().
  • Loading branch information
DrJojo committed Nov 21, 2014
1 parent 7dc4400 commit 3b06100d419f550208a71581bf3a9ae44f461a75
Showing 1 changed file with 4 additions and 1 deletion.
@@ -39,7 +39,10 @@ module.exports = {
addWatch: function(success, error, args) {
var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation');
var id = args[0];
var nativeId = geo.watchPosition(success, error, {
function successCallback(position) {
success(position.coords);
}
var nativeId = geo.watchPosition(successCallback, error, {
enableHighAccuracy: args[1]
});

0 comments on commit 3b06100

Please sign in to comment.