GitHub PullRequestReviewCommentEvent at 2014-08-21 18:15:49
Repository: cesium
Actor: shunter
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/comments/16556685","id":16556685,"diff_hunk":"@@ -411,4 +418,315 @@ defineSuite([\n             imagery.releaseReference();\n         });\n     });\n+\n+    describe('pickFeatures', function() {\n+        it('works with GeoJSON responses', function() {\n+            var provider = new WebMapServiceImageryProvider({\n+                url : 'made/up/wms/server',\n+                layers : 'someLayer'\n+            });\n+\n+            loadWithXhr.load = function(url, responseType, method, data, headers, deferred, overrideMimeType) {\n+                expect(url).toContain('GetFeatureInfo');\n+                loadWithXhr.defaultLoad('Data/WMS/GetFeatureInfo-GeoJSON.json', responseType, method, data, headers, deferred, overrideMimeType);\n+            };\n+\n+            waitsFor(function() {\n+                return provider.ready;\n+            }, 'imagery provider to become ready');\n+\n+            var pickResult;\n+\n+            runs(function() {\n+                var asyncResult = provider.pickFeatures(0, 0, 0, 0.5, 0.5);\n+                when(asyncResult, function(result) {","path":"Specs/Scene/WebMapServiceImageryProviderSpec.js","position":null,"original_position":69,"commit_id":"3bbf60ba809b7deaafc757162a75f601d7efc0b8","original_commit_id":"6ae7f6d7af3df21a85a908ec374b852033f6fdcc","user":{"login":"shunter","id":32828,"avatar_url":"https://avatars.githubusercontent.com/u/32828?v=2","gravatar_id":"1b815e2898bb8a901365475077eb575b","url":"https://api.github.com/users/shunter","html_url":"https://github.com/shunter","followers_url":"https://api.github.com/users/shunter/followers","following_url":"https://api.github.com/users/shunter/following{/other_user}","gists_url":"https://api.github.com/users/shunter/gists{/gist_id}","starred_url":"https://api.github.com/users/shunter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shunter/subscriptions","organizations_url":"https://api.github.com/users/shunter/orgs","repos_url":"https://api.github.com/users/shunter/repos","events_url":"https://api.github.com/users/shunter/events{/privacy}","received_events_url":"https://api.github.com/users/shunter/received_events","type":"User","site_admin":false},"body":"OK. TextureAtlas specs are fixed.  Apparently when I wrote it I didn't know the difference between `shift` and `unshift`.\r\n\r\nI also refactored the code a bit.  Since 95% of use cases don't need any options, I switched it back to being the last argument.  Since the remaining 5% just want to expect rejection, I added a helper function that does that in a psuedo-jasmine-ish syntax.  Let me know if you have any comments on that change, otherwise I'll merge this.","created_at":"2014-08-21T18:15:49Z","updated_at":"2014-08-21T18:15:49Z","html_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/2057#discussion_r16556685","pull_request_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/2057","_links":{"self":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/comments/16556685"},"html":{"href":"https://github.com/AnalyticalGraphicsInc/cesium/pull/2057#discussion_r16556685"},"pull_request":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/2057"}}},"pull_request":{"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/2057","id":19726362,"html_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/2057","diff_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/2057.diff","patch_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/2057.patch","issue_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/2057","number":2057,"state":"open","locked":false,"title":"Add support for picking rasterized features from imagery layers","user":{"login":"kring","id":924374,"avatar_url":"https://avatars.githubusercontent.com/u/924374?v=2","gravatar_id":"67333af82be41c2da955c327af956535","url":"https://api.github.com/users/kring","html_url":"https://github.com/kring","followers_url":"https://api.github.com/users/kring/followers","following_url":"https://api.github.com/users/kring/following{/other_user}","gists_url":"https://api.github.com/users/kring/gists{/gist_id}","starred_url":"https://api.github.com/users/kring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kring/subscriptions","organizations_url":"https://api.github.com/users/kring/orgs","repos_url":"https://api.github.com/users/kring/repos","events_url":"https://api.github.com/users/kring/events{/privacy}","received_events_url":"https://api.github.com/users/kring/received_events","type":"User","site_admin":false},"body":"When you extend `Viewer` with `viewerEntityMixin`, and click on an entity from CZML, GeoJSON, etc., Cesium shows the entity's properties in an `InfoBox`.  This change extends that paradigm to work with rasterized features from imagery layers as well.  So, when you add a WMS layer and click anywhere within the layer's rectangle, Cesium now does a `GetFeatureInfo` request to the WMS server.  If the request comes back with a feature, its properties are displayed in the `InfoBox`.\r\n\r\nCurrently only `WebMapServiceImageryProvider` implements the new, optional, `pickFeatures` function that enables this to work, but other providers could gain the capability as it makes sense.\r\n\r\nHere's some Sandcastle code to try it out (look for data in Australia):\r\n\r\n```\r\nvar viewer = new Cesium.Viewer('cesiumContainer');\r\nviewer.extend(Cesium.viewerEntityMixin);\r\n\r\nvar imageryLayers = viewer.scene.imageryLayers;\r\nimageryLayers.addImageryProvider(new Cesium.WebMapServiceImageryProvider({\r\n    url : 'http://geoserver.research.nicta.com.au/geotopo_250k/ows',\r\n    layers : 'bores',\r\n    parameters : {\r\n        transparent : true,\r\n        format : 'image/png'\r\n    }\r\n}));\r\n```\r\n\r\nShould this be an actual Sandcastle example?","created_at":"2014-08-13T14:13:57Z","updated_at":"2014-08-21T18:15:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"79c6dbeb237ac195c3632909f4400d90ae57cb5f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/2057/commits","review_comments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/2057/comments","review_comment_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/comments/{number}","comments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/2057/comments","statuses_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/statuses/3bbf60ba809b7deaafc757162a75f601d7efc0b8","head":{"label":"AnalyticalGraphicsInc:imageryLayerPicking","ref":"imageryLayerPicking","sha":"3bbf60ba809b7deaafc757162a75f601d7efc0b8","user":{"login":"AnalyticalGraphicsInc","id":1490220,"avatar_url":"https://avatars.githubusercontent.com/u/1490220?v=2","gravatar_id":"5f393230a077654facf8294928706306","url":"https://api.github.com/users/AnalyticalGraphicsInc","html_url":"https://github.com/AnalyticalGraphicsInc","followers_url":"https://api.github.com/users/AnalyticalGraphicsInc/followers","following_url":"https://api.github.com/users/AnalyticalGraphicsInc/following{/other_user}","gists_url":"https://api.github.com/users/AnalyticalGraphicsInc/gists{/gist_id}","starred_url":"https://api.github.com/users/AnalyticalGraphicsInc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnalyticalGraphicsInc/subscriptions","organizations_url":"https://api.github.com/users/AnalyticalGraphicsInc/orgs","repos_url":"https://api.github.com/users/AnalyticalGraphicsInc/repos","events_url":"https://api.github.com/users/AnalyticalGraphicsInc/events{/privacy}","received_events_url":"https://api.github.com/users/AnalyticalGraphicsInc/received_events","type":"Organization","site_admin":false},"repo":{"id":3606738,"name":"cesium","full_name":"AnalyticalGraphicsInc/cesium","owner":{"login":"AnalyticalGraphicsInc","id":1490220,"avatar_url":"https://avatars.githubusercontent.com/u/1490220?v=2","gravatar_id":"5f393230a077654facf8294928706306","url":"https://api.github.com/users/AnalyticalGraphicsInc","html_url":"https://github.com/AnalyticalGraphicsInc","followers_url":"https://api.github.com/users/AnalyticalGraphicsInc/followers","following_url":"https://api.github.com/users/AnalyticalGraphicsInc/following{/other_user}","gists_url":"https://api.github.com/users/AnalyticalGraphicsInc/gists{/gist_id}","starred_url":"https://api.github.com/users/AnalyticalGraphicsInc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnalyticalGraphicsInc/subscriptions","organizations_url":"https://api.github.com/users/AnalyticalGraphicsInc/orgs","repos_url":"https://api.github.com/users/AnalyticalGraphicsInc/repos","events_url":"https://api.github.com/users/AnalyticalGraphicsInc/events{/privacy}","received_events_url":"https://api.github.com/users/AnalyticalGraphicsInc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AnalyticalGraphicsInc/cesium","description":"WebGL virtual globe and map engine","fork":false,"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium","forks_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/forks","keys_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/teams","hooks_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/hooks","issue_events_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/events{/number}","events_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/events","assignees_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/assignees{/user}","branches_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/branches{/branch}","tags_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/tags","blobs_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/git/refs{/sha}","trees_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/statuses/{sha}","languages_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/languages","stargazers_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/stargazers","contributors_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/contributors","subscribers_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/subscribers","subscription_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/subscription","commits_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/commits{/sha}","git_commits_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/git/commits{/sha}","comments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/comments{/number}","issue_comment_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/comments/{number}","contents_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/contents/{+path}","compare_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/merges","archive_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/downloads","issues_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues{/number}","pulls_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls{/number}","milestones_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/milestones{/number}","notifications_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/labels{/name}","releases_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/releases{/id}","created_at":"2012-03-02T22:27:14Z","updated_at":"2014-08-21T15:11:01Z","pushed_at":"2014-08-21T18:13:20Z","git_url":"git://github.com/AnalyticalGraphicsInc/cesium.git","ssh_url":"git@github.com:AnalyticalGraphicsInc/cesium.git","clone_url":"https://github.com/AnalyticalGraphicsInc/cesium.git","svn_url":"https://github.com/AnalyticalGraphicsInc/cesium","homepage":"cesiumjs.org","size":446055,"stargazers_count":500,"watchers_count":500,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":287,"mirror_url":null,"open_issues_count":225,"forks":287,"open_issues":225,"watchers":500,"default_branch":"master"}},"base":{"label":"AnalyticalGraphicsInc:master","ref":"master","sha":"12bd465d0201633502d0d1b3adb92134f4c12a29","user":{"login":"AnalyticalGraphicsInc","id":1490220,"avatar_url":"https://avatars.githubusercontent.com/u/1490220?v=2","gravatar_id":"5f393230a077654facf8294928706306","url":"https://api.github.com/users/AnalyticalGraphicsInc","html_url":"https://github.com/AnalyticalGraphicsInc","followers_url":"https://api.github.com/users/AnalyticalGraphicsInc/followers","following_url":"https://api.github.com/users/AnalyticalGraphicsInc/following{/other_user}","gists_url":"https://api.github.com/users/AnalyticalGraphicsInc/gists{/gist_id}","starred_url":"https://api.github.com/users/AnalyticalGraphicsInc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnalyticalGraphicsInc/subscriptions","organizations_url":"https://api.github.com/users/AnalyticalGraphicsInc/orgs","repos_url":"https://api.github.com/users/AnalyticalGraphicsInc/repos","events_url":"https://api.github.com/users/AnalyticalGraphicsInc/events{/privacy}","received_events_url":"https://api.github.com/users/AnalyticalGraphicsInc/received_events","type":"Organization","site_admin":false},"repo":{"id":3606738,"name":"cesium","full_name":"AnalyticalGraphicsInc/cesium","owner":{"login":"AnalyticalGraphicsInc","id":1490220,"avatar_url":"https://avatars.githubusercontent.com/u/1490220?v=2","gravatar_id":"5f393230a077654facf8294928706306","url":"https://api.github.com/users/AnalyticalGraphicsInc","html_url":"https://github.com/AnalyticalGraphicsInc","followers_url":"https://api.github.com/users/AnalyticalGraphicsInc/followers","following_url":"https://api.github.com/users/AnalyticalGraphicsInc/following{/other_user}","gists_url":"https://api.github.com/users/AnalyticalGraphicsInc/gists{/gist_id}","starred_url":"https://api.github.com/users/AnalyticalGraphicsInc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnalyticalGraphicsInc/subscriptions","organizations_url":"https://api.github.com/users/AnalyticalGraphicsInc/orgs","repos_url":"https://api.github.com/users/AnalyticalGraphicsInc/repos","events_url":"https://api.github.com/users/AnalyticalGraphicsInc/events{/privacy}","received_events_url":"https://api.github.com/users/AnalyticalGraphicsInc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AnalyticalGraphicsInc/cesium","description":"WebGL virtual globe and map engine","fork":false,"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium","forks_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/forks","keys_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/teams","hooks_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/hooks","issue_events_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/events{/number}","events_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/events","assignees_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/assignees{/user}","branches_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/branches{/branch}","tags_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/tags","blobs_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/git/refs{/sha}","trees_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/statuses/{sha}","languages_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/languages","stargazers_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/stargazers","contributors_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/contributors","subscribers_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/subscribers","subscription_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/subscription","commits_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/commits{/sha}","git_commits_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/git/commits{/sha}","comments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/comments{/number}","issue_comment_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/comments/{number}","contents_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/contents/{+path}","compare_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/merges","archive_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/downloads","issues_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues{/number}","pulls_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls{/number}","milestones_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/milestones{/number}","notifications_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/labels{/name}","releases_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/releases{/id}","created_at":"2012-03-02T22:27:14Z","updated_at":"2014-08-21T15:11:01Z","pushed_at":"2014-08-21T18:13:20Z","git_url":"git://github.com/AnalyticalGraphicsInc/cesium.git","ssh_url":"git@github.com:AnalyticalGraphicsInc/cesium.git","clone_url":"https://github.com/AnalyticalGraphicsInc/cesium.git","svn_url":"https://github.com/AnalyticalGraphicsInc/cesium","homepage":"cesiumjs.org","size":446055,"stargazers_count":500,"watchers_count":500,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":287,"mirror_url":null,"open_issues_count":225,"forks":287,"open_issues":225,"watchers":500,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/2057"},"html":{"href":"https://github.com/AnalyticalGraphicsInc/cesium/pull/2057"},"issue":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/2057"},"comments":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/2057/comments"},"review_comments":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/2057/comments"},"review_comment":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/2057/commits"},"statuses":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/statuses/3bbf60ba809b7deaafc757162a75f601d7efc0b8"}}}}