I think we decided to name events in a noun+verb fashion.
This commit is contained in:
@@ -17,7 +17,7 @@ goog.require('goog.asserts');
|
||||
* @export
|
||||
* @constructor
|
||||
*
|
||||
* @event addlayer Fires when a layer is added to the map. The event object
|
||||
* @event layeradd Fires when a layer is added to the map. The event object
|
||||
* contains a 'layer' property referencing the added layer.
|
||||
*/
|
||||
ol.Map = function() {
|
||||
@@ -394,7 +394,7 @@ ol.Map.prototype.addLayers = function(layers) {
|
||||
for (var i=0, ii=layers.length; i<ii; ++i) {
|
||||
layer = layers[i];
|
||||
this.layers_.push(layer);
|
||||
this.events_.triggerEvent('addlayer', {'layer': layer});
|
||||
this.events_.triggerEvent('layeradd', {'layer': layer});
|
||||
}
|
||||
this.conditionallyRender();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user