{"action":"created","comment":{"url":"https://api.github.com/repos/PathHero/PathHero/pulls/comments/27907818","id":27907818,"diff_hunk":"@@ -0,0 +1,282 @@\n+\n+  var gMap = {}\n+  \n+  gMap.map;\n+  gMap.markers = [];\n+  \n+  gMap.distance = [];\n+  gMap.duration = [];\n+  \n+  gMap.pathLatLng = [];\n+  gMap.travelMode = 'WALKING';\n+  gMap.travelButtonList = [];\n+\n+  gMap.directionsDisplay;\n+  gMap.directionsService;\n+\n+  gMap.startGMap = function (pos){\n+    //can be -> BICYCLING, DRIVING, TRANSIT, WALKING\n+    //----------------------------------\n+    //creatig the Map\n+    //----------------------------------\n+    var mapOptions = {\n+      center: pos,\n+      zoom: 12,\n+      backgroundColor: '#568',\n+      disableDoubleClickZoom : true,\n+      disableDefaultUI: true,\n+      keyboardShortcuts: false\n+    };\n+    gMap.map = new google.maps.Map(document.getElementById('gMap'),mapOptions);\n+    \n+    //----------------------------------\n+    //styling the Map\n+    //----------------------------------\n+\n+    var mapStyles = [\n+      {\n+        stylers: [ { hue: \"#00ffe6\" }, { saturation: -20 } ]\n+      },{\n+        featureType: \"road\",\n+        elementType: \"geometry\",\n+        stylers: [ { lightness: 100 }, { visibility: \"simplified\" } ]\n+      },{\n+        featureType: \"road\",\n+        elementType: \"labels\",\n+        stylers: [ { visibility: \"off\" } ]\n+      }\n+    ];\n+\n+    var styledMap = new google.maps.StyledMapType(mapStyles,{name: \"Styled Map\"});\n+    gMap.map.mapTypes.set('map_style', styledMap);\n+    gMap.map.setMapTypeId('map_style');\n+\n+    //----------------------------------\n+    //events\n+    //----------------------------------\n+    google.maps.event.addListener(gMap.map, 'click', function(event) {\n+      //makeMarker(event.latLng);\n+      if(gMap.pathLatLng.length < 10){\n+        gMap.pathLatLng.push(event.latLng);\n+      }\n+      gMap.createPath();\n+    });\n+    //----------------------------------\n+    //adding custom GUI elements\n+    //----------------------------------\n+\n+    new gMap.CenterControl('TOP_LEFT', '-', function(){\n+      gMap.map.setZoom(gMap.map.getZoom()-1);\n+    });\n+\n+    new gMap.CenterControl('TOP_LEFT', '+', function(){\n+      gMap.map.setZoom(gMap.map.getZoom()+1);\n+    });\n+\n+    new gMap.CenterControl('BOTTOM_LEFT', 'W', function(){\n+      gMap.travelMode = 'WALKING';\n+    },true,true);\n+\n+    new gMap.CenterControl('BOTTOM_LEFT', 'B', function(){\n+      gMap.travelMode= 'BICYCLING';\n+    },true);\n+\n+    new gMap.CenterControl('BOTTOM_LEFT', 'D', function(){\n+      gMap.travelMode= 'DRIVING';\n+    },true);\n+\n+    new gMap.CenterControl('BOTTOM_LEFT', 'T', function(){\n+      gMap.travelMode= 'TRANSIT';\n+    },true);\n+\n+  }\n+\n+  //------------------------\n+  //functions\n+  //------------------------\n+\n+  gMap.CenterControl = function (position,text, callback, addToList,startAsActive) {\n+\n+    // Set CSS for the control border","path":"Client/lib/gMap.js","position":100,"original_position":100,"commit_id":"f53ec1a640f844698e749938e78b2f23f31fd269","original_commit_id":"f53ec1a640f844698e749938e78b2f23f31fd269","user":{"login":"wettowelreactor","id":1234382,"avatar_url":"https://avatars.githubusercontent.com/u/1234382?v=3","gravatar_id":"","url":"https://api.github.com/users/wettowelreactor","html_url":"https://github.com/wettowelreactor","followers_url":"https://api.github.com/users/wettowelreactor/followers","following_url":"https://api.github.com/users/wettowelreactor/following{/other_user}","gists_url":"https://api.github.com/users/wettowelreactor/gists{/gist_id}","starred_url":"https://api.github.com/users/wettowelreactor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wettowelreactor/subscriptions","organizations_url":"https://api.github.com/users/wettowelreactor/orgs","repos_url":"https://api.github.com/users/wettowelreactor/repos","events_url":"https://api.github.com/users/wettowelreactor/events{/privacy}","received_events_url":"https://api.github.com/users/wettowelreactor/received_events","type":"User","site_admin":false},"body":"Same as above consider breaking each of these into independent functions.","created_at":"2015-04-07T18:45:06Z","updated_at":"2015-04-07T18:45:06Z","html_url":"https://github.com/PathHero/PathHero/pull/29#discussion_r27907818","pull_request_url":"https://api.github.com/repos/PathHero/PathHero/pulls/29","_links":{"self":{"href":"https://api.github.com/repos/PathHero/PathHero/pulls/comments/27907818"},"html":{"href":"https://github.com/PathHero/PathHero/pull/29#discussion_r27907818"},"pull_request":{"href":"https://api.github.com/repos/PathHero/PathHero/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/PathHero/PathHero/pulls/29","id":32728937,"html_url":"https://github.com/PathHero/PathHero/pull/29","diff_url":"https://github.com/PathHero/PathHero/pull/29.diff","patch_url":"https://github.com/PathHero/PathHero/pull/29.patch","issue_url":"https://api.github.com/repos/PathHero/PathHero/issues/29","number":29,"state":"open","locked":false,"title":"(feat) gMap Library","user":{"login":"ThornWinters","id":2390194,"avatar_url":"https://avatars.githubusercontent.com/u/2390194?v=3","gravatar_id":"","url":"https://api.github.com/users/ThornWinters","html_url":"https://github.com/ThornWinters","followers_url":"https://api.github.com/users/ThornWinters/followers","following_url":"https://api.github.com/users/ThornWinters/following{/other_user}","gists_url":"https://api.github.com/users/ThornWinters/gists{/gist_id}","starred_url":"https://api.github.com/users/ThornWinters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThornWinters/subscriptions","organizations_url":"https://api.github.com/users/ThornWinters/orgs","repos_url":"https://api.github.com/users/ThornWinters/repos","events_url":"https://api.github.com/users/ThornWinters/events{/privacy}","received_events_url":"https://api.github.com/users/ThornWinters/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-07T02:34:19Z","updated_at":"2015-04-07T18:45:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"276095511c51710298a5f042c6c4143c7d0fa6a0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/PathHero/PathHero/pulls/29/commits","review_comments_url":"https://api.github.com/repos/PathHero/PathHero/pulls/29/comments","review_comment_url":"https://api.github.com/repos/PathHero/PathHero/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PathHero/PathHero/issues/29/comments","statuses_url":"https://api.github.com/repos/PathHero/PathHero/statuses/f53ec1a640f844698e749938e78b2f23f31fd269","head":{"label":"ThornWinters:TAD","ref":"TAD","sha":"f53ec1a640f844698e749938e78b2f23f31fd269","user":{"login":"ThornWinters","id":2390194,"avatar_url":"https://avatars.githubusercontent.com/u/2390194?v=3","gravatar_id":"","url":"https://api.github.com/users/ThornWinters","html_url":"https://github.com/ThornWinters","followers_url":"https://api.github.com/users/ThornWinters/followers","following_url":"https://api.github.com/users/ThornWinters/following{/other_user}","gists_url":"https://api.github.com/users/ThornWinters/gists{/gist_id}","starred_url":"https://api.github.com/users/ThornWinters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThornWinters/subscriptions","organizations_url":"https://api.github.com/users/ThornWinters/orgs","repos_url":"https://api.github.com/users/ThornWinters/repos","events_url":"https://api.github.com/users/ThornWinters/events{/privacy}","received_events_url":"https://api.github.com/users/ThornWinters/received_events","type":"User","site_admin":false},"repo":{"id":33327253,"name":"PathHero","full_name":"ThornWinters/PathHero","owner":{"login":"ThornWinters","id":2390194,"avatar_url":"https://avatars.githubusercontent.com/u/2390194?v=3","gravatar_id":"","url":"https://api.github.com/users/ThornWinters","html_url":"https://github.com/ThornWinters","followers_url":"https://api.github.com/users/ThornWinters/followers","following_url":"https://api.github.com/users/ThornWinters/following{/other_user}","gists_url":"https://api.github.com/users/ThornWinters/gists{/gist_id}","starred_url":"https://api.github.com/users/ThornWinters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThornWinters/subscriptions","organizations_url":"https://api.github.com/users/ThornWinters/orgs","repos_url":"https://api.github.com/users/ThornWinters/repos","events_url":"https://api.github.com/users/ThornWinters/events{/privacy}","received_events_url":"https://api.github.com/users/ThornWinters/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ThornWinters/PathHero","description":null,"fork":true,"url":"https://api.github.com/repos/ThornWinters/PathHero","forks_url":"https://api.github.com/repos/ThornWinters/PathHero/forks","keys_url":"https://api.github.com/repos/ThornWinters/PathHero/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ThornWinters/PathHero/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ThornWinters/PathHero/teams","hooks_url":"https://api.github.com/repos/ThornWinters/PathHero/hooks","issue_events_url":"https://api.github.com/repos/ThornWinters/PathHero/issues/events{/number}","events_url":"https://api.github.com/repos/ThornWinters/PathHero/events","assignees_url":"https://api.github.com/repos/ThornWinters/PathHero/assignees{/user}","branches_url":"https://api.github.com/repos/ThornWinters/PathHero/branches{/branch}","tags_url":"https://api.github.com/repos/ThornWinters/PathHero/tags","blobs_url":"https://api.github.com/repos/ThornWinters/PathHero/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ThornWinters/PathHero/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ThornWinters/PathHero/git/refs{/sha}","trees_url":"https://api.github.com/repos/ThornWinters/PathHero/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ThornWinters/PathHero/statuses/{sha}","languages_url":"https://api.github.com/repos/ThornWinters/PathHero/languages","stargazers_url":"https://api.github.com/repos/ThornWinters/PathHero/stargazers","contributors_url":"https://api.github.com/repos/ThornWinters/PathHero/contributors","subscribers_url":"https://api.github.com/repos/ThornWinters/PathHero/subscribers","subscription_url":"https://api.github.com/repos/ThornWinters/PathHero/subscription","commits_url":"https://api.github.com/repos/ThornWinters/PathHero/commits{/sha}","git_commits_url":"https://api.github.com/repos/ThornWinters/PathHero/git/commits{/sha}","comments_url":"https://api.github.com/repos/ThornWinters/PathHero/comments{/number}","issue_comment_url":"https://api.github.com/repos/ThornWinters/PathHero/issues/comments{/number}","contents_url":"https://api.github.com/repos/ThornWinters/PathHero/contents/{+path}","compare_url":"https://api.github.com/repos/ThornWinters/PathHero/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ThornWinters/PathHero/merges","archive_url":"https://api.github.com/repos/ThornWinters/PathHero/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ThornWinters/PathHero/downloads","issues_url":"https://api.github.com/repos/ThornWinters/PathHero/issues{/number}","pulls_url":"https://api.github.com/repos/ThornWinters/PathHero/pulls{/number}","milestones_url":"https://api.github.com/repos/ThornWinters/PathHero/milestones{/number}","notifications_url":"https://api.github.com/repos/ThornWinters/PathHero/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ThornWinters/PathHero/labels{/name}","releases_url":"https://api.github.com/repos/ThornWinters/PathHero/releases{/id}","created_at":"2015-04-02T19:17:57Z","updated_at":"2015-04-02T19:21:23Z","pushed_at":"2015-04-07T02:33:14Z","git_url":"git://github.com/ThornWinters/PathHero.git","ssh_url":"git@github.com:ThornWinters/PathHero.git","clone_url":"https://github.com/ThornWinters/PathHero.git","svn_url":"https://github.com/ThornWinters/PathHero","homepage":null,"size":128,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"PathHero:master","ref":"master","sha":"7b5fdc78e529f7e3f6cc196b9745560529634124","user":{"login":"PathHero","id":11742049,"avatar_url":"https://avatars.githubusercontent.com/u/11742049?v=3","gravatar_id":"","url":"https://api.github.com/users/PathHero","html_url":"https://github.com/PathHero","followers_url":"https://api.github.com/users/PathHero/followers","following_url":"https://api.github.com/users/PathHero/following{/other_user}","gists_url":"https://api.github.com/users/PathHero/gists{/gist_id}","starred_url":"https://api.github.com/users/PathHero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PathHero/subscriptions","organizations_url":"https://api.github.com/users/PathHero/orgs","repos_url":"https://api.github.com/users/PathHero/repos","events_url":"https://api.github.com/users/PathHero/events{/privacy}","received_events_url":"https://api.github.com/users/PathHero/received_events","type":"Organization","site_admin":false},"repo":{"id":33278863,"name":"PathHero","full_name":"PathHero/PathHero","owner":{"login":"PathHero","id":11742049,"avatar_url":"https://avatars.githubusercontent.com/u/11742049?v=3","gravatar_id":"","url":"https://api.github.com/users/PathHero","html_url":"https://github.com/PathHero","followers_url":"https://api.github.com/users/PathHero/followers","following_url":"https://api.github.com/users/PathHero/following{/other_user}","gists_url":"https://api.github.com/users/PathHero/gists{/gist_id}","starred_url":"https://api.github.com/users/PathHero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PathHero/subscriptions","organizations_url":"https://api.github.com/users/PathHero/orgs","repos_url":"https://api.github.com/users/PathHero/repos","events_url":"https://api.github.com/users/PathHero/events{/privacy}","received_events_url":"https://api.github.com/users/PathHero/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PathHero/PathHero","description":null,"fork":false,"url":"https://api.github.com/repos/PathHero/PathHero","forks_url":"https://api.github.com/repos/PathHero/PathHero/forks","keys_url":"https://api.github.com/repos/PathHero/PathHero/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PathHero/PathHero/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PathHero/PathHero/teams","hooks_url":"https://api.github.com/repos/PathHero/PathHero/hooks","issue_events_url":"https://api.github.com/repos/PathHero/PathHero/issues/events{/number}","events_url":"https://api.github.com/repos/PathHero/PathHero/events","assignees_url":"https://api.github.com/repos/PathHero/PathHero/assignees{/user}","branches_url":"https://api.github.com/repos/PathHero/PathHero/branches{/branch}","tags_url":"https://api.github.com/repos/PathHero/PathHero/tags","blobs_url":"https://api.github.com/repos/PathHero/PathHero/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PathHero/PathHero/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PathHero/PathHero/git/refs{/sha}","trees_url":"https://api.github.com/repos/PathHero/PathHero/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PathHero/PathHero/statuses/{sha}","languages_url":"https://api.github.com/repos/PathHero/PathHero/languages","stargazers_url":"https://api.github.com/repos/PathHero/PathHero/stargazers","contributors_url":"https://api.github.com/repos/PathHero/PathHero/contributors","subscribers_url":"https://api.github.com/repos/PathHero/PathHero/subscribers","subscription_url":"https://api.github.com/repos/PathHero/PathHero/subscription","commits_url":"https://api.github.com/repos/PathHero/PathHero/commits{/sha}","git_commits_url":"https://api.github.com/repos/PathHero/PathHero/git/commits{/sha}","comments_url":"https://api.github.com/repos/PathHero/PathHero/comments{/number}","issue_comment_url":"https://api.github.com/repos/PathHero/PathHero/issues/comments{/number}","contents_url":"https://api.github.com/repos/PathHero/PathHero/contents/{+path}","compare_url":"https://api.github.com/repos/PathHero/PathHero/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PathHero/PathHero/merges","archive_url":"https://api.github.com/repos/PathHero/PathHero/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PathHero/PathHero/downloads","issues_url":"https://api.github.com/repos/PathHero/PathHero/issues{/number}","pulls_url":"https://api.github.com/repos/PathHero/PathHero/pulls{/number}","milestones_url":"https://api.github.com/repos/PathHero/PathHero/milestones{/number}","notifications_url":"https://api.github.com/repos/PathHero/PathHero/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PathHero/PathHero/labels{/name}","releases_url":"https://api.github.com/repos/PathHero/PathHero/releases{/id}","created_at":"2015-04-01T23:43:04Z","updated_at":"2015-04-07T02:51:12Z","pushed_at":"2015-04-07T02:53:07Z","git_url":"git://github.com/PathHero/PathHero.git","ssh_url":"git@github.com:PathHero/PathHero.git","clone_url":"https://github.com/PathHero/PathHero.git","svn_url":"https://github.com/PathHero/PathHero","homepage":null,"size":256,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":18,"forks":4,"open_issues":18,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PathHero/PathHero/pulls/29"},"html":{"href":"https://github.com/PathHero/PathHero/pull/29"},"issue":{"href":"https://api.github.com/repos/PathHero/PathHero/issues/29"},"comments":{"href":"https://api.github.com/repos/PathHero/PathHero/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/PathHero/PathHero/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/PathHero/PathHero/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PathHero/PathHero/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/PathHero/PathHero/statuses/f53ec1a640f844698e749938e78b2f23f31fd269"}}}}