Simplify parent call (don't use intermediate array)

This commit is contained in:
fredj
2012-02-15 12:32:25 +01:00
parent a40ae7ef11
commit cd3ffa2058
+3 -4
View File
@@ -75,10 +75,9 @@ OpenLayers.Layer.XYZ = OpenLayers.Class(OpenLayers.Layer.Grid, {
options.projection = new OpenLayers.Projection('EPSG:900913'); options.projection = new OpenLayers.Projection('EPSG:900913');
options.numZoomLevels = 19; options.numZoomLevels = 19;
} }
url = url || this.url; OpenLayers.Layer.Grid.prototype.initialize.apply(this, [
name = name || this.name; name || this.name, url || this.url, {}, options
var newArguments = [name, url, {}, options]; ]);
OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments);
}, },
/** /**