Use http protocol for non-http (i.e. file) URIs (see #700)

This commit is contained in:
ahocevar
2012-12-14 09:30:13 +01:00
parent 083fcca882
commit 84cf468a22

View File

@@ -106,9 +106,10 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, {
* this is undocumented and the Imagery Metadata API always returns HTTP * this is undocumented and the Imagery Metadata API always returns HTTP
* urls. * urls.
* *
* Default is * Default is '', unless when executed from a file:/// uri, in which case
* it is 'http:'.
*/ */
protocol: '', protocol: ~window.location.href.indexOf('http') ? '' : 'http:',
/** /**
* Constructor: OpenLayers.Layer.Bing * Constructor: OpenLayers.Layer.Bing