]> git.openstreetmap.org Git - chef.git/commitdiff
Use protocol relative URLs for imagery tiles
authorTom Hughes <tom@compton.nu>
Tue, 14 Feb 2017 19:19:57 +0000 (19:19 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 14 Feb 2017 19:19:57 +0000 (19:19 +0000)
cookbooks/imagery/resources/layer.rb
cookbooks/imagery/templates/default/imagery.js.erb

index aee757e6e7a5cba8d05a8c654e2c61780a9cce82..b1e7cc9d11f1d7d19d1ad4e5237e73d7773958f3 100644 (file)
@@ -47,7 +47,7 @@ action :create do
     mode 0o644
     content YAML.dump(:name => layer,
                       :title => title || layer,
-                      :url => "http://{s}.#{site}/layer/#{layer}/{z}/{x}/{y}.png",
+                      :url => "//{s}.#{site}/layer/#{layer}/{z}/{x}/{y}.png",
                       :attribution => copyright,
                       :default => default_layer,
                       :maxZoom => max_zoom,
index f992ef08df07c73e7de6ec7d66f4c154a7af70d9..698c8926fde477f9ae507f7c2cd9fe18cf6647b5 100644 (file)
@@ -6,7 +6,7 @@ function createMap(divName) {
   var layers = L.control.layers(null, null, {collapsed:false});
 
   // Add OpenStreetMap layer
-  layers.addBaseLayer(L.tileLayer("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
+  layers.addBaseLayer(L.tileLayer("//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
     attribution: "© <a target=\"_parent\" href=\"http://www.openstreetmap.org\">OpenStreetMap</a> and contributors, under an <a target=\"_parent\" href=\"http://www.openstreetmap.org/copyright\">open license</a>",
     maxZoom: 19
   }), "OpenStreetMap");