code: function(tile) {
          tile.onLoadStart = function() {
              this.events.triggerEvent("loadstart");
          };
          tile.events.register("loadstart", this, tile.onLoadStart);
        
          tile.onLoadEnd = function() {
              this.events.triggerEvent("loadend");
          };
          tile.events.register("loadend", this, tile.onLoadEnd);
          tile.events.register("unload", this, tile.onLoadEnd);
      }
docs: 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:
  tile - {<OpenLayers.Tile>}