diff options
author | Struan Donald <struan@exo.org.uk> | 2013-03-07 17:13:57 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-03-07 17:13:57 +0000 |
commit | 6518782326e89eec97af02f17cd18a7b52a68113 (patch) | |
tree | d986931444fd205278b20fbbf616ff204537d7e3 /www/js | |
parent | cfa7f124c0e91027164e9f56985153db8662bcf0 (diff) |
once locating is finished remove the watch id
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/locate.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/www/js/locate.js b/www/js/locate.js index 451a16c..be0dc29 100644 --- a/www/js/locate.js +++ b/www/js/locate.js @@ -47,6 +47,7 @@ var Locate = ( function() { return { console.log( 'located with accuracy of ' + location.coords.accuracy ); that.locating = 0; navigator.geolocation.clearWatch( that.watch_id ); + delete that.watch_id; that.check_location(location.coords); } @@ -55,8 +56,7 @@ var Locate = ( function() { return { if ( that.watch_id == undefined ) { return; } that.locating = 0; navigator.geolocation.clearWatch( that.watch_id ); - - $('#ajaxOverlay').hide(); + delete that.watch_id; that.trigger('failed', { msg: FMS.strings.geolocation_failed } ); }, { timeout: 7000, enableHighAccuracy: true } |