{"action":"created","comment":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/comments/65786849","id":65786849,"diff_hunk":"@@ -635,9 +665,8 @@ Style.prototype = util.inherit(Evented, {\n         var sourceResults = [];\n         for (var id in this.sources) {\n             var source = this.sources[id];\n-            if (source.queryRenderedFeatures) {\n-                sourceResults.push(source.queryRenderedFeatures(queryGeometry, params, zoom, bearing));\n-            }\n+            var results = Source._queryRenderedVectorFeatures(source, this._layers, queryGeometry, params, zoom, bearing);","path":"js/style/style.js","position":88,"original_position":88,"commit_id":"3d6cf0a5ce5d118c52d2fe4446daffad25dd79b2","original_commit_id":"3d6cf0a5ce5d118c52d2fe4446daffad25dd79b2","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},"body":"What happens here for raster/image/video sources?","created_at":"2016-06-03T22:50:58Z","updated_at":"2016-06-03T22:50:58Z","html_url":"https://github.com/mapbox/mapbox-gl-js/pull/2667#discussion_r65786849","pull_request_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/2667","_links":{"self":{"href":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/comments/65786849"},"html":{"href":"https://github.com/mapbox/mapbox-gl-js/pull/2667#discussion_r65786849"},"pull_request":{"href":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/2667"}}},"pull_request":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/2667","id":72573181,"html_url":"https://github.com/mapbox/mapbox-gl-js/pull/2667","diff_url":"https://github.com/mapbox/mapbox-gl-js/pull/2667.diff","patch_url":"https://github.com/mapbox/mapbox-gl-js/pull/2667.patch","issue_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/2667","number":2667,"state":"open","locked":false,"title":"Refactor Source interface to allow/prepare for extensibility","user":{"login":"anandthakker","id":4974151,"avatar_url":"https://avatars.githubusercontent.com/u/4974151?v=3","gravatar_id":"","url":"https://api.github.com/users/anandthakker","html_url":"https://github.com/anandthakker","followers_url":"https://api.github.com/users/anandthakker/followers","following_url":"https://api.github.com/users/anandthakker/following{/other_user}","gists_url":"https://api.github.com/users/anandthakker/gists{/gist_id}","starred_url":"https://api.github.com/users/anandthakker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anandthakker/subscriptions","organizations_url":"https://api.github.com/users/anandthakker/orgs","repos_url":"https://api.github.com/users/anandthakker/repos","events_url":"https://api.github.com/users/anandthakker/events{/privacy}","received_events_url":"https://api.github.com/users/anandthakker/received_events","type":"User","site_admin":false},"body":"Replaces #2648 \r\n\r\n - Inverts `TilePyramid` and `Source` dependencies.  `TilePyramid` now essentially serves as a common wrapper class for dealing with sources.\r\n\r\n- Source types are now essentially:\r\n```js\r\n(\r\n  name: string,\r\n  createSource: (id, options, dispatcher, onChange, callback: (err, source: Source) => void) => void\r\n  ?workerSourceURL: string\r\n)\r\n```\r\n\r\n- And a `Source` is an object implementing:\r\n\r\n```js\r\nid: string // <- it's a little weird to rely on sources presenting this as a property\r\ntileSize: number\r\nminzoom: number\r\nmaxzoom: number\r\n// not sure about these three properties\r\nroundZoom: boolean\r\nreparseOverscaled: boolean\r\nisTileClipped: boolean\r\n\r\nload: (tile: Tile, cb: (err, ?data) => void) => void\r\nabort: (tile: Tile) => void\r\nunload: (tile: Tile) => void\r\nserialize: () => Object // plain JS\r\n```\r\n\r\nVarious todo's and questions:\r\n - [ ] The `Tile` objects are used by various source types to maintain tile-specific state; ideally, this implicit contract between `TilePyramid` and `Source` should be made explicit in the Source interface.\r\n - [ ] Decide on an approach to `serialize()` (see note [here](https://github.com/anandthakker/mapbox-gl-js/blob/c3016aee9d46877ce9a2d386f3469c5dfcf3613c/js/source/tile_pyramid.js#L30-L38))\r\n - [ ] `Source.is` is only used in one place: to support passing already-created sources to `addSource` (and prevent the attempt to validate against the spec in that case).  What's the best way to do this in the factory function approach, where it's a little weird to rely on `instanceof`?\r\n - [ ] `Map` methods (`addSource`, `getSource`).  Related to this and the previous item: is it important to retain the ability to create sources _without_ adding them to the map?  If so, it might make the most sense to expose a `createSource` on the map obj, since creation now depends on a reference to `dispatcher`, which probably _shouldn't_ be exposed.\r\n - [ ] It's weird to rely on sources presenting an `id` property with the correct value.\r\n - [x] Reinstate query*Features\r\n - [ ] I'm not sure what the `data` yielded by `load` should look like.  Currently, the only thing I can see being needed by code outside of the particular source is `bucketStats`, which the pyramid uses to emit the `tile.stats` event.  \r\n","created_at":"2016-06-03T21:32:57Z","updated_at":"2016-06-03T22:50:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/2667/commits","review_comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/2667/comments","review_comment_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/2667/comments","statuses_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/statuses/3d6cf0a5ce5d118c52d2fe4446daffad25dd79b2","head":{"label":"mapbox:source-refactor","ref":"source-refactor","sha":"3d6cf0a5ce5d118c52d2fe4446daffad25dd79b2","user":{"login":"mapbox","id":600935,"avatar_url":"https://avatars.githubusercontent.com/u/600935?v=3","gravatar_id":"","url":"https://api.github.com/users/mapbox","html_url":"https://github.com/mapbox","followers_url":"https://api.github.com/users/mapbox/followers","following_url":"https://api.github.com/users/mapbox/following{/other_user}","gists_url":"https://api.github.com/users/mapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapbox/subscriptions","organizations_url":"https://api.github.com/users/mapbox/orgs","repos_url":"https://api.github.com/users/mapbox/repos","events_url":"https://api.github.com/users/mapbox/events{/privacy}","received_events_url":"https://api.github.com/users/mapbox/received_events","type":"Organization","site_admin":false},"repo":{"id":8629417,"name":"mapbox-gl-js","full_name":"mapbox/mapbox-gl-js","owner":{"login":"mapbox","id":600935,"avatar_url":"https://avatars.githubusercontent.com/u/600935?v=3","gravatar_id":"","url":"https://api.github.com/users/mapbox","html_url":"https://github.com/mapbox","followers_url":"https://api.github.com/users/mapbox/followers","following_url":"https://api.github.com/users/mapbox/following{/other_user}","gists_url":"https://api.github.com/users/mapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapbox/subscriptions","organizations_url":"https://api.github.com/users/mapbox/orgs","repos_url":"https://api.github.com/users/mapbox/repos","events_url":"https://api.github.com/users/mapbox/events{/privacy}","received_events_url":"https://api.github.com/users/mapbox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapbox/mapbox-gl-js","description":"Render Mapbox styles in the browser using JavaScript and WebGL","fork":false,"url":"https://api.github.com/repos/mapbox/mapbox-gl-js","forks_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/forks","keys_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/teams","hooks_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/hooks","issue_events_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/events{/number}","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/events","assignees_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/assignees{/user}","branches_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/branches{/branch}","tags_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/tags","blobs_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/statuses/{sha}","languages_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/languages","stargazers_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/stargazers","contributors_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/contributors","subscribers_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/subscribers","subscription_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/subscription","commits_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/contents/{+path}","compare_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/merges","archive_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/downloads","issues_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues{/number}","pulls_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls{/number}","milestones_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/milestones{/number}","notifications_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/labels{/name}","releases_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/releases{/id}","deployments_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/deployments","created_at":"2013-03-07T14:45:24Z","updated_at":"2016-06-03T19:17:11Z","pushed_at":"2016-06-03T22:30:50Z","git_url":"git://github.com/mapbox/mapbox-gl-js.git","ssh_url":"git@github.com:mapbox/mapbox-gl-js.git","clone_url":"https://github.com/mapbox/mapbox-gl-js.git","svn_url":"https://github.com/mapbox/mapbox-gl-js","homepage":"https://www.mapbox.com/mapbox-gl-js/","size":25664,"stargazers_count":1034,"watchers_count":1034,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":184,"mirror_url":null,"open_issues_count":295,"forks":184,"open_issues":295,"watchers":1034,"default_branch":"master"}},"base":{"label":"mapbox:master","ref":"master","sha":"09c0c96cc39d1a329163e2fd043808cf12323f59","user":{"login":"mapbox","id":600935,"avatar_url":"https://avatars.githubusercontent.com/u/600935?v=3","gravatar_id":"","url":"https://api.github.com/users/mapbox","html_url":"https://github.com/mapbox","followers_url":"https://api.github.com/users/mapbox/followers","following_url":"https://api.github.com/users/mapbox/following{/other_user}","gists_url":"https://api.github.com/users/mapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapbox/subscriptions","organizations_url":"https://api.github.com/users/mapbox/orgs","repos_url":"https://api.github.com/users/mapbox/repos","events_url":"https://api.github.com/users/mapbox/events{/privacy}","received_events_url":"https://api.github.com/users/mapbox/received_events","type":"Organization","site_admin":false},"repo":{"id":8629417,"name":"mapbox-gl-js","full_name":"mapbox/mapbox-gl-js","owner":{"login":"mapbox","id":600935,"avatar_url":"https://avatars.githubusercontent.com/u/600935?v=3","gravatar_id":"","url":"https://api.github.com/users/mapbox","html_url":"https://github.com/mapbox","followers_url":"https://api.github.com/users/mapbox/followers","following_url":"https://api.github.com/users/mapbox/following{/other_user}","gists_url":"https://api.github.com/users/mapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapbox/subscriptions","organizations_url":"https://api.github.com/users/mapbox/orgs","repos_url":"https://api.github.com/users/mapbox/repos","events_url":"https://api.github.com/users/mapbox/events{/privacy}","received_events_url":"https://api.github.com/users/mapbox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapbox/mapbox-gl-js","description":"Render Mapbox styles in the browser using JavaScript and WebGL","fork":false,"url":"https://api.github.com/repos/mapbox/mapbox-gl-js","forks_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/forks","keys_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/teams","hooks_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/hooks","issue_events_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/events{/number}","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/events","assignees_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/assignees{/user}","branches_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/branches{/branch}","tags_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/tags","blobs_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/statuses/{sha}","languages_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/languages","stargazers_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/stargazers","contributors_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/contributors","subscribers_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/subscribers","subscription_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/subscription","commits_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/contents/{+path}","compare_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/merges","archive_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/downloads","issues_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues{/number}","pulls_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls{/number}","milestones_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/milestones{/number}","notifications_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/labels{/name}","releases_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/releases{/id}","deployments_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/deployments","created_at":"2013-03-07T14:45:24Z","updated_at":"2016-06-03T19:17:11Z","pushed_at":"2016-06-03T22:30:50Z","git_url":"git://github.com/mapbox/mapbox-gl-js.git","ssh_url":"git@github.com:mapbox/mapbox-gl-js.git","clone_url":"https://github.com/mapbox/mapbox-gl-js.git","svn_url":"https://github.com/mapbox/mapbox-gl-js","homepage":"https://www.mapbox.com/mapbox-gl-js/","size":25664,"stargazers_count":1034,"watchers_count":1034,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":184,"mirror_url":null,"open_issues_count":295,"forks":184,"open_issues":295,"watchers":1034,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/2667"},"html":{"href":"https://github.com/mapbox/mapbox-gl-js/pull/2667"},"issue":{"href":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/2667"},"comments":{"href":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/2667/comments"},"review_comments":{"href":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/2667/comments"},"review_comment":{"href":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/2667/commits"},"statuses":{"href":"https://api.github.com/repos/mapbox/mapbox-gl-js/statuses/3d6cf0a5ce5d118c52d2fe4446daffad25dd79b2"}}}}
{"actor":{"display_login":"jfirebaugh"}}