Don't compute limit if it's not needed
This commit is contained in:
@@ -147,10 +147,9 @@ OpenLayers.Layer.XYZ = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
||||
OpenLayers.Util.indexOf(resolutions, res) :
|
||||
this.getServerZoom() + this.zoomOffset;
|
||||
|
||||
var limit = Math.pow(2, z);
|
||||
if (this.wrapDateLine)
|
||||
{
|
||||
x = ((x % limit) + limit) % limit;
|
||||
if (this.wrapDateLine) {
|
||||
var limit = Math.pow(2, z);
|
||||
x = ((x % limit) + limit) % limit;
|
||||
}
|
||||
|
||||
return {'x': x, 'y': y, 'z': z};
|
||||
|
||||
Reference in New Issue
Block a user