From 6f78dc4c8f53e2c7a4f04573fc145e5c2d151599 Mon Sep 17 00:00:00 2001 From: fredj Date: Wed, 30 Nov 2011 09:29:24 +0100 Subject: [PATCH] Remove call to deprecated events.addEventType function --- lib/OpenLayers/Layer/Grid.js | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index 495f657aa9..be35eb26fe 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -138,6 +138,26 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { */ backBufferLonLat: null, + /** + * Register a listener for a particular event with the following syntax: + * (code) + * layer.events.register(type, obj, listener); + * (end) + * + * Listeners will be called with a reference to an event object. The + * properties of this event depends on exactly what happened. + * + * All event objects have at least the following properties: + * object - {Object} A reference to layer.events.object. + * element - {DOMElement} A reference to layer.events.element. + * + * Supported event types: + * tileloaded - Triggered when each new tile is + * loaded, as a means of progress update to listeners. + * listeners can access 'numLoadingTiles' if they wish to keep + * track of the loading progress. + */ + /** * Constructor: OpenLayers.Layer.Grid * Create a new grid layer @@ -151,14 +171,6 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { initialize: function(name, url, params, options) { OpenLayers.Layer.HTTPRequest.prototype.initialize.apply(this, arguments); - - //grid layers will trigger 'tileloaded' when each new tile is - // loaded, as a means of progress update to listeners. - // listeners can access 'numLoadingTiles' if they wish to keep track - // of the loading progress - // - this.events.addEventType("tileloaded"); - this.grid = []; this._moveGriddedTiles = OpenLayers.Function.bind(