{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/2537","repository_url":"https://api.github.com/repos/mapbox/mapbox-gl-js","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/2537/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/2537/comments","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/2537/events","html_url":"https://github.com/mapbox/mapbox-gl-js/issues/2537","id":153337395,"number":2537,"title":"Add a way to create a bounding box of a size around a point","user":{"login":"lucaswoj","id":281306,"avatar_url":"https://avatars.githubusercontent.com/u/281306?v=3","gravatar_id":"","url":"https://api.github.com/users/lucaswoj","html_url":"https://github.com/lucaswoj","followers_url":"https://api.github.com/users/lucaswoj/followers","following_url":"https://api.github.com/users/lucaswoj/following{/other_user}","gists_url":"https://api.github.com/users/lucaswoj/gists{/gist_id}","starred_url":"https://api.github.com/users/lucaswoj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucaswoj/subscriptions","organizations_url":"https://api.github.com/users/lucaswoj/orgs","repos_url":"https://api.github.com/users/lucaswoj/repos","events_url":"https://api.github.com/users/lucaswoj/events{/privacy}","received_events_url":"https://api.github.com/users/lucaswoj/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/labels/enhancement","name":"enhancement","color":"0052cc"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-05-05T22:09:40Z","updated_at":"2016-05-10T14:05:10Z","closed_at":"2016-05-09T23:43:17Z","body":"To make the  `queryRenderedFeatures` hitbox for a feature larger, it is necessary to generate a bounding box around the cursor. We should add a utility method to make this easier.\r\n\r\n## Proposal 1\r\n\r\n```js\r\nqueryRenderedFeatures(LngLatBounds.createAroundPoint(event.point, 10, 10));\r\n```\r\n\r\n## Proposal 2\r\n\r\n```js\r\nqueryRenderedFeatures(event.point, { width: 10, height: 10 }); // define a rectangle\r\n```\r\n\r\n## Proposal 3\r\n\r\n```js\r\nqueryRenderedFeatures(event.point, { radius: 10 }); // define a circle\r\n```\r\n\r\n## Proposal 4 (@1ec5 🚀)\r\n\r\n```js\r\nqueryRenderedFeatures(event.point.outset(10, 10)); // define a rectangle\r\n```\r\n\r\n\r\ncc @lyzidiamond @jfirebaugh @mourner "},"comment":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/comments/218167476","html_url":"https://github.com/mapbox/mapbox-gl-js/issues/2537#issuecomment-218167476","issue_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/2537","id":218167476,"user":{"login":"jfirebaugh","id":98601,"avatar_url":"https://avatars.githubusercontent.com/u/98601?v=3","gravatar_id":"","url":"https://api.github.com/users/jfirebaugh","html_url":"https://github.com/jfirebaugh","followers_url":"https://api.github.com/users/jfirebaugh/followers","following_url":"https://api.github.com/users/jfirebaugh/following{/other_user}","gists_url":"https://api.github.com/users/jfirebaugh/gists{/gist_id}","starred_url":"https://api.github.com/users/jfirebaugh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfirebaugh/subscriptions","organizations_url":"https://api.github.com/users/jfirebaugh/orgs","repos_url":"https://api.github.com/users/jfirebaugh/repos","events_url":"https://api.github.com/users/jfirebaugh/events{/privacy}","received_events_url":"https://api.github.com/users/jfirebaugh/received_events","type":"User","site_admin":false},"created_at":"2016-05-10T14:05:10Z","updated_at":"2016-05-10T14:05:10Z","body":"We can make an example. Like https://www.mapbox.com/mapbox-gl-js/example/using-box-queryrenderedfeatures/ except on click."}}