patch for #831 - simplify the notion of untiled (now an option on grid layers called 'singleTile') and implementing loading events for gridded/untiled layers. thanks tim and chris for reviewing this beast.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@3725 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -21,6 +21,19 @@ OpenLayers.Tile = OpenLayers.Class.create();
|
||||
OpenLayers.Tile.prototype = {
|
||||
|
||||
/**
|
||||
* Constant: EVENT_TYPES
|
||||
* {Array(String)} Supported application event types
|
||||
*/
|
||||
EVENT_TYPES: [ "loadstart", "loadend", "reload"],
|
||||
|
||||
/**
|
||||
* APIProperty: events
|
||||
* {<OpenLayers.Events>} An events object that handles all
|
||||
* events on the tile.
|
||||
*/
|
||||
events: null,
|
||||
|
||||
/**
|
||||
* Property: id
|
||||
* {String} null
|
||||
*/
|
||||
@@ -66,6 +79,12 @@ OpenLayers.Tile.prototype = {
|
||||
*/
|
||||
drawn: false,
|
||||
|
||||
/**
|
||||
* Property: isLoading
|
||||
* {Boolean} Is the tile loading?
|
||||
*/
|
||||
isLoading: false,
|
||||
|
||||
/** TBD 3.0 -- remove 'url' from the list of parameters to the constructor.
|
||||
* there is no need for the base tile class to have a url.
|
||||
*
|
||||
@@ -88,6 +107,8 @@ OpenLayers.Tile.prototype = {
|
||||
|
||||
//give the tile a unique id based on its BBOX.
|
||||
this.id = OpenLayers.Util.createUniqueID("Tile_");
|
||||
|
||||
this.events = new OpenLayers.Events(this, null, this.EVENT_TYPES);
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -99,6 +120,9 @@ OpenLayers.Tile.prototype = {
|
||||
this.bounds = null;
|
||||
this.size = null;
|
||||
this.position = null;
|
||||
|
||||
this.events.destroy();
|
||||
this.events = null;
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user