make sure the for loop for lods is not messed up by frameworks changing the Array.prototype, p=dzwarg, r=me (closes #3474)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@12269 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -172,21 +172,23 @@ OpenLayers.Layer.ArcGISCache = OpenLayers.Class(OpenLayers.Layer.XYZ, {
|
||||
|
||||
this.lods = [];
|
||||
for(var key in info.tileInfo.lods) {
|
||||
var lod = info.tileInfo.lods[key];
|
||||
if (this.useScales) {
|
||||
this.scales.push(lod.scale);
|
||||
} else {
|
||||
this.resolutions.push(lod.resolution);
|
||||
if (info.tileInfo.lods.hasOwnProperty(key)) {
|
||||
var lod = info.tileInfo.lods[key];
|
||||
if (this.useScales) {
|
||||
this.scales.push(lod.scale);
|
||||
} else {
|
||||
this.resolutions.push(lod.resolution);
|
||||
}
|
||||
|
||||
var start = this.getContainingTileCoords(upperLeft, lod.resolution);
|
||||
lod.startTileCol = start.x;
|
||||
lod.startTileRow = start.y;
|
||||
|
||||
var end = this.getContainingTileCoords(bottomRight, lod.resolution);
|
||||
lod.endTileCol = end.x;
|
||||
lod.endTileRow = end.y;
|
||||
this.lods.push(lod);
|
||||
}
|
||||
|
||||
var start = this.getContainingTileCoords(upperLeft, lod.resolution);
|
||||
lod.startTileCol = start.x;
|
||||
lod.startTileRow = start.y;
|
||||
|
||||
var end = this.getContainingTileCoords(bottomRight, lod.resolution);
|
||||
lod.endTileCol = end.x;
|
||||
lod.endTileRow = end.y;
|
||||
this.lods.push(lod);
|
||||
}
|
||||
|
||||
this.maxExtent = this.calculateMaxExtentWithLOD(this.lods[0]);
|
||||
|
||||
Reference in New Issue
Block a user