Merge pull request #1510 from tschaub/bing-providers

Handle case where Bing resource has no imagery providers.
This commit is contained in:
Tim Schaub
2014-01-10 21:00:53 -08:00

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);