Merge pull request #1510 from tschaub/bing-providers
Handle case where Bing resource has no imagery providers.
This commit is contained in:
@@ -115,8 +115,10 @@ ol.source.BingMaps.prototype.handleImageryMetadataResponse =
|
|||||||
});
|
});
|
||||||
})));
|
})));
|
||||||
|
|
||||||
|
if (resource.imageryProviders) {
|
||||||
var transform = ol.proj.getTransformFromProjections(
|
var transform = ol.proj.getTransformFromProjections(
|
||||||
ol.proj.get('EPSG:4326'), this.getProjection());
|
ol.proj.get('EPSG:4326'), this.getProjection());
|
||||||
|
|
||||||
var attributions = goog.array.map(
|
var attributions = goog.array.map(
|
||||||
resource.imageryProviders,
|
resource.imageryProviders,
|
||||||
function(imageryProvider) {
|
function(imageryProvider) {
|
||||||
@@ -146,6 +148,7 @@ ol.source.BingMaps.prototype.handleImageryMetadataResponse =
|
|||||||
});
|
});
|
||||||
attributions.push(ol.source.BingMaps.TOS_ATTRIBUTION);
|
attributions.push(ol.source.BingMaps.TOS_ATTRIBUTION);
|
||||||
this.setAttributions(attributions);
|
this.setAttributions(attributions);
|
||||||
|
}
|
||||||
|
|
||||||
this.setLogo(brandLogoUri);
|
this.setLogo(brandLogoUri);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user