{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/3497","repository_url":"https://api.github.com/repos/mapbox/mapbox-gl-js","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/3497/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/3497/comments","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/3497/events","html_url":"https://github.com/mapbox/mapbox-gl-js/pull/3497","id":186414298,"number":3497,"title":"Make it obvious how to create Control plugins that do not reference mapboxgl","user":{"login":"tmcw","id":32314,"avatar_url":"https://avatars.githubusercontent.com/u/32314?v=3","gravatar_id":"","url":"https://api.github.com/users/tmcw","html_url":"https://github.com/tmcw","followers_url":"https://api.github.com/users/tmcw/followers","following_url":"https://api.github.com/users/tmcw/following{/other_user}","gists_url":"https://api.github.com/users/tmcw/gists{/gist_id}","starred_url":"https://api.github.com/users/tmcw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmcw/subscriptions","organizations_url":"https://api.github.com/users/tmcw/orgs","repos_url":"https://api.github.com/users/tmcw/repos","events_url":"https://api.github.com/users/tmcw/events{/privacy}","received_events_url":"https://api.github.com/users/tmcw/received_events","type":"User","site_admin":false},"labels":[{"id":340144279,"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/labels/not%20ready%20for%20review","name":"not ready for review","color":"e11d21","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-31T22:19:48Z","updated_at":"2016-11-07T23:03:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/3497","html_url":"https://github.com/mapbox/mapbox-gl-js/pull/3497","diff_url":"https://github.com/mapbox/mapbox-gl-js/pull/3497.diff","patch_url":"https://github.com/mapbox/mapbox-gl-js/pull/3497.patch"},"body":"## Launch Checklist\r\n\r\n<!-- Thanks for the PR! Feel free to add or remove items from the checklist. -->\r\n\r\n - [x] briefly describe the changes in this PR\r\n - [x] write tests for all new functionality\r\n - [x] document any changes to public APIs\r\n - [ ] post benchmark scores\r\n - [x] manually test the debug page\r\n\r\nThis implements part of #1835\r\n\r\n### CHANGES\r\n\r\n- Controls no longer take a `position` option. Instead, you provide a `position` argument to the `addControl` map method.\r\n- Controls _must_ implement `onAdd` and `onRemove`.\r\n- mapboxgl.Control: deleted\r\n- Controls need to implement addTo -> controls need to implement onAdd\r\n- attribution & scale controls are no longer evented\r\n\r\ncc @lucaswoj for the review"},"comment":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/comments/258992095","html_url":"https://github.com/mapbox/mapbox-gl-js/pull/3497#issuecomment-258992095","issue_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/3497","id":258992095,"user":{"login":"mourner","id":25395,"avatar_url":"https://avatars.githubusercontent.com/u/25395?v=3","gravatar_id":"","url":"https://api.github.com/users/mourner","html_url":"https://github.com/mourner","followers_url":"https://api.github.com/users/mourner/followers","following_url":"https://api.github.com/users/mourner/following{/other_user}","gists_url":"https://api.github.com/users/mourner/gists{/gist_id}","starred_url":"https://api.github.com/users/mourner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mourner/subscriptions","organizations_url":"https://api.github.com/users/mourner/orgs","repos_url":"https://api.github.com/users/mourner/repos","events_url":"https://api.github.com/users/mourner/events{/privacy}","received_events_url":"https://api.github.com/users/mourner/received_events","type":"User","site_admin":false},"created_at":"2016-11-07T23:03:58Z","updated_at":"2016-11-07T23:03:58Z","body":"```js\r\ntest/js/ui/map.test.js Map TypeError: Cannot use 'in' operator to search for 'nodeType' in undefined:\r\n     Error: TypeError: Cannot use 'in' operator to search for 'nodeType' in undefined\r\n      at Map.addControl (js/ui/map.js:78:488)\r\n```"}}
{"actor":{"display_login":"mourner"}}