[OpenLayers-Commits] r12397 - sandbox/jsdoc/jsd/OpenLayers/Layer

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Sat Sep 17 16:53:23 EDT 2011


Author: mpriour
Date: 2011-09-17 13:53:20 -0700 (Sat, 17 Sep 2011)
New Revision: 12397

Modified:
   sandbox/jsdoc/jsd/OpenLayers/Layer/Grid.js
Log:
doc changes Grid.js

Modified: sandbox/jsdoc/jsd/OpenLayers/Layer/Grid.js
===================================================================
--- sandbox/jsdoc/jsd/OpenLayers/Layer/Grid.js	2011-09-17 20:49:21 UTC (rev 12396)
+++ sandbox/jsdoc/jsd/OpenLayers/Layer/Grid.js	2011-09-17 20:53:20 UTC (rev 12397)
@@ -10,108 +10,119 @@
  */
 
 /**
- * Class: OpenLayers.Layer.Grid
+ * @namespace OpenLayers.Layer
+ * @class
+ * @classdesc
  * Base class for layers that use a lattice of tiles.  Create a new grid
  * layer with the <OpenLayers.Layer.Grid> constructor.
  *
- * Inherits from:
  *  @extends OpenLayers.Layer.HTTPRequest
  */
 OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
     
     /**
-     * APIProperty: tileSize
+     * @memberOf OpenLayers.Layer.Grid.prototype.prototype
      * @type {OpenLayers.Size} 
      */
     tileSize: null,
 
     /**
-     * Property: tileOriginCorner
-     * @type {string}  If the <tileOrigin> property is not provided, the tile origin 
+     * If the <tileOrigin> @memberOf OpenLayers.Layer.Grid.prototype is not provided, the tile origin 
      *     will be derived from the layer's <maxExtent>.  The corner of the 
-     *     <maxExtent> used is determined by this property.  Acceptable values
+     *     <maxExtent> used is determined by this @memberOf OpenLayers.Layer.Grid.prototype.  Acceptable values
      *     are "tl" (top left), "tr" (top right), "bl" (bottom left), and "br"
      *     (bottom right).  Default is "bl".
+     * @memberOf OpenLayers.Layer.Grid.prototype
+     * @type {string}  
      */
     tileOriginCorner: "bl",
     
     /**
-     * APIProperty: tileOrigin
-     * @type {OpenLayers.LonLat}  Optional origin for aligning the grid of tiles.
+     * Optional origin for aligning the grid of tiles.
      *     If provided, requests for tiles at all resolutions will be aligned
      *     with this location (no tiles shall overlap this location).  If
      *     not provided, the grid of tiles will be aligned with the layer's
      *     <maxExtent>.  Default is ``null``.
+     * @memberOf OpenLayers.Layer.Grid.prototype
+     * @type {OpenLayers.LonLat}  
      */
     tileOrigin: null,
     
-    /** APIProperty: tileOptions
-     *  @type {Object}  optional configuration options for <OpenLayers.Tile> instances
+    /** 
+     * optional configuration options for <OpenLayers.Tile> instances
      *  created by this Layer, if supported by the tile class.
+     * @memberOf OpenLayers.Layer.Grid.prototype
+     *  @type {Object}  
      */
     tileOptions: null,
     
     /**
-     * Property: grid
-     * @type {Array.<Array.<OpenLayers.Tile>>}  This is an array of rows, each row is 
+     *   This is an array of rows, each row is 
      *     an array of tiles.
+     * @memberOf OpenLayers.Layer.Grid.prototype
+     * @type {Array.<Array.<OpenLayers.Tile>>}
      */
     grid: null,
 
     /**
-     * APIProperty: singleTile
-     * @type {boolean}  Moves the layer into single-tile mode, meaning that one tile 
+     * Moves the layer into single-tile mode, meaning that one tile 
      *     will be loaded. The tile's size will be determined by the 'ratio'
-     *     property. When the tile is dragged such that it does not cover the 
+     *     @memberOf OpenLayers.Layer.Grid.prototype. When the tile is dragged such that it does not cover the 
      *     entire viewport, it is reloaded.
+     * @memberOf OpenLayers.Layer.Grid.prototype
+     * @type {boolean}  
      */
     singleTile: false,
 
