aboutsummaryrefslogtreecommitdiffstats
path: root/www/js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-03-21 17:55:15 +0000
committerStruan Donald <struan@exo.org.uk>2013-03-21 17:55:15 +0000
commitf3f9d6ceede0ddd07be7fbfc03aa0e7839fafe36 (patch)
treec6ad81762952019253a8f4c889ed2ea5947849ad /www/js
parentf20e72af2fb4800cfb405eb7ec660bd110abb42d (diff)
update -> track as it is a better name
Diffstat (limited to 'www/js')
-rw-r--r--www/js/locate.js12
-rw-r--r--www/js/views/around.js6
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' );
},