{"action":"created","issue":{"url":"https://api.github.com/repos/Leaflet/Leaflet.toolbar/issues/29","labels_url":"https://api.github.com/repos/Leaflet/Leaflet.toolbar/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/Leaflet/Leaflet.toolbar/issues/29/comments","events_url":"https://api.github.com/repos/Leaflet/Leaflet.toolbar/issues/29/events","html_url":"https://github.com/Leaflet/Leaflet.toolbar/issues/29","id":98965505,"number":29,"title":"leaflet beta 1","user":{"login":"ivanmobigis","id":13030688,"avatar_url":"https://avatars.githubusercontent.com/u/13030688?v=3","gravatar_id":"","url":"https://api.github.com/users/ivanmobigis","html_url":"https://github.com/ivanmobigis","followers_url":"https://api.github.com/users/ivanmobigis/followers","following_url":"https://api.github.com/users/ivanmobigis/following{/other_user}","gists_url":"https://api.github.com/users/ivanmobigis/gists{/gist_id}","starred_url":"https://api.github.com/users/ivanmobigis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivanmobigis/subscriptions","organizations_url":"https://api.github.com/users/ivanmobigis/orgs","repos_url":"https://api.github.com/users/ivanmobigis/repos","events_url":"https://api.github.com/users/ivanmobigis/events{/privacy}","received_events_url":"https://api.github.com/users/ivanmobigis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-04T13:12:57Z","updated_at":"2015-08-04T13:49:12Z","closed_at":null,"body":"Hi there,\r\n\r\nDoes tool work with Leaflet 1b ? I'm getting:\r\n```\r\nTypeError: Cannot read property 'call' of undefined\r\n    at L.Map.L.Evented.extend.whenReady (leaflet-src.js:2331)\r\n    at L.Map.include.addLayer (leaflet-src.js:2510)\r\n    at L.Toolbar.L.Class.extend.addTo (leaflet.toolbar-src.js:26)\r\n    at mapController.js:286\r\n    at angular.min.js:120\r\n    at n.$get.n.$eval (angular.min.js:134)\r\n    at n.$get.n.$digest (angular.min.js:132)\r\n    at n.$get.n.$apply (angular.min.js:135)\r\n    at l (angular.min.js:87)\r\n    at F (angular.min.js:91)\r\n```\r\nwhereby the L.Toolbar.Control object doesn't have a ._layerAdd callback on it. Adding an empty function just uncovers a new error. Am i on uncharterted  / unsupported waters ?\r\n\r\nthanks\r\n\r\n-i"},"comment":{"url":"https://api.github.com/repos/Leaflet/Leaflet.toolbar/issues/comments/127619130","html_url":"https://github.com/Leaflet/Leaflet.toolbar/issues/29#issuecomment-127619130","issue_url":"https://api.github.com/repos/Leaflet/Leaflet.toolbar/issues/29","id":127619130,"user":{"login":"ivanmobigis","id":13030688,"avatar_url":"https://avatars.githubusercontent.com/u/13030688?v=3","gravatar_id":"","url":"https://api.github.com/users/ivanmobigis","html_url":"https://github.com/ivanmobigis","followers_url":"https://api.github.com/users/ivanmobigis/followers","following_url":"https://api.github.com/users/ivanmobigis/following{/other_user}","gists_url":"https://api.github.com/users/ivanmobigis/gists{/gist_id}","starred_url":"https://api.github.com/users/ivanmobigis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivanmobigis/subscriptions","organizations_url":"https://api.github.com/users/ivanmobigis/orgs","repos_url":"https://api.github.com/users/ivanmobigis/repos","events_url":"https://api.github.com/users/ivanmobigis/events{/privacy}","received_events_url":"https://api.github.com/users/ivanmobigis/received_events","type":"User","site_admin":false},"created_at":"2015-08-04T13:49:12Z","updated_at":"2015-08-04T13:49:12Z","body":"no problem, the 'minimal' example shows the same problem (i had started from there ;)).. makes me think i'm doing something wrong ?\r\n\r\nhope this helps,\r\n\r\n-i\r\n\r\n\r\n\r\n\t<!DOCTYPE html>\r\n\t<html>\r\n\t<head>\r\n\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"http://leaflet.github.io/Leaflet.toolbar//node_modules/leaflet/dist/leaflet.css\" />\r\n\t\t<link rel=\"stylesheet\" href=\"http://leaflet.github.io/Leaflet.toolbar/dist/leaflet.toolbar.css\"/>\r\n\t\t\r\n\t\t<script src=\"//cdn.leafletjs.com/leaflet-1.0.0-b1/leaflet-src.js\"></script>\r\n\t\t<script src=\"http://leaflet.github.io/Leaflet.toolbar/dist/leaflet.toolbar-src.js\"></script>\r\n\t\t\r\n\t\t<style>\r\n\t\t\thtml, body, #map { margin: 0; height: 100%; width: 100%; }\r\n\t\t</style>\r\n\t</head>\r\n\t<body>\r\n\t\t<div id=\"map\"></div>\r\n\t\t<script>\r\n\t\t\tvar map = L.map('map').setView([41.7896, -87.5996], 15);\r\n\r\n\t\t\tL.tileLayer(\"http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png\", {\r\n\t\t\t\tattribution: '<a href=\"http://openstreetmap.org/copyright\">OpenStreetMap Contributors</a>'\r\n\t\t\t}).addTo(map);\r\n\r\n\t\t\tvar MyCustomAction = L.ToolbarAction.extend({\r\n\r\n\t\t\t\toptions: {\r\n\t\t\t\t\ttoolbarIcon: {\r\n\t\t\t\t\t\thtml: '&#9873;',\r\n\t\t\t\t\t\ttooltip: 'Go to the Eiffel Tower'\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\r\n\t\t\t\taddHooks: function () {\r\n\t\t\t\t\tmap.setView([48.85815, 2.29420], 19);\r\n\t\t\t\t}\r\n\r\n\t\t\t});\r\n\r\n\t\t\tnew L.Toolbar.Control({\r\n\t\t\t\tactions: [MyCustomAction]\r\n\t\t\t}).addTo(map);\r\n\t\t</script>\r\n\t</body>\r\n\t</html>\r\n\r\n\r\n\r\n\r\n"}}