-    /** APIProperty: ratio
-     *  @type {number}  Used only when in single-tile mode, this specifies the 
+    /** 
+     * Used only when in single-tile mode, this specifies the 
      *          ratio of the size of the single tile to the size of the map.
+     * @memberOf OpenLayers.Layer.Grid.prototype
+     *  @type {number}  
      */
     ratio: 1.5,
 
     /**
-     * APIProperty: buffer
-     * @type {number}  Used only when in gridded mode, this specifies the number of 
+     * Used only when in gridded mode, this specifies the number of 
      *           extra rows and colums of tiles on each side which will
      *           surround the minimum grid tiles to cover the map.
      *           For very slow loading layers, a larger value may increase
      *           performance somewhat when dragging, but will increase bandwidth
-     *           use significantly. 
+     *           use significantly.
+     * @memberOf OpenLayers.Layer.Grid.prototype
+     * @type {number}   
      */
     buffer: 0,
 
     /**
-     * APIProperty: numLoadingTiles
-     * @type {number}  How many tiles are still loading?
+     * How many tiles are still loading?
+     * @memberOf OpenLayers.Layer.Grid.prototype
+     * @type {number}  
      */
     numLoadingTiles: 0,
 
     /**
-     * APIProperty: tileLoadingDelay
-     * @type {number}  - Number of milliseconds before we shift and load
+     * Number of milliseconds before we shift and load
      *     tiles. Default is 100.
+     * @memberOf OpenLayers.Layer.Grid.prototype
+     * @type {number}
      */
     tileLoadingDelay: 100,
 
     /**
-     * Property: timerId
-     * @type {number}  - The id of the tileLoadingDelay timer.
+     * The id of the tileLoadingDelay timer.
+     * @memberOf OpenLayers.Layer.Grid.prototype
+     * @type {number}
      */
     timerId: null,
 
     /**
-     * @constructor Constructor: OpenLayers.Layer.Grid
      * Create a new grid layer
-     *
-     * Parameters:
+     * @constructor OpenLayers.Layer.Grid
      * @param {string} name 
      * @param {string} url 
      * @param {Object} params 
-     * @param {Object=} options options - {Object} Hashtable of extra options to tag onto the layer
+     * @param {Object} options Hashtable of extra options to tag onto the layer
      */
     initialize: function(name, url, params, options) {
         OpenLayers.Layer.HTTPRequest.prototype.initialize.apply(this, 
@@ -132,10 +143,8 @@
     },
 
     /**
-     * Method: removeMap
      * Called when the layer is removed from the map.
-     *
-     * Parameters:
+     * @memberOf OpenLayers.Layer.Grid.prototype
      * @param {OpenLayers.Map} map  The map.
      */
     removeMap: function(map) {
@@ -146,8 +155,8 @@
     },
 
     /**
-     * APIMethod: destroy
      * Deconstruct the layer and clear the grid.
+     * @memberOf OpenLayers.Layer.Grid.prototype
      */
     destroy: function() {
         this.clearGrid();
@@ -157,9 +166,9 @@
     },
 
     /**
-     * Method: clearGrid
      * Go through and remove all tiles from the grid, calling
      *    destroy() on each of them to kill circular references
+     * @memberOf OpenLayers.Layer.Grid.prototype
      */
     clearGrid:function() {
         if (this.grid) {
@@ -176,13 +185,9 @@
     },
 
     /**
-     * APIMethod: clone
      * Create a clone of this layer
-     *
-     * Parameters:
+     * @memberOf OpenLayers.Layer.Grid.prototype
      * @param {Object} obj  Is this ever used?
-     * 
-     * Returns:
      * @return {OpenLayers.Layer.Grid}  An exact clone of this OpenLayers.Layer.Grid
      */
     clone: function (obj) {
@@ -209,12 +214,11 @@
     },    
 
     /**
-     * Method: moveTo
      * This function is called whenever the map is moved. All the moving
      * 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.
      *
-     * Parameters:
+     * @memberOf OpenLayers.Layer.Grid.prototype
      * @param {OpenLayers.Bounds} bounds 
      * @param {boolean} zoomChanged 
      * @param {boolean} dragging 
@@ -258,10 +262,8 @@
     },
 
     /**
-     * Method: moveByPx
      * Move the layer based on pixel vector.
-     *
-     * Parameters:
+     * @memberOf OpenLayers.Layer.Grid.prototype
      * @param {number} dx 
      * @param {number} dy 
      */
@@ -272,8 +274,8 @@
     },
 
     /**
-     * Method: scheduleMoveGriddedTiles
      * Schedule the move of tiles.
+     * @memberOf OpenLayers.Layer.Grid.prototype
      */
     scheduleMoveGriddedTiles: function() {
         if (this.timerId != null) {
@@ -286,11 +288,9 @@
     },
     
     /**
-     * APIMethod: setTileSize
      * Check if we are in singleTile mode and if so, set the size as a ratio
-     *     of the map size (as specified by the layer's 'ratio' property).
-     * 
-     * Parameters:
+     *     of the map size (as specified by the layer's 'ratio' @memberOf OpenLayers.Layer.Grid.prototype).
+     * @memberOf OpenLayers.Layer.Grid.prototype: setTileSize
      * @param {OpenLayers.Size} size 
      */
     setTileSize: function(size) { 
@@ -303,11 +303,10 @@
     },
         
     /**
-     * Method: getGridBounds
-     * Deprecated. This function will be removed in 3.0. Please use 
+     * This function will be removed in 3.0. Please use 
      *     getTilesBounds() instead.
-     * 
-     * Returns:
+     * @memberOf OpenLayers.Layer.Grid.prototype
+     * @deprecated. 
      * @return {OpenLayers.Bounds}  A Bounds object representing the bounds of all the
      * currently loaded tiles (including those partially or not at all seen 
      * onscreen)
@@ -320,10 +319,8 @@
     },
 
     /**
-     * APIMethod: getTilesBounds
      * Return the bounds of the tile grid.
-     *
-     * Returns:
+     * @memberOf OpenLayers.Layer.Grid.prototype
      * @return {OpenLayers.Bounds}  A Bounds object representing the bounds of all the
      *     currently loaded tiles (including those partially or not at all seen 
      *     onscreen).
@@ -348,9 +345,7 @@
     },
 
     /**
-     * Method: initSingleTile
-     * 
-     * Parameters: 
+     * @memberOf OpenLayers.Layer.Grid.prototype
      * @param {OpenLayers.Bounds} bounds 
      */
     initSingleTile: function(bounds) {
@@ -389,16 +384,13 @@
     },
 
     /** 
-     * Method: calculateGridLayout
      * Generate parameters for the grid layout.
-     *
-     * Parameters:
+     * @memberOf OpenLayers.Layer.Grid.prototype
      * @param {OpenLayers.Bound} bounds 
      * @param {OpenLayers.LonLat} origin 
      * @param {number} resolution 
      *
-     * Returns:
-     * Object containing properties tilelon, tilelat, tileoffsetlat,
+     * @return {Object} object containing properties tilelon, tilelat, tileoffsetlat,
      * tileoffsetlat, tileoffsetx, tileoffsety
      */
     calculateGridLayout: function(bounds, origin, resolution) {
@@ -426,14 +418,13 @@
     },
     
     /**
-     * Method: getTileOrigin
      * Determine the origin for aligning the grid of tiles.  If a <tileOrigin>
-     *     property is supplied, that will be returned.  Otherwise, the origin
-     *     will be derived from the layer's <maxExtent> property.  In this case,
+     *     is supplied, that will be returned.  Otherwise, the origin
+     *     will be derived from the layer's <maxExtent>.  In this case,
      *     the tile origin will be the corner of the <maxExtent> given by the 
-     *     <tileOriginCorner> property.
+     *     <tileOriginCorner>.
+     * @memberOf OpenLayers.Layer.Grid.prototype
      *
-     * Returns:
      * @return {OpenLayers.LonLat}  The tile origin.
      */
     getTileOrigin: function() {
@@ -452,9 +443,7 @@
     },
 
     /**
-     * Method: initGriddedTiles
-     * 
-     * Parameters:
+     * @memberOf OpenLayers.Layer.Grid.prototype
      * @param {OpenLayers.Bounds} bounds 
      */
     initGriddedTiles:function(bounds) {
@@ -545,11 +534,10 @@
     },
 
     /**
-     * Method: getMaxExtent
      * Get this layer's maximum extent. (Implemented as a getter for
      *     potential specific implementations in sub-classes.)
      *
-     * Returns:
+     * @memberOf OpenLayers.Layer.Grid.prototype
      * @return {OpenLayers.Bounds} 
      */
     getMaxExtent: function() {
@@ -557,7 +545,6 @@
     },
     
     /**
-     * Method: spiralTileLoad
      *   Starts at the top right corner of the grid and proceeds in a spiral 
      *    towards the center, adding tiles one at a time to the beginning of a 
      *    queue. 
@@ -565,6 +552,7 @@
      *   Once all the grid's tiles have been added to the queue, we go back 
      *    and iterate through the queue (thus reversing the spiral order from 
      *    outside-in to inside-out), calling draw() on each tile. 
+     * @memberOf OpenLayers.Layer.Grid.prototype
      */
     spiralTileLoad: function() {
         var tileQueue = [];
@@ -630,14 +618,12 @@
     },
 
     /**
-     * APIMethod: addTile
-     * Create a tile, initialize it, and add it to the layer div. 
-     *
-     * Parameters
+     * Create a tile, initialize it, and add it to the layer div.
+     * @memberOf OpenLayers.Layer.Grid.prototype
+
      * bounds - {<OpenLayers.Bounds>}
      * position - {<OpenLayers.Pixel>}
      *
-     * Returns:
      * @return {OpenLayers.Tile}  The added OpenLayers.Tile
      */
     addTile:function(bounds, position) {
@@ -646,11 +632,9 @@
     },
     
     /** 
-     * Method: addTileMonitoringHooks
      * This function takes a tile as input and adds the appropriate hooks to 
      *     the tile so that the layer can keep track of the loading tiles.
-     * 
-     * Parameters: 
+     * @memberOf OpenLayers.Layer.Grid.prototype
      * @param {OpenLayers.Tile} tile 
      */
     addTileMonitoringHooks: function(tile) {
@@ -677,11 +661,9 @@
     },
 
     /** 
-     * Method: removeTileMonitoringHooks
      * This function takes a tile as input and removes the tile hooks 
      *     that were added in addTileMonitoringHooks()
-     * 
-     * Parameters: 
+     * @memberOf OpenLayers.Layer.Grid.prototype
      * @param {OpenLayers.Tile} tile 
      */
     removeTileMonitoringHooks: function(tile) {
@@ -695,7 +677,7 @@
     },
     
     /**
-     * Method: moveGriddedTiles
+     * @memberOf OpenLayers.Layer.Grid.prototype: moveGriddedTiles
      */
     moveGriddedTiles: function() {
         var shifted = true;
@@ -724,10 +706,8 @@
     },
 
     /**
-     * Method: shiftRow
      * Shifty grid work
-     *
-     * Parameters:
+     * @memberOf OpenLayers.Layer.Grid.prototype
      * @param {boolean} prepend  if true, prepend to beginning.
      *                          if false, then append to end
      */
@@ -760,10 +740,8 @@
     },
 
     /**
-     * Method: shiftColumn
      * Shift grid work in the other dimension
-     *
-     * Parameters:
+     * @memberOf OpenLayers.Layer.Grid.prototype
      * @param {boolean} prepend  if true, prepend to beginning.
      *                          if false, then append to end
      */
@@ -794,11 +772,9 @@
     },
     
     /**
-     * Method: removeExcessTiles
      * When the size of the map or the buffer changes, we may need to
      *     remove some excess rows and columns.
-     * 
-     * Parameters:
+     * @memberOf OpenLayers.Layer.Grid.prototype
      * @param {number} rows  Maximum number of rows we want our grid to have.
      * @param {number} columns  Maximum number of columns we want our grid to have.
      */
@@ -826,9 +802,9 @@
     },
 
     /**
-     * Method: onMapResize
      * For singleTile layers, this will set a new tile size according to the
      * dimensions of the map pane.
+     * @memberOf OpenLayers.Layer.Grid.prototype: onMapResize
      */
     onMapResize: function() {
         if (this.singleTile) {
@@ -838,13 +814,9 @@
     },
     
     /**
-     * APIMethod: getTileBounds
      * Returns The tile bounds for a layer given a pixel location.
-     *
-     * Parameters:
+     * @memberOf OpenLayers.Layer.Grid.prototype
      * @param {OpenLayers.Pixel} viewPortPx  The location in the viewport.
-     *
-     * Returns:
      * @return {OpenLayers.Bounds}  Bounds of the tile at the given pixel location.
      */
     getTileBounds: function(viewPortPx) {



More information about the Commits mailing list