Skip to content

Commit

Permalink
Use http protocol for non-http (i.e. file) URIs (see openlayers#700)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahocevar committed Dec 14, 2012
1 parent 083fcca commit 84cf468
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/OpenLayers/Layer/Bing.js
Expand Up @@ -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
Expand Down

0 comments on commit 84cf468

Please sign in to comment.