aboutsummaryrefslogtreecommitdiffstats
path: root/www/js/locate.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/locate.js')
-rw-r--r--www/js/locate.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/www/js/locate.js b/www/js/locate.js
index 834d4e3..dcc48fc 100644
--- a/www/js/locate.js
+++ b/www/js/locate.js
@@ -58,12 +58,17 @@
}
}
},
- function() {
+ function(err) {
if ( that.watch_id === undefined ) { return; }
that.locating = 0;
navigator.geolocation.clearWatch( that.watch_id );
delete that.watch_id;
- that.trigger('gps_failed', { msg: FMS.strings.geolocation_failed } );
+ var errorMsg = FMS.strings.geolocation_failed;
+
+ if ( err && err.code == PositionError.PERMISSION_DENIED ) {
+ errorMsg = FMS.strings.geolocation_denied;
+ }
+ that.trigger('gps_failed', { msg: errorMsg } );
},
{ timeout: 20000, enableHighAccuracy: true }
);