Fix imageryProviders Bug
Sometimes imageryProviders is null so accessing providers.length on line 255 causes a TypeError.
This commit is contained in:
@@ -248,7 +248,7 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, {
|
|||||||
this.map.getProjectionObject(),
|
this.map.getProjectionObject(),
|
||||||
new OpenLayers.Projection("EPSG:4326")
|
new OpenLayers.Projection("EPSG:4326")
|
||||||
);
|
);
|
||||||
var providers = res.imageryProviders,
|
var providers = res.imageryProviders || [],
|
||||||
zoom = OpenLayers.Util.indexOf(this.serverResolutions,
|
zoom = OpenLayers.Util.indexOf(this.serverResolutions,
|
||||||
this.getServerResolution()),
|
this.getServerResolution()),
|
||||||
copyrights = "", provider, i, ii, j, jj, bbox, coverage;
|
copyrights = "", provider, i, ii, j, jj, bbox, coverage;
|
||||||
|
|||||||
Reference in New Issue
Block a user