Fix imageryProviders Bug

Sometimes imageryProviders is null so accessing providers.length on
line 255 causes a TypeError.
This commit is contained in:
Iain MacDonald
2013-03-25 16:16:55 +00:00
parent cae4df3ce7
commit 847584bbbd

View File

@@ -248,7 +248,7 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, {
this.map.getProjectionObject(),
new OpenLayers.Projection("EPSG:4326")
);
var providers = res.imageryProviders,
var providers = res.imageryProviders || [],
zoom = OpenLayers.Util.indexOf(this.serverResolutions,
this.getServerResolution()),
copyrights = "", provider, i, ii, j, jj, bbox, coverage;