GitHub PullRequestReviewCommentEvent at 2014-10-01 02:24:14
Repository: cesium
Actor: kring
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/comments/18258687","id":18258687,"diff_hunk":"@@ -101,31 +110,39 @@ define([\n             entity.properties = properties;\n \n             var key;\n-            var nameProperty;\n-            for (key in properties) {\n-                if (properties.hasOwnProperty(key) && properties[key]) {\n-                    var lowerKey = key.toLowerCase();\n-                    if (lowerKey === 'name' || lowerKey === 'title') {\n-                        nameProperty = key;\n-                        entity.name = properties[key];\n-                        break;\n-                    }\n-                }\n-            }\n-\n-            if (!defined(nameProperty)) {\n+            var nameProperty = properties.title;\n+            if (defined(nameProperty)) {\n+                entity.name = nameProperty;\n+            } else {\n                 for (key in properties) {\n                     if (properties.hasOwnProperty(key) && properties[key]) {\n-                        if (/name/i.test(key) || /title/i.test(key)) {\n+                        var lowerKey = key.toLowerCase();","path":"Source/DataSources/GeoJsonDataSource.js","position":113,"original_position":113,"commit_id":"972d98932ed66524eaf2d564ee44e83c27634a43","original_commit_id":"e5cb3f4dee737b2a6e8a58c92f4da8b3bc3880f2","user":{"login":"kring","id":924374,"avatar_url":"https://avatars.githubusercontent.com/u/924374?v=2","gravatar_id":"","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":"I needed similar logic in `ImageryLayerFeatureInfo` and wrote it a bit differently.  See if you like it better:\r\nhttps://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/ImageryLayerFeatureInfo.js#L51\r\n\r\nMight be worthwhile to extract this out into a function, too, of course.","created_at":"2014-10-01T02:24:14Z","updated_at":"2014-10-01T02:24:14Z","html_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/2162#discussion_r18258687","pull_request_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/2162","_links":{"self":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/comments/18258687"},"html":{"href":"https://github.com/AnalyticalGraphicsInc/cesium/pull/2162#discussion_r18258687"},"pull_request":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/2162"}}},"pull_request":{"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/2162","id":21976858,"html_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/2162","diff_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/2162.diff","patch_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/2162.patch","issue_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/2162","number":2162,"state":"open","locked":false,"title":"Simplestyle","user":{"login":"mramato","id":1495196,"avatar_url":"https://avatars.githubusercontent.com/u/1495196?v=2","gravatar_id":"","url":"https://api.github.com/users/mramato","html_url":"https://github.com/mramato","followers_url":"https://api.github.com/users/mramato/followers","following_url":"https://api.github.com/users/mramato/following{/other_user}","gists_url":"https://api.github.com/users/mramato/gists{/gist_id}","starred_url":"https://api.github.com/users/mramato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mramato/subscriptions","organizations_url":"https://api.github.com/users/mramato/orgs","repos_url":"https://api.github.com/users/mramato/repos","events_url":"https://api.github.com/users/mramato/events{/privacy}","received_events_url":"https://api.github.com/users/mramato/received_events","type":"User","site_admin":false},"body":"NOTE: Merge #2148  and #2161 before even looking at this (since the diff is overly large without them).\r\n\r\nI would like to get this into 1.2, if possible.\r\n\r\n* Added `GeoJson.fromUrl` to make it easy to add a data source in less code.\r\n* Added support for the GeoJSON [simplestyle specification](https://github.com/mapbox/simplestyle-spec). [Sandcastle example](http://localhost:8080/Apps/Sandcastle/index.html?src=GeoJSON%20simplestyle.html);\r\n* Added `PinBuilder` class for easy creation of map pins. [Sandcastle example](http://localhost:8080/Apps/Sandcastle/index.html?src=PinBuilder.html);\r\n* Added `Color.brighten` and `Color.darken` to make it easy to brighten or darker a color instance.\r\n* Changed default `GeoJSON` Point feature graphics to use `BillboardGraphics` with a blue map pin instead of color `PointGraphics`.\r\n\r\nHere's what the pins generated by the new `PinBuilder` class look like:\r\n![image](https://cloud.githubusercontent.com/assets/1495196/4452134/fb3e54b6-4841-11e4-8d7b-3554d6e98dda.png)\r\n","created_at":"2014-09-30T01:39:26Z","updated_at":"2014-10-01T02:24:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"57bd1d4d45766d6eb66e50022397f3e8a1ca9016","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/2162/commits","review_comments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/2162/comments","review_comment_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/comments/{number}","comments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/2162/comments","statuses_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/statuses/972d98932ed66524eaf2d564ee44e83c27634a43","head":{"label":"AnalyticalGraphicsInc:simplestyle","ref":"simplestyle","sha":"972d98932ed66524eaf2d564ee44e83c27634a43","user":{"login":"AnalyticalGraphicsInc","id":1490220,"avatar_url":"https://avatars.githubusercontent.com/u/1490220?v=2","gravatar_id":"","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":"","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-09-30T10:29:30Z","pushed_at":"2014-10-01T01:53:53Z","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":453356,"stargazers_count":531,"watchers_count":531,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":308,"mirror_url":null,"open_issues_count":242,"forks":308,"open_issues":242,"watchers":531,"default_branch":"master"}},"base":{"label":"AnalyticalGraphicsInc:master","ref":"master","sha":"20238ba77344d1cd44e81dc4ca84acfbdfdb46ff","user":{"login":"AnalyticalGraphicsInc","id":1490220,"avatar_url":"https://avatars.githubusercontent.com/u/1490220?v=2","gravatar_id":"","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":"","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-09-30T10:29:30Z","pushed_at":"2014-10-01T01:53:53Z","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":453356,"stargazers_count":531,"watchers_count":531,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":308,"mirror_url":null,"open_issues_count":242,"forks":308,"open_issues":242,"watchers":531,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/2162"},"html":{"href":"https://github.com/AnalyticalGraphicsInc/cesium/pull/2162"},"issue":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/2162"},"comments":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/2162/comments"},"review_comments":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/2162/comments"},"review_comment":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/2162/commits"},"statuses":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/statuses/972d98932ed66524eaf2d564ee44e83c27634a43"}}}}