diff options
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/locate.js | 12 | ||||
-rw-r--r-- | www/js/views/around.js | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/www/js/locate.js b/www/js/locate.js index f56e37b..efc8e82 100644 --- a/www/js/locate.js +++ b/www/js/locate.js @@ -66,10 +66,10 @@ ); }, - updatePosition: function() { + trackPosition: function() { this.updating = 1; var that = this; - this.update_watch_id = navigator.geolocation.watchPosition( + this.track_watch_id = navigator.geolocation.watchPosition( function(location) { that.trigger('gps_current_position', { coordinates: location.coords } ); }, @@ -78,11 +78,11 @@ ); }, - stopUpdating: function() { + stopTracking: function() { this.updating = 0; - if ( this.update_watch_id ) { - navigator.geolocation.clearWatch( this.update_watch_id ); - delete this.update_watch_id; + if ( this.track_watch_id ) { + navigator.geolocation.clearWatch( this.track_watch_id ); + delete this.track_watch_id; } }, diff --git a/www/js/views/around.js b/www/js/views/around.js index 01e99ec..69a59d1 100644 --- a/www/js/views/around.js +++ b/www/js/views/around.js @@ -86,7 +86,7 @@ FMS.currentPosition = centre; fixmystreet.map.panTo(centre); } - FMS.locator.updatePosition(); + FMS.locator.trackPosition(); }, positionUpdate: function( info ) { @@ -151,7 +151,7 @@ goPhoto: function(info) { this.stopListening(FMS.locator); - FMS.locator.stopUpdating(); + FMS.locator.stopTracking(); this.model.set('lat', info.coordinates.latitude ); this.model.set('lon', info.coordinates.longitude ); this.model.set('categories', info.details.category ); @@ -162,7 +162,7 @@ goSearch: function(e) { e.preventDefault(); this.stopListening(FMS.locator); - FMS.locator.stopUpdating(); + FMS.locator.stopTracking(); this.navigate( 'search' ); }, |