Merge pull request #1692 from fredj/osm-tiles

Use protocol relative URL for OSM tiles
This commit is contained in:
Frédéric Junod
2014-02-13 12:14:59 +01:00
2 changed files with 2 additions and 2 deletions

View File

@@ -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
*/

View File

@@ -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,