Avoid protocol relative URL to support apps using file protocol

This commit is contained in:
Tim Schaub
2014-03-24 14:57:43 -06:00
parent b613c9cde7
commit 9ce7d6ea45
5 changed files with 18 additions and 4 deletions
+2 -1
View File
@@ -93,8 +93,9 @@ ol.source.Stamen = function(options) {
goog.asserts.assert(options.layer in ol.source.StamenLayerConfig);
var layerConfig = ol.source.StamenLayerConfig[options.layer];
var protocol = ol.IS_HTTPS ? 'https:' : 'http:';
var url = goog.isDef(options.url) ? options.url :
'//{a-d}.tile.stamen.com/' + options.layer + '/{z}/{x}/{y}.' +
protocol + '//{a-d}.tile.stamen.com/' + options.layer + '/{z}/{x}/{y}.' +
layerConfig.extension;
goog.base(this, {