{"action":"created","comment":{"url":"https://api.github.com/repos/azavea/cac-tripplanner/pulls/comments/26951800","id":26951800,"diff_hunk":"@@ -203,6 +204,47 @@ CAC.Control.SidebarExplore = (function ($, BikeOptions, MapTemplates, Typeahead,\n         $('div.address > h4').html(MapTemplates.addressText(location.feature.attributes));\n     }\n \n+    /**\n+     * Query OTP for travel time to a destination, then put it in the side panel.\n+     *\n+     * @param {Object} destination Destination put in the sidebar\n+     * @param {Object} $container jQuery-selected HTML snippet in the sidebar for the destination\n+     */\n+    function setDestinationDistance(destination, $container) {\n+        var mode = $(options.selectors.modeSelector).val();\n+        var picker = $(options.selectors.datepicker).data('DateTimePicker');\n+        var date = picker.date();\n+        if (!date) {\n+            // use current date/time if none set\n+            date = moment();\n+        }\n+        // only request one itinerary (first returned is the shortest)\n+        var otpOptions = { mode: mode, numItineraries: 1 };\n+        if (mode.indexOf('BICYCLE') > -1) {\n+            var bikeTriangleOpt = $('option:selected', options.selectors.bikeTriangleDiv);","path":"src/app/scripts/cac/control/cac-control-sidebar-explore.js","position":38,"original_position":38,"commit_id":"25fee0f293dc3aca4c60b7c5ade41c49c2381a19","original_commit_id":"25fee0f293dc3aca4c60b7c5ade41c49c2381a19","user":{"login":"CloudNiner","id":1818302,"avatar_url":"https://avatars.githubusercontent.com/u/1818302?v=3","gravatar_id":"","url":"https://api.github.com/users/CloudNiner","html_url":"https://github.com/CloudNiner","followers_url":"https://api.github.com/users/CloudNiner/followers","following_url":"https://api.github.com/users/CloudNiner/following{/other_user}","gists_url":"https://api.github.com/users/CloudNiner/gists{/gist_id}","starred_url":"https://api.github.com/users/CloudNiner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CloudNiner/subscriptions","organizations_url":"https://api.github.com/users/CloudNiner/orgs","repos_url":"https://api.github.com/users/CloudNiner/repos","events_url":"https://api.github.com/users/CloudNiner/events{/privacy}","received_events_url":"https://api.github.com/users/CloudNiner/received_events","type":"User","site_admin":false},"body":"Really probably going to want to refactor getting these values somehow if they get pulled in any more places.","created_at":"2015-03-23T16:18:12Z","updated_at":"2015-03-23T16:18:12Z","html_url":"https://github.com/azavea/cac-tripplanner/pull/122#discussion_r26951800","pull_request_url":"https://api.github.com/repos/azavea/cac-tripplanner/pulls/122","_links":{"self":{"href":"https://api.github.com/repos/azavea/cac-tripplanner/pulls/comments/26951800"},"html":{"href":"https://github.com/azavea/cac-tripplanner/pull/122#discussion_r26951800"},"pull_request":{"href":"https://api.github.com/repos/azavea/cac-tripplanner/pulls/122"}}},"pull_request":{"url":"https://api.github.com/repos/azavea/cac-tripplanner/pulls/122","id":31747337,"html_url":"https://github.com/azavea/cac-tripplanner/pull/122","diff_url":"https://github.com/azavea/cac-tripplanner/pull/122.diff","patch_url":"https://github.com/azavea/cac-tripplanner/pull/122.patch","issue_url":"https://api.github.com/repos/azavea/cac-tripplanner/issues/122","number":122,"state":"open","locked":false,"title":"Fetch travel times to destinations, put them in sidebar","user":{"login":"flibbertigibbet","id":960264,"avatar_url":"https://avatars.githubusercontent.com/u/960264?v=3","gravatar_id":"","url":"https://api.github.com/users/flibbertigibbet","html_url":"https://github.com/flibbertigibbet","followers_url":"https://api.github.com/users/flibbertigibbet/followers","following_url":"https://api.github.com/users/flibbertigibbet/following{/other_user}","gists_url":"https://api.github.com/users/flibbertigibbet/gists{/gist_id}","starred_url":"https://api.github.com/users/flibbertigibbet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flibbertigibbet/subscriptions","organizations_url":"https://api.github.com/users/flibbertigibbet/orgs","repos_url":"https://api.github.com/users/flibbertigibbet/repos","events_url":"https://api.github.com/users/flibbertigibbet/events{/privacy}","received_events_url":"https://api.github.com/users/flibbertigibbet/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-23T16:13:04Z","updated_at":"2015-03-23T16:18:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"45712424b9afc00036d665f5b58076154d2ae3a3","assignee":{"login":"CloudNiner","id":1818302,"avatar_url":"https://avatars.githubusercontent.com/u/1818302?v=3","gravatar_id":"","url":"https://api.github.com/users/CloudNiner","html_url":"https://github.com/CloudNiner","followers_url":"https://api.github.com/users/CloudNiner/followers","following_url":"https://api.github.com/users/CloudNiner/following{/other_user}","gists_url":"https://api.github.com/users/CloudNiner/gists{/gist_id}","starred_url":"https://api.github.com/users/CloudNiner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CloudNiner/subscriptions","organizations_url":"https://api.github.com/users/CloudNiner/orgs","repos_url":"https://api.github.com/users/CloudNiner/repos","events_url":"https://api.github.com/users/CloudNiner/events{/privacy}","received_events_url":"https://api.github.com/users/CloudNiner/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/azavea/cac-tripplanner/pulls/122/commits","review_comments_url":"https://api.github.com/repos/azavea/cac-tripplanner/pulls/122/comments","review_comment_url":"https://api.github.com/repos/azavea/cac-tripplanner/pulls/comments{/number}","comments_url":"https://api.github.com/repos/azavea/cac-tripplanner/issues/122/comments","statuses_url":"https://api.github.com/repos/azavea/cac-tripplanner/statuses/25fee0f293dc3aca4c60b7c5ade41c49c2381a19","head":{"label":"flibbertigibbet:feature/async-travel-time-fetch","ref":"feature/async-travel-time-fetch","sha":"25fee0f293dc3aca4c60b7c5ade41c49c2381a19","user":{"login":"flibbertigibbet","id":960264,"avatar_url":"https://avatars.githubusercontent.com/u/960264?v=3","gravatar_id":"","url":"https://api.github.com/users/flibbertigibbet","html_url":"https://github.com/flibbertigibbet","followers_url":"https://api.github.com/users/flibbertigibbet/followers","following_url":"https://api.github.com/users/flibbertigibbet/following{/other_user}","gists_url":"https://api.github.com/users/flibbertigibbet/gists{/gist_id}","starred_url":"https://api.github.com/users/flibbertigibbet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flibbertigibbet/subscriptions","organizations_url":"https://api.github.com/users/flibbertigibbet/orgs","repos_url":"https://api.github.com/users/flibbertigibbet/repos","events_url":"https://api.github.com/users/flibbertigibbet/events{/privacy}","received_events_url":"https://api.github.com/users/flibbertigibbet/received_events","type":"User","site_admin":false},"repo":{"id":31267987,"name":"cac-tripplanner","full_name":"flibbertigibbet/cac-tripplanner","owner":{"login":"flibbertigibbet","id":960264,"avatar_url":"https://avatars.githubusercontent.com/u/960264?v=3","gravatar_id":"","url":"https://api.github.com/users/flibbertigibbet","html_url":"https://github.com/flibbertigibbet","followers_url":"https://api.github.com/users/flibbertigibbet/followers","following_url":"https://api.github.com/users/flibbertigibbet/following{/other_user}","gists_url":"https://api.github.com/users/flibbertigibbet/gists{/gist_id}","starred_url":"https://api.github.com/users/flibbertigibbet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flibbertigibbet/subscriptions","organizations_url":"https://api.github.com/users/flibbertigibbet/orgs","repos_url":"https://api.github.com/users/flibbertigibbet/repos","events_url":"https://api.github.com/users/flibbertigibbet/events{/privacy}","received_events_url":"https://api.github.com/users/flibbertigibbet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/flibbertigibbet/cac-tripplanner","description":"","fork":true,"url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner","forks_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/forks","keys_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/teams","hooks_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/hooks","issue_events_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/issues/events{/number}","events_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/events","assignees_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/assignees{/user}","branches_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/branches{/branch}","tags_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/tags","blobs_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/git/refs{/sha}","trees_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/statuses/{sha}","languages_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/languages","stargazers_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/stargazers","contributors_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/contributors","subscribers_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/subscribers","subscription_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/subscription","commits_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/commits{/sha}","git_commits_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/git/commits{/sha}","comments_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/comments{/number}","issue_comment_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/issues/comments{/number}","contents_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/contents/{+path}","compare_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/merges","archive_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/downloads","issues_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/issues{/number}","pulls_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/pulls{/number}","milestones_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/milestones{/number}","notifications_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/labels{/name}","releases_url":"https://api.github.com/repos/flibbertigibbet/cac-tripplanner/releases{/id}","created_at":"2015-02-24T16:00:30Z","updated_at":"2015-03-23T15:03:48Z","pushed_at":"2015-03-23T16:10:54Z","git_url":"git://github.com/flibbertigibbet/cac-tripplanner.git","ssh_url":"git@github.com:flibbertigibbet/cac-tripplanner.git","clone_url":"https://github.com/flibbertigibbet/cac-tripplanner.git","svn_url":"https://github.com/flibbertigibbet/cac-tripplanner","homepage":null,"size":2815,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"develop"}},"base":{"label":"azavea:develop","ref":"develop","sha":"670c7bb3fea96e71c302f0efe0c33ba7107dae1d","user":{"login":"azavea","id":595231,"avatar_url":"https://avatars.githubusercontent.com/u/595231?v=3","gravatar_id":"","url":"https://api.github.com/users/azavea","html_url":"https://github.com/azavea","followers_url":"https://api.github.com/users/azavea/followers","following_url":"https://api.github.com/users/azavea/following{/other_user}","gists_url":"https://api.github.com/users/azavea/gists{/gist_id}","starred_url":"https://api.github.com/users/azavea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azavea/subscriptions","organizations_url":"https://api.github.com/users/azavea/orgs","repos_url":"https://api.github.com/users/azavea/repos","events_url":"https://api.github.com/users/azavea/events{/privacy}","received_events_url":"https://api.github.com/users/azavea/received_events","type":"Organization","site_admin":false},"repo":{"id":27089530,"name":"cac-tripplanner","full_name":"azavea/cac-tripplanner","owner":{"login":"azavea","id":595231,"avatar_url":"https://avatars.githubusercontent.com/u/595231?v=3","gravatar_id":"","url":"https://api.github.com/users/azavea","html_url":"https://github.com/azavea","followers_url":"https://api.github.com/users/azavea/followers","following_url":"https://api.github.com/users/azavea/following{/other_user}","gists_url":"https://api.github.com/users/azavea/gists{/gist_id}","starred_url":"https://api.github.com/users/azavea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azavea/subscriptions","organizations_url":"https://api.github.com/users/azavea/orgs","repos_url":"https://api.github.com/users/azavea/repos","events_url":"https://api.github.com/users/azavea/events{/privacy}","received_events_url":"https://api.github.com/users/azavea/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/azavea/cac-tripplanner","description":"Clean Air Council Circuit Trip Planner and Travelshed","fork":false,"url":"https://api.github.com/repos/azavea/cac-tripplanner","forks_url":"https://api.github.com/repos/azavea/cac-tripplanner/forks","keys_url":"https://api.github.com/repos/azavea/cac-tripplanner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/azavea/cac-tripplanner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/azavea/cac-tripplanner/teams","hooks_url":"https://api.github.com/repos/azavea/cac-tripplanner/hooks","issue_events_url":"https://api.github.com/repos/azavea/cac-tripplanner/issues/events{/number}","events_url":"https://api.github.com/repos/azavea/cac-tripplanner/events","assignees_url":"https://api.github.com/repos/azavea/cac-tripplanner/assignees{/user}","branches_url":"https://api.github.com/repos/azavea/cac-tripplanner/branches{/branch}","tags_url":"https://api.github.com/repos/azavea/cac-tripplanner/tags","blobs_url":"https://api.github.com/repos/azavea/cac-tripplanner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/azavea/cac-tripplanner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/azavea/cac-tripplanner/git/refs{/sha}","trees_url":"https://api.github.com/repos/azavea/cac-tripplanner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/azavea/cac-tripplanner/statuses/{sha}","languages_url":"https://api.github.com/repos/azavea/cac-tripplanner/languages","stargazers_url":"https://api.github.com/repos/azavea/cac-tripplanner/stargazers","contributors_url":"https://api.github.com/repos/azavea/cac-tripplanner/contributors","subscribers_url":"https://api.github.com/repos/azavea/cac-tripplanner/subscribers","subscription_url":"https://api.github.com/repos/azavea/cac-tripplanner/subscription","commits_url":"https://api.github.com/repos/azavea/cac-tripplanner/commits{/sha}","git_commits_url":"https://api.github.com/repos/azavea/cac-tripplanner/git/commits{/sha}","comments_url":"https://api.github.com/repos/azavea/cac-tripplanner/comments{/number}","issue_comment_url":"https://api.github.com/repos/azavea/cac-tripplanner/issues/comments{/number}","contents_url":"https://api.github.com/repos/azavea/cac-tripplanner/contents/{+path}","compare_url":"https://api.github.com/repos/azavea/cac-tripplanner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/azavea/cac-tripplanner/merges","archive_url":"https://api.github.com/repos/azavea/cac-tripplanner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/azavea/cac-tripplanner/downloads","issues_url":"https://api.github.com/repos/azavea/cac-tripplanner/issues{/number}","pulls_url":"https://api.github.com/repos/azavea/cac-tripplanner/pulls{/number}","milestones_url":"https://api.github.com/repos/azavea/cac-tripplanner/milestones{/number}","notifications_url":"https://api.github.com/repos/azavea/cac-tripplanner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/azavea/cac-tripplanner/labels{/name}","releases_url":"https://api.github.com/repos/azavea/cac-tripplanner/releases{/id}","created_at":"2014-11-24T18:46:16Z","updated_at":"2015-03-23T15:03:22Z","pushed_at":"2015-03-23T16:13:05Z","git_url":"git://github.com/azavea/cac-tripplanner.git","ssh_url":"git@github.com:azavea/cac-tripplanner.git","clone_url":"https://github.com/azavea/cac-tripplanner.git","svn_url":"https://github.com/azavea/cac-tripplanner","homepage":"","size":4551,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":6,"forks":2,"open_issues":6,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/azavea/cac-tripplanner/pulls/122"},"html":{"href":"https://github.com/azavea/cac-tripplanner/pull/122"},"issue":{"href":"https://api.github.com/repos/azavea/cac-tripplanner/issues/122"},"comments":{"href":"https://api.github.com/repos/azavea/cac-tripplanner/issues/122/comments"},"review_comments":{"href":"https://api.github.com/repos/azavea/cac-tripplanner/pulls/122/comments"},"review_comment":{"href":"https://api.github.com/repos/azavea/cac-tripplanner/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/azavea/cac-tripplanner/pulls/122/commits"},"statuses":{"href":"https://api.github.com/repos/azavea/cac-tripplanner/statuses/25fee0f293dc3aca4c60b7c5ade41c49c2381a19"}}}}