You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by za...@apache.org on 2014/05/20 20:50:55 UTC
[4/8] git commit: pass by only coords
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/9e8ce307
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/tree/9e8ce307
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/diff/9e8ce307
Branch: refs/heads/master
Commit: 9e8ce3074e726a2f5315bac5ff848e331dfb5cfb
Parents: 1bd7673
Author: Piotr Zalewa <pi...@zalewa.info>
Authored: Tue Nov 5 14:23:51 2013 +0100
Committer: Piotr Zalewa <pi...@zalewa.info>
Committed: Tue Nov 5 14:23:51 2013 +0100
----------------------------------------------------------------------
src/firefoxos/GeolocationProxy.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/9e8ce307/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]
});