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 1edb1ae..e499795 100644 (file)
@@ -107,7 +107,7 @@ L.OSM.Map = L.Map.extend({
       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);