From 2b43b348cd4d24ea033efb90d0024cb26effb7bd Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Fri, 1 Jul 2016 14:27:32 +0200 Subject: [PATCH] Use relative URL when loading OSM tiles This avoids mixed content warnings and gives us our padlock back on Chromium and Firefox. This also switches the domain for the tile servers from osm.org to openstreetmap.org because the certificates do not mention osm.org and hence using this domain the tiles fail to load. --- app/views/conference/_venue_map.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/conference/_venue_map.html.haml b/app/views/conference/_venue_map.html.haml index 491ae4ae..b58b3053 100644 --- a/app/views/conference/_venue_map.html.haml +++ b/app/views/conference/_venue_map.html.haml @@ -5,7 +5,7 @@ // create a map in the "map" div, set the view to a given place and zoom var map = L.map('map', { scrollWheelZoom: false }).setView([#{@conference.venue.latitude}, #{@conference.venue.longitude}], 11); // add an OpenStreetMap tile layer - L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { + L.tileLayer('//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA, Imagery © Mapbox', maxZoom: 18 }).addTo(map);