Leaflet/Leaflet — pull request #2196 by luiscamachopt (2013-11-18 17:34:13+00:00)
Title: FeatureGroup: sublayers only listens for events that the FeatureGroup is listening for

Hi
Currently, UI and vector layers allow for click events to reach the map (if no listeners are added). L.GeoJSON, L.MultiPolyline and L.MultiPolygon do not - their sublayers grab all events even if they are not listening for any events themselves.

This commit makes sublayers to only listen for events that the featureGroup is listening for.

Changed L.GeoJSON and MultiPoly so that the subclasses of FeatureGroup call the parent constructor instead of setting _layers directly (also because L.FeatureGroup.initialize now does more than just setting that)

This PR also acomplishes the target of https://github.com/Leaflet/Leaflet/pull/1107