Permalink
Browse files

always use https when available

revert 52fb2e9 / ref #237
  • Loading branch information...
brunob authored and jieter committed Sep 8, 2017
1 parent 26755c1 commit dea786a3219f9cc824b8e96903a17f46ca9a5afc
Showing with 13 additions and 18 deletions.
  1. +13 −18 leaflet-providers.js
@@ -50,11 +50,6 @@
};
}
var forceHTTP = window.location.protocol === 'file:' || provider.options.forceHTTP;
if (provider.url.indexOf('//') === 0 && forceHTTP) {
provider.url = 'http:' + provider.url;
}
// If retina option is set
if (provider.options.retina) {
// Check retina screen
@@ -95,7 +90,7 @@
L.TileLayer.Provider.providers = {
OpenStreetMap: {
url: '//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
url: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
options: {
maxZoom: 19,
attribution:
@@ -110,20 +105,20 @@
}
},
DE: {
url: '//{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',
url: 'https://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',
options: {
maxZoom: 18
}
},
France: {
url: '//{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png',
url: 'https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png',
options: {
maxZoom: 20,
attribution: '© Openstreetmap France | {attribution.OpenStreetMap}'
}
},
HOT: {
url: '//{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',
url: 'https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',
options: {
attribution: '{attribution.OpenStreetMap}, Tiles courtesy of <a href="http://hot.openstreetmap.org/" target="_blank">Humanitarian OpenStreetMap Team</a>'
}
@@ -144,14 +139,14 @@
}
},
OpenTopoMap: {
url: '//{s}.tile.opentopomap.org/{z}/{x}/{y}.png',
url: 'https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png',
options: {
maxZoom: 17,
attribution: 'Map data: {attribution.OpenStreetMap}, <a href="http://viewfinderpanoramas.org">SRTM</a> | Map style: &copy; <a href="https://opentopomap.org">OpenTopoMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
}
},
Thunderforest: {
url: '//{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png?apikey={apikey}',
url: 'https://{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png?apikey={apikey}',
options: {
attribution:
'&copy; <a href="http://www.thunderforest.com/">Thunderforest</a>, {attribution.OpenStreetMap}',
@@ -205,7 +200,7 @@
}
},
Hydda: {
url: '//{s}.tile.openstreetmap.se/hydda/{variant}/{z}/{x}/{y}.png',
url: 'https://{s}.tile.openstreetmap.se/hydda/{variant}/{z}/{x}/{y}.png',
options: {
maxZoom: 18,
variant: 'full',
@@ -218,7 +213,7 @@
}
},
MapBox: {
url: '//api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}',
url: 'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}',
options: {
attribution:
'Imagery from <a href="http://mapbox.com/about/maps/">MapBox</a> &mdash; ' +
@@ -229,7 +224,7 @@
}
},
Stamen: {
url: '//stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}',
url: 'https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}',
options: {
attribution:
'Map tiles by <a href="http://stamen.com">Stamen Design</a>, ' +
@@ -286,7 +281,7 @@
}
},
Esri: {
url: '//server.arcgisonline.com/ArcGIS/rest/services/{variant}/MapServer/tile/{z}/{y}/{x}',
url: 'https://server.arcgisonline.com/ArcGIS/rest/services/{variant}/MapServer/tile/{z}/{y}/{x}',
options: {
variant: 'World_Street_Map',
attribution: 'Tiles &copy; Esri'
@@ -401,7 +396,7 @@
* envirionments.
*/
url:
'//{s}.{base}.maps.cit.api.here.com/maptile/2.1/' +
'https://{s}.{base}.maps.cit.api.here.com/maptile/2.1/' +
'{type}/{mapID}/{variant}/{z}/{x}/{y}/{size}/{format}?' +
'app_id={app_id}&app_code={app_code}&lg={language}',
options: {
@@ -588,7 +583,7 @@
}
},
NASAGIBS: {
url: '//map1.vis.earthdata.nasa.gov/wmts-webmerc/{variant}/default/{time}/{tilematrixset}{maxZoom}/{z}/{y}/{x}.{format}',
url: 'https://map1.vis.earthdata.nasa.gov/wmts-webmerc/{variant}/default/{time}/{tilematrixset}{maxZoom}/{z}/{y}/{x}.{format}',
options: {
attribution:
'Imagery provided by services from the Global Imagery Browse Services (GIBS), operated by the NASA/GSFC/Earth Science Data and Information System ' +
@@ -652,7 +647,7 @@
// z0-9 - 1:1m
// z10-11 - quarter inch (1:253440)
// z12-18 - one inch (1:63360)
url: '//nls-{s}.tileserver.com/nls/{z}/{x}/{y}.jpg',
url: 'https://nls-{s}.tileserver.com/nls/{z}/{x}/{y}.jpg',
options: {
attribution: '<a href="http://geo.nls.uk/maps/">National Library of Scotland Historic Maps</a>',
bounds: [[49.6, -12], [61.7, 3]],

0 comments on commit dea786a

Please sign in to comment.