fix up Layer.Bing tests, fix has been discussed with @ahocevar (closes #163)
This commit is contained in:
@@ -145,7 +145,7 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, {
|
||||
this.url = [];
|
||||
for (var i=0; i<res.imageUrlSubdomains.length; ++i) {
|
||||
this.url.push(url.replace("{subdomain}", res.imageUrlSubdomains[i]));
|
||||
};
|
||||
}
|
||||
this.addOptions({
|
||||
maxResolution: Math.min(
|
||||
this.serverResolutions[res.zoomMin], this.maxResolution
|
||||
@@ -193,7 +193,7 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, {
|
||||
*/
|
||||
updateAttribution: function() {
|
||||
var metadata = this.metadata;
|
||||
if (!metadata || !this.map || !this.map.center) {
|
||||
if (!metadata.resourceSets || !this.map || !this.map.center) {
|
||||
return;
|
||||
}
|
||||
var res = metadata.resourceSets[0].resources[0];
|
||||
|
||||
Reference in New Issue
Block a user