Calculate zoom level from serverResolutions.
The previous way of hard-coding an offset of 1 causes an incorrect attribution for layers with a custom maxResolution.
This commit is contained in:
@@ -223,7 +223,8 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, {
|
||||
this.map.getProjectionObject(),
|
||||
new OpenLayers.Projection("EPSG:4326")
|
||||
);
|
||||
var providers = res.imageryProviders, zoom = this.map.getZoom() + 1,
|
||||
var providers = res.imageryProviders,
|
||||
zoom = this.serverResolutions.indexOf(this.getServerResolution()),
|
||||
copyrights = "", provider, i, ii, j, jj, bbox, coverage;
|
||||
for (i=0,ii=providers.length; i<ii; ++i) {
|
||||
provider = providers[i];
|
||||
|
||||
Reference in New Issue
Block a user