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