2 * Popup extension to L.Path (polylines, polygons, circles), adding bindPopup method.
6 bindPopup: function(content
, options
) {
7 if (!this._popup
|| this._popup
.options
!== options
) {
8 this._popup
= new L
.Popup(options
);
10 this._popup
.setContent(content
);
12 if (!this._openPopupAdded
) {
13 this.on('click', this._openPopup
, this);
14 this._openPopupAdded
= true;
20 _openPopup: function(e
) {
21 this._popup
.setLatLng(e
.latlng
);
22 this._map
.openPopup(this._popup
);