diff options
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/locate.js | 3 | ||||
-rw-r--r-- | www/js/views/around.js | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/www/js/locate.js b/www/js/locate.js index 7d4c713..cc92821 100644 --- a/www/js/locate.js +++ b/www/js/locate.js @@ -2,6 +2,7 @@ _.extend( FMS, { Locate: function() { return { locating: 0, + updating: 0, lookup: function(q) { var that = this; @@ -72,6 +73,7 @@ updatePosition: function() { console.log('updatePosition'); + this.updating = 1; var that = this; this.update_watch_id = navigator.geolocation.watchPosition( function(location) { @@ -85,6 +87,7 @@ }, stopUpdating: function() { + this.updating = 0; if ( this.update_watch_id ) { navigator.geolocation.clearupdate_watch( this.watch_id ); delete this.update_watch_id; diff --git a/www/js/views/around.js b/www/js/views/around.js index 2affa7a..718721b 100644 --- a/www/js/views/around.js +++ b/www/js/views/around.js @@ -137,6 +137,7 @@ }, goPhoto: function(info) { + FMS.locator.stopUpdating(); this.model.set('lat', info.coordinates.latitude ); this.model.set('lon', info.coordinates.longitude ); this.model.set('categories', info.details.category ); |