]> git.openstreetmap.org Git - rails.git/commitdiff
Preserve protocol in standard links
authorTom Hughes <tom@compton.nu>
Sat, 18 Feb 2017 12:18:34 +0000 (12:18 +0000)
committerTom Hughes <tom@compton.nu>
Sat, 18 Feb 2017 12:18:34 +0000 (12:18 +0000)
app/assets/javascripts/leaflet.map.js

index 1edb1ae4b9d147148405759d98a82be64fe45d78..e499795beb85ef0c9ec57c9d12517057d474f525 100644 (file)
@@ -107,7 +107,7 @@ L.OSM.Map = L.Map.extend({
       params.mlon = latLng.lng.toFixed(precision);
     }
 
       params.mlon = latLng.lng.toFixed(precision);
     }
 
-    var url = 'http://' + OSM.SERVER_URL + '/',
+    var url = window.location.protocol + '://' + OSM.SERVER_URL + '/',
       query = querystring.stringify(params),
       hash = OSM.formatHash(this);
 
       query = querystring.stringify(params),
       hash = OSM.formatHash(this);