cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hermw...@apache.org
Subject [2/3] git commit: pass by only coords
Date Wed, 06 Nov 2013 22:01:03 GMT
pass by only coords


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/commit/df374aec
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/tree/df374aec
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/diff/df374aec

Branch: refs/heads/dev
Commit: df374aec2f9324e2130aff84b301356d7654caea
Parents: b3209cb
Author: Piotr Zalewa <piotr@zalewa.info>
Authored: Tue Nov 5 14:23:51 2013 +0100
Committer: hermwong <herm.wong@gmail.com>
Committed: Wed Nov 6 13:54:47 2013 -0800

----------------------------------------------------------------------
 src/firefoxos/GeolocationProxy.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/df374aec/src/firefoxos/GeolocationProxy.js
----------------------------------------------------------------------
diff --git a/src/firefoxos/GeolocationProxy.js b/src/firefoxos/GeolocationProxy.js
index c5803de..305eed1 100644
--- a/src/firefoxos/GeolocationProxy.js
+++ b/src/firefoxos/GeolocationProxy.js
@@ -26,7 +26,11 @@ var idsMap = {};
 module.exports = {
     getLocation: function(success, error, args) {
         var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation');
-        geo.getCurrentPosition(success, error, {
+        function successCallback(position) {
+          // Cordova is creating Position object using just coords
+          success(position.coords);
+        }
+        geo.getCurrentPosition(successCallback, error, {
             enableHighAccuracy: args[0],
             maximumAge: args[1]
         });


Mime
View raw message