jsdoc Grid.js

git-svn-id: http://svn.openlayers.org/trunk/openlayers@889 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-07-06 01:39:19 +00:00
parent b848e824d7
commit 353c7b810d

View File

@@ -3,25 +3,33 @@
* text of the license. */ * text of the license. */
// @require: OpenLayers/Layer.js // @require: OpenLayers/Layer.js
// @require: OpenLayers/Util.js // @require: OpenLayers/Util.js
/**
* @class
*/
OpenLayers.Layer.Grid = Class.create(); OpenLayers.Layer.Grid = Class.create();
OpenLayers.Layer.Grid.prototype = OpenLayers.Layer.Grid.prototype =
Object.extend( new OpenLayers.Layer.HTTPRequest(), { Object.extend( new OpenLayers.Layer.HTTPRequest(), {
// tileSize: OpenLayers.Size /** @type OpenLayers.Size */
tileSize: null, tileSize: null,
// grid: Array(Array()) /** this is an array of rows, each row is an array of tiles
// this is an array of rows, each row is an array of tiles *
* @type Array(Array()) */
grid: null, grid: null,
// alpha: boolean /** asserts whether or not the layer's images have an alpha channel
// asserts whether or not the layer's images have an alpha channel *
* @type boolean */
alpha: false, alpha: false,
/** /**
* @param {str} name * @constructor
* @param {str} url *
* @param {hash} params * @param {String} name
* @param {String} url
* @param {Object} params
* @param {Object} options Hash of extra options to tag onto the layer * @param {Object} options Hash of extra options to tag onto the layer
*/ */
initialize: function(name, url, params, options) { initialize: function(name, url, params, options) {
@@ -29,7 +37,7 @@ OpenLayers.Layer.Grid.prototype =
arguments); arguments);
}, },
/** /** on destroy, clear the grid.
* *
*/ */
destroy: function() { destroy: function() {
@@ -52,6 +60,8 @@ OpenLayers.Layer.Grid.prototype =
/** /**
* @deprecated User should just set the 'tileSize' via options * @deprecated User should just set the 'tileSize' via options
*
* @param {OpenLayers.Size} size
*/ */
setTileSize: function (size) { setTileSize: function (size) {
if (size) if (size)
@@ -62,7 +72,7 @@ OpenLayers.Layer.Grid.prototype =
* of actual 'tiles' is done by the map, but moveTo's role is to accept * of actual 'tiles' is done by the map, but moveTo's role is to accept
* a bounds and make sure the data that that bounds requires is pre-loaded. * a bounds and make sure the data that that bounds requires is pre-loaded.
* *
* @param {OpenLayers.Bounds} * @param {OpenLayers.Bounds} bounds
* @param {Boolean} zoomChanged * @param {Boolean} zoomChanged
*/ */
moveTo:function(bounds, zoomChanged) { moveTo:function(bounds, zoomChanged) {
@@ -91,7 +101,12 @@ OpenLayers.Layer.Grid.prototype =
} }
}, },
/**
* @returns A Bounds object representing the bounds of all the currently
* loaded tiles (including those partially or not at all seen
* onscreen)
* @type OpenLayers.Bounds
*/
getGridBounds:function() { getGridBounds:function() {
var topLeftTile = this.grid[0][0]; var topLeftTile = this.grid[0][0];
var bottomRightTile = this.grid[this.grid.length-1][this.grid[0].length-1]; var bottomRightTile = this.grid[this.grid.length-1][this.grid[0].length-1];
@@ -102,6 +117,7 @@ OpenLayers.Layer.Grid.prototype =
}, },
/** /**
*
*/ */
_initTiles:function() { _initTiles:function() {
@@ -168,7 +184,7 @@ OpenLayers.Layer.Grid.prototype =
}, },
/** /**
* @param {bool} prepend - if true, prepend to beginning. * @param {Boolean} prepend if true, prepend to beginning.
* if false, then append to end * if false, then append to end
*/ */
insertRow:function(prepend) { insertRow:function(prepend) {
@@ -203,7 +219,7 @@ OpenLayers.Layer.Grid.prototype =
}, },
/** /**
* @param {bool} prepend - if true, prepend to beginning. * @param {Boolean} prepend if true, prepend to beginning.
* if false, then append to end * if false, then append to end
*/ */
insertColumn:function(prepend) { insertColumn:function(prepend) {