Use protocol relative URL for OSM tiles
This commit is contained in:
@@ -697,7 +697,7 @@
|
||||
* function to load a tile given a URL.
|
||||
* @property {string|undefined} url URL template. Must include `{x}`, `{y}`,
|
||||
* and `{z}` placeholders. Default is
|
||||
* `http://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png`.
|
||||
* `//{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png`.
|
||||
* @todo stability experimental
|
||||
*/
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ ol.source.OSM = function(opt_options) {
|
||||
options.crossOrigin : 'anonymous';
|
||||
|
||||
var url = goog.isDef(options.url) ?
|
||||
options.url : 'http://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png';
|
||||
options.url : '//{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png';
|
||||
|
||||
goog.base(this, {
|
||||
attributions: attributions,
|
||||
|
||||
Reference in New Issue
Block a user