aboutsummaryrefslogtreecommitdiffstats
path: root/www/js/locate.js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-04-19 12:02:39 +0100
committerStruan Donald <struan@exo.org.uk>2013-04-22 15:55:58 +0100
commitda544e85ea7197dfb4c9c5d7bbd7ea625d447c7a (patch)
tree46b4919674670024fbc7b99b5ed4f2d8b4f3ee4f /www/js/locate.js
parent11417c023c512a88a602e8cd74ccfea0d87ac4c7 (diff)
extract geolocation parts of view out to view that is inherited from
Diffstat (limited to 'www/js/locate.js')
-rw-r--r--www/js/locate.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/www/js/locate.js b/www/js/locate.js
index efc8e82..beb40e7 100644
--- a/www/js/locate.js
+++ b/www/js/locate.js
@@ -36,7 +36,7 @@
} );
},
- geolocate: function( minAccuracy ) {
+ geolocate: function( minAccuracy, skipLocationCheck ) {
this.locating = 1;
$('#ajaxOverlay').show();
@@ -52,7 +52,11 @@
navigator.geolocation.clearWatch( that.watch_id );
delete that.watch_id;
- that.check_location(location.coords);
+ if ( skipLocationCheck ) {
+ that.trigger('gps_located', { coordinates: location.coords } );
+ } else {
+ that.check_location(location.coords);
+ }
}
},
function() {