{"action":"created","issue":{"url":"https://api.github.com/repos/Leaflet/Leaflet/issues/4530","repository_url":"https://api.github.com/repos/Leaflet/Leaflet","labels_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/4530/labels{/name}","comments_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/4530/comments","events_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/4530/events","html_url":"https://github.com/Leaflet/Leaflet/pull/4530","id":152752000,"number":4530,"title":"Added plugin LayerGroupWithEvents.","user":{"login":"glathoud","id":2437470,"avatar_url":"https://avatars.githubusercontent.com/u/2437470?v=3","gravatar_id":"","url":"https://api.github.com/users/glathoud","html_url":"https://github.com/glathoud","followers_url":"https://api.github.com/users/glathoud/followers","following_url":"https://api.github.com/users/glathoud/following{/other_user}","gists_url":"https://api.github.com/users/glathoud/gists{/gist_id}","starred_url":"https://api.github.com/users/glathoud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glathoud/subscriptions","organizations_url":"https://api.github.com/users/glathoud/orgs","repos_url":"https://api.github.com/users/glathoud/repos","events_url":"https://api.github.com/users/glathoud/events{/privacy}","received_events_url":"https://api.github.com/users/glathoud/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-05-03T11:27:16Z","updated_at":"2016-05-03T15:31:56Z","closed_at":"2016-05-03T15:09:51Z","pull_request":{"url":"https://api.github.com/repos/Leaflet/Leaflet/pulls/4530","html_url":"https://github.com/Leaflet/Leaflet/pull/4530","diff_url":"https://github.com/Leaflet/Leaflet/pull/4530.diff","patch_url":"https://github.com/Leaflet/Leaflet/pull/4530.patch"},"body":"Rationale: \r\n- TileLayer fires \"loading\" and \"load\" events, making e.g. tile loading indicators possible (e.g. plugin Leaflet.loading).\r\n- LayerGroup does not support any event.\r\n\r\nContent: LayerGroupWithEvents extends LayerGroup to add event support (\"loading\" and \"load\").\r\n\r\nFor more details: https://github.com/Outdooractive/leaflet-layergroup-with-events_0.7\r\n\r\nRemark: a direct modification of Leaflet's core's LayerGroup could be possible, but might be [too much code](https://github.com/glathoud/Leaflet-layergroup-loading-load/commit/a6b3515ddb58054239b206a466237848f39c7cf6) for what it does."},"comment":{"url":"https://api.github.com/repos/Leaflet/Leaflet/issues/comments/216567230","html_url":"https://github.com/Leaflet/Leaflet/pull/4530#issuecomment-216567230","issue_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/4530","id":216567230,"user":{"login":"IvanSanchez","id":1125786,"avatar_url":"https://avatars.githubusercontent.com/u/1125786?v=3","gravatar_id":"","url":"https://api.github.com/users/IvanSanchez","html_url":"https://github.com/IvanSanchez","followers_url":"https://api.github.com/users/IvanSanchez/followers","following_url":"https://api.github.com/users/IvanSanchez/following{/other_user}","gists_url":"https://api.github.com/users/IvanSanchez/gists{/gist_id}","starred_url":"https://api.github.com/users/IvanSanchez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IvanSanchez/subscriptions","organizations_url":"https://api.github.com/users/IvanSanchez/orgs","repos_url":"https://api.github.com/users/IvanSanchez/repos","events_url":"https://api.github.com/users/IvanSanchez/events{/privacy}","received_events_url":"https://api.github.com/users/IvanSanchez/received_events","type":"User","site_admin":false},"created_at":"2016-05-03T15:31:56Z","updated_at":"2016-05-03T15:31:56Z","body":"@glathoud Yeah, that looks like a bug in `L.Control.Loading` rather than a need for a new plugin.\r\n\r\nYou could also modify `L.Control.Loading` to do something like\r\n\r\n```\r\nif (layer instanceof L.GridLayer) {\r\n    layer.on('loading load', ....)\r\n}\r\n```\r\n, as (if memory serves) only gridlayers (and tilelayers) fire these events."}}