1 /* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
 
   2  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
 
   3  * text of the license. */
 
   7  * @class This is a class designed to designate a single tile, however
 
   8  * it is explicitly designed to do relatively little. Tiles store information
 
   9  * about themselves -- such as the URL that they are related to, and their 
 
  10  * size - but do not add themselves to the layer div automatically, for 
 
  13 OpenLayers.Tile = Class.create();
 
  14 OpenLayers.Tile.prototype = {
 
  16     /** @type OpenLayers.Layer */
 
  19     /** @type String url of the request */
 
  22     /** @type OpenLayers.Bounds */
 
  25     /** @type OpenLayers.Size */
 
  28     /** Top Left pixel of the tile
 
  29     * @type OpenLayers.Pixel */
 
  35     * @param {OpenLayers.Layer} layer
 
  36     * @param {OpenLayers.Pixel} position
 
  37     * @param {OpenLayers.Bounds} bounds
 
  39     * @param {OpenLayers.Size} size
 
  41     initialize: function(layer, position, bounds, url, size) {
 
  42         if (arguments.length > 0) {
 
  44             this.position = position;
 
  51     /** nullify references to prevent circular references and memory leaks
 
  63     // HACK HACK - should we make it a standard to put this sort of warning
 
  64     //             message in functions that are supposed to be overridden?
 
  66     //        Log.warn(this.CLASS_NAME + ": draw() not implemented");
 
  70     /** remove this tile from the ds
 
  76     * @type OpenLayers.Pixel
 
  78     getPosition: function() {
 
  82     /** @final @type String */
 
  83     CLASS_NAME: "OpenLayers.Tile"