From 4cb4ab89db61ac05daa4ff631947a5f593ed2af4 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Thu, 13 Feb 2014 11:21:27 +0100 Subject: [PATCH] Use protocol relative URL for OSM tiles --- src/objectliterals.jsdoc | 2 +- src/ol/source/osmsource.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/objectliterals.jsdoc b/src/objectliterals.jsdoc index ade707fd70..e26100a3b2 100644 --- a/src/objectliterals.jsdoc +++ b/src/objectliterals.jsdoc @@ -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 */ diff --git a/src/ol/source/osmsource.js b/src/ol/source/osmsource.js index 84175b5666..4fe96661d3 100644 --- a/src/ol/source/osmsource.js +++ b/src/ol/source/osmsource.js @@ -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,