patch for #452 - Adding events to Layer class to signal the start, end, and cancelling of a layer load. Thanks to Bart for the idea and followthrough with this patch.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2200 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -18,6 +18,15 @@ OpenLayers.Layer.prototype = {
|
||||
/** @type DOMElement */
|
||||
div: null,
|
||||
|
||||
/** supported application event types
|
||||
*
|
||||
* @type Array */
|
||||
EVENT_TYPES: [
|
||||
"loadstart", "loadend", "loadcancel"],
|
||||
|
||||
/** @type OpenLayers.Events */
|
||||
events: null,
|
||||
|
||||
/** This variable is set when the layer is added to the map, via the
|
||||
* accessor function setMap()
|
||||
*
|
||||
@@ -121,6 +130,8 @@ OpenLayers.Layer.prototype = {
|
||||
this.div.style.height = "100%";
|
||||
this.div.id = this.id;
|
||||
}
|
||||
|
||||
this.events = new OpenLayers.Events(this, this.div, this.EVENT_TYPES);
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -135,6 +146,7 @@ OpenLayers.Layer.prototype = {
|
||||
this.name = null;
|
||||
this.div = null;
|
||||
this.options = null;
|
||||
this.events = null;
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user