diff --git a/framework/assets/js/geolocation.js b/framework/assets/js/geolocation.js index df942251..7d529d37 100644 --- a/framework/assets/js/geolocation.js +++ b/framework/assets/js/geolocation.js @@ -109,7 +109,7 @@ Geolocation.prototype.watchPosition = function(successCallback, errorCallback, o this.listeners = []; } - var key = this.listeners.push( {"success" : successCallback, "fail" : failCallback }) - 1; + var key = this.listeners.push( {"success" : successCallback, "fail" : errorCallback }) - 1; // TO-DO: Get the names of the method and pass them as strings to the Java. return Geolocation.start(frequency, key); @@ -147,4 +147,4 @@ PhoneGap.addConstructor(function() { ["setLocation", "getCurrentPosition", "watchPosition", "clearWatch", "setError", "start", "stop", "gotCurrentPosition"] ); -}); \ No newline at end of file +});