aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/geolocation.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/js/geolocation.js')
-rw-r--r--web/js/geolocation.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/web/js/geolocation.js b/web/js/geolocation.js
index 5ff9fe9dc..3c2cf04df 100644
--- a/web/js/geolocation.js
+++ b/web/js/geolocation.js
@@ -29,7 +29,8 @@ fixmystreet.geolocate = function(element, success_callback) {
(function(){
var link = document.getElementById('geolocate_link');
if (!link) { return; }
- if ('geolocation' in navigator) {
+ var https = window.location.protocol.toLowerCase() === 'https:';
+ if ('geolocation' in navigator && https) {
fixmystreet.geolocate(link, function(pos) {
var latitude = pos.coords.latitude.toFixed(6);
var longitude = pos.coords.longitude.toFixed(6);