as universally approved on discussions on dev list, replace new Array() with []. all tests pass ff & ie6

git-svn-id: http://svn.openlayers.org/trunk/openlayers@3815 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2007-07-25 22:48:02 +00:00
parent 5f0bde51da
commit 8c552be94b
22 changed files with 44 additions and 44 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ OpenLayers.Layer.GML = OpenLayers.Class(OpenLayers.Layer.Vector, {
* options - {Object} Hashtable of extra options to tag onto the layer.
*/
initialize: function(name, url, options) {
var newArguments = new Array()
var newArguments = [];
newArguments.push(name, options);
OpenLayers.Layer.Vector.prototype.initialize.apply(this, newArguments);
this.url = url;
+1 -1
View File
@@ -53,7 +53,7 @@ OpenLayers.Layer.GeoRSS = OpenLayers.Class(OpenLayers.Layer.Markers, {
initialize: function(name, location, options) {
OpenLayers.Layer.Markers.prototype.initialize.apply(this, [name, options]);
this.location = location;
this.features = new Array();
this.features = [];
OpenLayers.loadURL(location, null, this, this.parseData);
},
+5 -5
View File
@@ -68,7 +68,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
//
this.events.addEventType("tileloaded");
this.grid = new Array();
this.grid = [];
},
/**
@@ -129,7 +129,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
}
// we do not want to copy reference to grid, so we make a new array
obj.grid = new Array();
obj.grid = [];
return obj;
},
@@ -269,7 +269,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
var px = this.map.getLayerPxFromLonLat(ul);
if (!this.grid.length) {
this.grid[0] = new Array();
this.grid[0] = [];
}
var tile = this.grid[0][0];
@@ -331,7 +331,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
do {
var row = this.grid[rowidx++];
if (!row) {
row = new Array();
row = [];
this.grid.push(row);
}
@@ -390,7 +390,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
* outside-in to inside-out), calling draw() on each tile.
*/
spiralTileLoad: function() {
var tileQueue = new Array();
var tileQueue = [];
var directions = ["right", "down", "left", "up"];
+3 -3
View File
@@ -59,7 +59,7 @@ OpenLayers.Layer.KaMap = OpenLayers.Class(OpenLayers.Layer.Grid, {
* extends, can be overridden through the options parameter.
*/
initialize: function(name, url, params, options) {
var newArguments = new Array();
var newArguments = [];
newArguments.push(name, url, params, options);
OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments);
this.params = (params ? params : {});
@@ -150,7 +150,7 @@ OpenLayers.Layer.KaMap = OpenLayers.Class(OpenLayers.Layer.Grid, {
row = this.grid[rowidx++];
if (!row) {
row = new Array();
row = [];
this.grid.push(row);
}
@@ -221,7 +221,7 @@ OpenLayers.Layer.KaMap = OpenLayers.Class(OpenLayers.Layer.Grid, {
}
// we do not want to copy reference to grid, so we make a new array
obj.grid = new Array();
obj.grid = [];
return obj;
},
+1 -1
View File
@@ -36,7 +36,7 @@ OpenLayers.Layer.MapServer = OpenLayers.Class(OpenLayers.Layer.Grid, {
* options - {Ojbect} Hashtable of extra options to tag onto the layer
*/
initialize: function(name, url, params, options) {
var newArguments = new Array();
var newArguments = [];
newArguments.push(name, url, params, options);
OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments);
+1 -1
View File
@@ -45,7 +45,7 @@ OpenLayers.Layer.Markers = OpenLayers.Class(OpenLayers.Layer, {
*/
initialize: function(name, options) {
OpenLayers.Layer.prototype.initialize.apply(this, arguments);
this.markers = new Array();
this.markers = [];
},
/**
+1 -1
View File
@@ -41,7 +41,7 @@ OpenLayers.Layer.TMS = OpenLayers.Class(OpenLayers.Layer.Grid, {
* options - {Object} Hashtable of extra options to tag onto the layer
*/
initialize: function(name, url, options) {
var newArguments = new Array();
var newArguments = [];
newArguments.push(name, url, {}, options);
OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments);
},
+3 -3
View File
@@ -121,8 +121,8 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {
this.displayError();
}
this.features = new Array();
this.selectedFeatures = new Array();
this.features = [];
this.selectedFeatures = [];
},
/**
@@ -310,7 +310,7 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {
* Destroy all features on the layer and empty the selected features array.
*/
destroyFeatures: function () {
this.selectedFeatures = new Array();
this.selectedFeatures = [];
for (var i = this.features.length - 1; i >= 0; i--) {
this.features[i].destroy();
}
+1 -1
View File
@@ -73,7 +73,7 @@ OpenLayers.Layer.WFS = OpenLayers.Class(
// Turn off error reporting, browsers like Safari may work
// depending on the setup, and we don't want an unneccesary alert.
OpenLayers.Util.extend(options, {'reportError': false});
var newArguments=new Array()
var newArguments = [];
newArguments.push(name, options);
OpenLayers.Layer.Vector.prototype.initialize.apply(this, newArguments);
if (!this.renderer || !this.vectorMode) {
+1 -1
View File
@@ -64,7 +64,7 @@ OpenLayers.Layer.WMS = OpenLayers.Class(OpenLayers.Layer.Grid, {
* options - {Ojbect} Hashtable of extra options to tag onto the layer
*/
initialize: function(name, url, params, options) {
var newArguments = new Array();
var newArguments = [];
//uppercase params
params = OpenLayers.Util.upperCaseObject(params);
newArguments.push(name, url, params, options);
+1 -1
View File
@@ -49,7 +49,7 @@ OpenLayers.Layer.WorldWind = OpenLayers.Class(OpenLayers.Layer.Grid, {
initialize: function(name, url, lzd, zoomLevels, params, options) {
this.lzd = lzd;
this.zoomLevels = zoomLevels;
var newArguments = new Array();
var newArguments = [];
newArguments.push(name, url, params, options);
OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments);
this.params = (params ? params : {});