give layer an "added" and "removed" event. p=mpriour,me r=me (closes #2983)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@11052 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2011-01-22 12:04:40 +00:00
parent f73fb689a8
commit 4a9460b314
5 changed files with 39 additions and 40 deletions

View File

@@ -81,9 +81,15 @@ OpenLayers.Layer = OpenLayers.Class({
* moveend - Triggered when layer is done moving, object passed as
* argument has a zoomChanged boolean property which tells that the
* zoom has changed.
* added - Triggered after the layer is added to a map. Listeners will
* receive an object with a *map* property referencing the map and a
* *layer* property referencing the layer.
* removed - Triggered after the layer is removed from the map. Listeners
* will receive an object with a *map* property referencing the map and
* a *layer* property referencing the layer.
*/
EVENT_TYPES: ["loadstart", "loadend", "loadcancel", "visibilitychanged",
"move", "moveend"],
"move", "moveend", "added", "removed"],
/**
* Constant: RESOLUTION_PROPERTIES