{"action":"created","comment":{"url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/pulls/comments/24706896","id":24706896,"diff_hunk":"@@ -0,0 +1,87 @@\n+interface ITruckProfileScope extends ng.IScope {\n+\n+    allTrucks: Array<ITruckProfile>;\n+    loading:boolean;\n+    truckProfile:ITruckProfile;\n+    truck:ITruckProfile;\n+    customMenuColors:CustomMenuColors;\n+    tempTrucks:Array<ITruckProfile>;\n+    map:{center:{}; zoom:number};\n+    truckCoords:{latitude:number; longitude:number};\n+    selectedTruck:ITruckProfile;\n+    coords:{latitude:number; longitude:number};\n+\n+    populateProfile(truck:IActiveTruck, lat:number, lon:number);\n+    onProfileClicked(truck);\n+    simpleSearch(searchQuery:string);\n+}\n+\n+\n+angular.module('TruckMuncherApp').controller('truckProfileCtrl', ['$scope', 'growl', 'colorService', 'TruckService', 'TruckProfileService', 'SearchService', 'MenuService', '$analytics', 'navigator',\n+    ($scope, growl, ColorService, TruckService, TruckProfileService, SearchService, MenuService, $analytics, navigator) => new TruckProfileCtrl($scope, growl, ColorService, TruckService, TruckProfileService, SearchService, MenuService, $analytics, navigator)]);\n+\n+class TruckProfileCtrl {\n+    constructor(private $scope:ITruckProfileScope,\n+                private growl:IGrowlService,\n+                private colorService:IColorService,\n+                private TruckService:ITruckService,\n+                private TruckProfileService:ITruckProfileService,\n+                private SearchService:ISearchService,\n+                private MenuService:IMenuService,\n+                private $analytics:IAngularticsService,\n+                private navigator:Navigator) {\n+\n+        $scope.allTrucks = [];\n+        $scope.truck = null;\n+        $scope.customMenuColors = null;\n+        $scope.tempTrucks = null;\n+        $scope.loading = true;\n+        $scope.selectedTruck = null;\n+\n+        this.navigator.geolocation.getCurrentPosition(function (pos) {\n+\n+            $scope.coords = pos.coords;\n+\n+            $scope.loading = true;\n+\n+            TruckService.getTruckProfiles($scope.coords.latitude, $scope.coords.longitude).then(function (results) {\n+\n+                if (TruckProfileService.allTrucksInStoredProfiles(results.trucks) && !TruckProfileService.cookieNeedsUpdate()) {\n+                    for (var i = 0; i < results.trucks.length; i++) {\n+\n+                        $scope.allTrucks.push(results.trucks[i]);\n+                    }\n+\n+                    $scope.loading = false;\n+                } else {\n+\n+                    TruckProfileService.updateTruckProfiles($scope.coords.latitude, $scope.coords.longitude).then(function (response) {\n+\n+                        for (var i = 0; i < response.trucks.length; i++) {","path":"app/truckProfileCtrl.ts","position":60,"original_position":60,"commit_id":"424e8b5edb4536ae3c45e0ef9395264d4139e691","original_commit_id":"424e8b5edb4536ae3c45e0ef9395264d4139e691","user":{"login":"atscott","id":479713,"avatar_url":"https://avatars.githubusercontent.com/u/479713?v=3","gravatar_id":"","url":"https://api.github.com/users/atscott","html_url":"https://github.com/atscott","followers_url":"https://api.github.com/users/atscott/followers","following_url":"https://api.github.com/users/atscott/following{/other_user}","gists_url":"https://api.github.com/users/atscott/gists{/gist_id}","starred_url":"https://api.github.com/users/atscott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atscott/subscriptions","organizations_url":"https://api.github.com/users/atscott/orgs","repos_url":"https://api.github.com/users/atscott/repos","events_url":"https://api.github.com/users/atscott/events{/privacy}","received_events_url":"https://api.github.com/users/atscott/received_events","type":"User","site_admin":false},"body":"Use _.map. See comment below on lodash","created_at":"2015-02-13T23:46:12Z","updated_at":"2015-02-13T23:46:12Z","html_url":"https://github.com/TruckMuncher/TruckMuncher-Web/pull/43#discussion_r24706896","pull_request_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/pulls/43","_links":{"self":{"href":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/pulls/comments/24706896"},"html":{"href":"https://github.com/TruckMuncher/TruckMuncher-Web/pull/43#discussion_r24706896"},"pull_request":{"href":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/pulls/43"}}},"pull_request":{"url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/pulls/43","id":29308830,"html_url":"https://github.com/TruckMuncher/TruckMuncher-Web/pull/43","diff_url":"https://github.com/TruckMuncher/TruckMuncher-Web/pull/43.diff","patch_url":"https://github.com/TruckMuncher/TruckMuncher-Web/pull/43.patch","issue_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/issues/43","number":43,"state":"open","locked":false,"title":"Profiles","user":{"login":"atscott","id":479713,"avatar_url":"https://avatars.githubusercontent.com/u/479713?v=3","gravatar_id":"","url":"https://api.github.com/users/atscott","html_url":"https://github.com/atscott","followers_url":"https://api.github.com/users/atscott/followers","following_url":"https://api.github.com/users/atscott/following{/other_user}","gists_url":"https://api.github.com/users/atscott/gists{/gist_id}","starred_url":"https://api.github.com/users/atscott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atscott/subscriptions","organizations_url":"https://api.github.com/users/atscott/orgs","repos_url":"https://api.github.com/users/atscott/repos","events_url":"https://api.github.com/users/atscott/events{/privacy}","received_events_url":"https://api.github.com/users/atscott/received_events","type":"User","site_admin":false},"body":"creating this so I have a place to put comments","created_at":"2015-02-13T23:40:58Z","updated_at":"2015-02-13T23:46:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"36f67b6e8fdb163025a64c8d09ee31ad58dba566","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/pulls/43/commits","review_comments_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/pulls/43/comments","review_comment_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/pulls/comments/{number}","comments_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/issues/43/comments","statuses_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/statuses/424e8b5edb4536ae3c45e0ef9395264d4139e691","head":{"label":"TruckMuncher:profiles","ref":"profiles","sha":"424e8b5edb4536ae3c45e0ef9395264d4139e691","user":{"login":"TruckMuncher","id":8795986,"avatar_url":"https://avatars.githubusercontent.com/u/8795986?v=3","gravatar_id":"","url":"https://api.github.com/users/TruckMuncher","html_url":"https://github.com/TruckMuncher","followers_url":"https://api.github.com/users/TruckMuncher/followers","following_url":"https://api.github.com/users/TruckMuncher/following{/other_user}","gists_url":"https://api.github.com/users/TruckMuncher/gists{/gist_id}","starred_url":"https://api.github.com/users/TruckMuncher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TruckMuncher/subscriptions","organizations_url":"https://api.github.com/users/TruckMuncher/orgs","repos_url":"https://api.github.com/users/TruckMuncher/repos","events_url":"https://api.github.com/users/TruckMuncher/events{/privacy}","received_events_url":"https://api.github.com/users/TruckMuncher/received_events","type":"Organization","site_admin":false},"repo":{"id":24122671,"name":"TruckMuncher-Web","full_name":"TruckMuncher/TruckMuncher-Web","owner":{"login":"TruckMuncher","id":8795986,"avatar_url":"https://avatars.githubusercontent.com/u/8795986?v=3","gravatar_id":"","url":"https://api.github.com/users/TruckMuncher","html_url":"https://github.com/TruckMuncher","followers_url":"https://api.github.com/users/TruckMuncher/followers","following_url":"https://api.github.com/users/TruckMuncher/following{/other_user}","gists_url":"https://api.github.com/users/TruckMuncher/gists{/gist_id}","starred_url":"https://api.github.com/users/TruckMuncher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TruckMuncher/subscriptions","organizations_url":"https://api.github.com/users/TruckMuncher/orgs","repos_url":"https://api.github.com/users/TruckMuncher/repos","events_url":"https://api.github.com/users/TruckMuncher/events{/privacy}","received_events_url":"https://api.github.com/users/TruckMuncher/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TruckMuncher/TruckMuncher-Web","description":"","fork":false,"url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web","forks_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/forks","keys_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/teams","hooks_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/hooks","issue_events_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/issues/events{/number}","events_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/events","assignees_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/assignees{/user}","branches_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/branches{/branch}","tags_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/tags","blobs_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/git/refs{/sha}","trees_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/statuses/{sha}","languages_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/languages","stargazers_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/stargazers","contributors_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/contributors","subscribers_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/subscribers","subscription_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/subscription","commits_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/commits{/sha}","git_commits_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/git/commits{/sha}","comments_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/comments{/number}","issue_comment_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/issues/comments/{number}","contents_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/contents/{+path}","compare_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/merges","archive_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/downloads","issues_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/issues{/number}","pulls_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/pulls{/number}","milestones_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/milestones{/number}","notifications_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/labels{/name}","releases_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/releases{/id}","created_at":"2014-09-17T00:09:53Z","updated_at":"2015-02-11T22:50:13Z","pushed_at":"2015-02-13T23:33:21Z","git_url":"git://github.com/TruckMuncher/TruckMuncher-Web.git","ssh_url":"git@github.com:TruckMuncher/TruckMuncher-Web.git","clone_url":"https://github.com/TruckMuncher/TruckMuncher-Web.git","svn_url":"https://github.com/TruckMuncher/TruckMuncher-Web","homepage":"","size":13876,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":0,"default_branch":"master"}},"base":{"label":"TruckMuncher:master","ref":"master","sha":"679f5f11501ff65c7ee48dbc6a5d3b08d249ec68","user":{"login":"TruckMuncher","id":8795986,"avatar_url":"https://avatars.githubusercontent.com/u/8795986?v=3","gravatar_id":"","url":"https://api.github.com/users/TruckMuncher","html_url":"https://github.com/TruckMuncher","followers_url":"https://api.github.com/users/TruckMuncher/followers","following_url":"https://api.github.com/users/TruckMuncher/following{/other_user}","gists_url":"https://api.github.com/users/TruckMuncher/gists{/gist_id}","starred_url":"https://api.github.com/users/TruckMuncher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TruckMuncher/subscriptions","organizations_url":"https://api.github.com/users/TruckMuncher/orgs","repos_url":"https://api.github.com/users/TruckMuncher/repos","events_url":"https://api.github.com/users/TruckMuncher/events{/privacy}","received_events_url":"https://api.github.com/users/TruckMuncher/received_events","type":"Organization","site_admin":false},"repo":{"id":24122671,"name":"TruckMuncher-Web","full_name":"TruckMuncher/TruckMuncher-Web","owner":{"login":"TruckMuncher","id":8795986,"avatar_url":"https://avatars.githubusercontent.com/u/8795986?v=3","gravatar_id":"","url":"https://api.github.com/users/TruckMuncher","html_url":"https://github.com/TruckMuncher","followers_url":"https://api.github.com/users/TruckMuncher/followers","following_url":"https://api.github.com/users/TruckMuncher/following{/other_user}","gists_url":"https://api.github.com/users/TruckMuncher/gists{/gist_id}","starred_url":"https://api.github.com/users/TruckMuncher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TruckMuncher/subscriptions","organizations_url":"https://api.github.com/users/TruckMuncher/orgs","repos_url":"https://api.github.com/users/TruckMuncher/repos","events_url":"https://api.github.com/users/TruckMuncher/events{/privacy}","received_events_url":"https://api.github.com/users/TruckMuncher/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TruckMuncher/TruckMuncher-Web","description":"","fork":false,"url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web","forks_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/forks","keys_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/teams","hooks_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/hooks","issue_events_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/issues/events{/number}","events_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/events","assignees_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/assignees{/user}","branches_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/branches{/branch}","tags_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/tags","blobs_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/git/refs{/sha}","trees_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/statuses/{sha}","languages_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/languages","stargazers_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/stargazers","contributors_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/contributors","subscribers_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/subscribers","subscription_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/subscription","commits_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/commits{/sha}","git_commits_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/git/commits{/sha}","comments_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/comments{/number}","issue_comment_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/issues/comments/{number}","contents_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/contents/{+path}","compare_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/merges","archive_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/downloads","issues_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/issues{/number}","pulls_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/pulls{/number}","milestones_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/milestones{/number}","notifications_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/labels{/name}","releases_url":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/releases{/id}","created_at":"2014-09-17T00:09:53Z","updated_at":"2015-02-11T22:50:13Z","pushed_at":"2015-02-13T23:33:21Z","git_url":"git://github.com/TruckMuncher/TruckMuncher-Web.git","ssh_url":"git@github.com:TruckMuncher/TruckMuncher-Web.git","clone_url":"https://github.com/TruckMuncher/TruckMuncher-Web.git","svn_url":"https://github.com/TruckMuncher/TruckMuncher-Web","homepage":"","size":13876,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/pulls/43"},"html":{"href":"https://github.com/TruckMuncher/TruckMuncher-Web/pull/43"},"issue":{"href":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/issues/43"},"comments":{"href":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/issues/43/comments"},"review_comments":{"href":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/pulls/43/comments"},"review_comment":{"href":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/pulls/43/commits"},"statuses":{"href":"https://api.github.com/repos/TruckMuncher/TruckMuncher-Web/statuses/424e8b5edb4536ae3c45e0ef9395264d4139e691"}}}}