From a4bb2a276e31058010f18eb95cde6c34175417d1 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 31 Mar 2009 09:30:15 -0700 Subject: [PATCH] Geolocation works on Android --- assets/phonegap.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/assets/phonegap.js b/assets/phonegap.js index d58de8e6..248354ca 100644 --- a/assets/phonegap.js +++ b/assets/phonegap.js @@ -546,15 +546,17 @@ Geolocation.prototype.getCurrentPosition = function(successCallback, errorCallba } // Run the global callback -Geolocation.gotCurrentPosition = function(latitude, longitude) +Geolocation.gotCurrentPosition = function(lat, lng) { - if (latitude == "undefined" || longitude == "undefined") + if (lat == "undefined" || lng == "undefined") { this.fail(); } else { - p = { lat: latitude, lng: longitude } + p = {}; + p.latitude = lat; + p.longitude = lng; this.global_success(p); } }