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

View File

@@ -37,8 +37,11 @@ ol.source.BingMaps = function(options) {
*/
this.culture_ = goog.isDef(options.culture) ? options.culture : 'en-us';
var protocol = ol.IS_HTTPS ? 'https:' : 'http:';
var uri = new goog.Uri(
'//dev.virtualearth.net/REST/v1/Imagery/Metadata/' + options.imagerySet);
protocol + '//dev.virtualearth.net/REST/v1/Imagery/Metadata/' +
options.imagerySet);
var jsonp = new goog.net.Jsonp(uri, 'jsonp');
jsonp.send({
'include': 'ImageryProviders',