From 5eb4f4686dbf1769f87daa8b0856e53564db0a8b Mon Sep 17 00:00:00 2001 From: mourner Date: Mon, 14 Jan 2013 00:23:04 +0200 Subject: [PATCH] fix a bug with FeatureGroup bindPopup not accepting options --- src/layer/FeatureGroup.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/layer/FeatureGroup.js b/src/layer/FeatureGroup.js index 6d0eaf7a..51b8042c 100644 --- a/src/layer/FeatureGroup.js +++ b/src/layer/FeatureGroup.js @@ -20,7 +20,7 @@ L.FeatureGroup = L.LayerGroup.extend({ L.LayerGroup.prototype.addLayer.call(this, layer); if (this._popupContent && layer.bindPopup) { - layer.bindPopup(this._popupContent); + layer.bindPopup(this._popupContent, this._popupOptions); } return this.fire('layeradd', {layer: layer}); @@ -39,9 +39,10 @@ L.FeatureGroup = L.LayerGroup.extend({ return this.fire('layerremove', {layer: layer}); }, - bindPopup: function (content) { + bindPopup: function (content, options) { this._popupContent = content; - return this.invoke('bindPopup', content); + this._popupOptions = options; + return this.invoke('bindPopup', content, options); }, setStyle: function (style) {