Handle case where resource has no imagery providers

This commit is contained in:
Tim Schaub
2014-01-10 13:50:51 -07:00
parent 542f478ca1
commit f78a668ce3

View File

@@ -115,8 +115,10 @@ ol.source.BingMaps.prototype.handleImageryMetadataResponse =
});
})));
if (resource.imageryProviders) {
var transform = ol.proj.getTransformFromProjections(
ol.proj.get('EPSG:4326'), this.getProjection());
var attributions = goog.array.map(
resource.imageryProviders,
function(imageryProvider) {
@@ -146,6 +148,7 @@ ol.source.BingMaps.prototype.handleImageryMetadataResponse =
});
attributions.push(ol.source.BingMaps.TOS_ATTRIBUTION);
this.setAttributions(attributions);
}
this.setLogo(brandLogoUri);