give tiles a reference back to their container OpenLayers.Grid

git-svn-id: http://svn.openlayers.org/trunk/openlayers@180 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-05-19 15:19:49 +00:00
parent 9b638d91c6
commit 59fb5b050d
3 changed files with 15 additions and 5 deletions
+11 -3
View File
@@ -10,6 +10,9 @@
OpenLayers.Tile = Class.create(); OpenLayers.Tile = Class.create();
OpenLayers.Tile.prototype = { OpenLayers.Tile.prototype = {
/** @type OpenLayers.Grid */
grid: null,
// str - url of the request // str - url of the request
url:null, url:null,
@@ -23,11 +26,16 @@ OpenLayers.Tile.prototype = {
position:null, position:null,
/** /**
* @param {OpenLayers.Layer} layer * @constructor
* @param {OpenLayers.LonLat} coord *
* @param {OpenLayers.Grid} grid
* @param {OpenLayers.Bounds} bounds
* @param {String} url
* @param {OpenLayers.Size} size
*/ */
initialize: function(bounds,url,size) { initialize: function(grid, bounds, url, size) {
if (arguments.length > 0) { if (arguments.length > 0) {
this.grid = grid;
this.url = url; this.url = url;
this.bounds = bounds; this.bounds = bounds;
this.size = size; this.size = size;
+2 -1
View File
@@ -11,11 +11,12 @@ OpenLayers.Tile.Image.prototype =
/** /**
* @constructor * @constructor
* *
* @param {OpenLayers.Grid} grid
* @param {OpenLayers.Bounds} bounds * @param {OpenLayers.Bounds} bounds
* @param {String} url * @param {String} url
* @param {OpenLayers.Size} size * @param {OpenLayers.Size} size
*/ */
initialize: function(bounds,url,size) { initialize: function(grid, bounds, url, size) {
OpenLayers.Tile.prototype.initialize.apply(this, arguments); OpenLayers.Tile.prototype.initialize.apply(this, arguments);
}, },
+2 -1
View File
@@ -15,11 +15,12 @@ OpenLayers.Tile.WFS.prototype =
/** /**
* @constructor * @constructor
* *
* @param {OpenLayers.Grid} grid
* @param {OpenLayers.Bounds} bounds * @param {OpenLayers.Bounds} bounds
* @param {String} url * @param {String} url
* @param {OpenLayers.Size} size * @param {OpenLayers.Size} size
*/ */
initialize: function(bounds, url, size) { initialize: function(grid, bounds, url, size) {
OpenLayers.Tile.prototype.initialize.apply(this, arguments); OpenLayers.Tile.prototype.initialize.apply(this, arguments);
this.features = new Array(); this.features = new Array();