diff --git a/lib/OpenLayers/Layer/Bing.js b/lib/OpenLayers/Layer/Bing.js index 8945662fe1..638891dadb 100644 --- a/lib/OpenLayers/Layer/Bing.js +++ b/lib/OpenLayers/Layer/Bing.js @@ -106,9 +106,10 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, { * this is undocumented and the Imagery Metadata API always returns HTTP * 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