From 88f1e121eea6772955fdc01629ef35ba49cd48a6 Mon Sep 17 00:00:00 2001 From: Calvin Metcalf Date: Wed, 16 Jan 2013 18:20:20 -0500 Subject: [PATCH] overlay events --- src/control/Control.Layers.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/control/Control.Layers.js b/src/control/Control.Layers.js index 282dd296..bd9d0601 100644 --- a/src/control/Control.Layers.js +++ b/src/control/Control.Layers.js @@ -217,9 +217,12 @@ L.Control.Layers = L.Control.extend({ this._map.addLayer(obj.layer); if (!obj.overlay) { baseLayer = obj.layer; + } else { + this._map.fire('overlaylayeradd', {layer: obj}); } } else if (!input.checked && this._map.hasLayer(obj.layer)) { this._map.removeLayer(obj.layer); + this._map.fire('overlaylayerremoved', {layer: obj}); } }