{"action":"created","comment":{"url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/pulls/comments/91287738","pull_request_review_id":11795420,"id":91287738,"diff_hunk":"@@ -16,9 +19,34 @@\n         };\n \n         function getImageDataByLocation (location) {\n-            const MAX_RADIUS = 10000;\n-            return getStraatbeeld(straatbeeldConfig.STRAATBEELD_ENDPOINT +\n-                `?lat=${location[0]}&lon=${location[1]}&radius=${MAX_RADIUS}`);\n+            let result = $q.defer();\n+\n+            searchWithinRadius(location, START_RADIUS, result);\n+\n+            return result.promise;\n+        }\n+\n+        /**\n+         * Search for a straatbeeld\n+         * @param {Number[]} location the center location\n+         * @param {Number} radius the distance from the location within to search for a straatbeeld\n+         * @param {Promise.imageData} resultPromise the promise to resolve on found straatbeeld or reject on failure\n+         */\n+        function searchWithinRadius (location, radius, resultPromise) {\n+            radius = Math.min(radius, MAX_RADIUS);","path":"modules/straatbeeld/services/straatbeeld-api/straatbeeld-api.factory.js","position":null,"original_position":31,"commit_id":"39b29c0465ed301c6832fc59ba1907f518a32a97","original_commit_id":"8f4f8a4461c0fda79bf741835e11a8e045df5f01","user":{"login":"Vegter","id":6680002,"avatar_url":"https://avatars.githubusercontent.com/u/6680002?v=3","gravatar_id":"","url":"https://api.github.com/users/Vegter","html_url":"https://github.com/Vegter","followers_url":"https://api.github.com/users/Vegter/followers","following_url":"https://api.github.com/users/Vegter/following{/other_user}","gists_url":"https://api.github.com/users/Vegter/gists{/gist_id}","starred_url":"https://api.github.com/users/Vegter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vegter/subscriptions","organizations_url":"https://api.github.com/users/Vegter/orgs","repos_url":"https://api.github.com/users/Vegter/repos","events_url":"https://api.github.com/users/Vegter/events{/privacy}","received_events_url":"https://api.github.com/users/Vegter/received_events","type":"User","site_admin":false},"body":"Aangepast, het betreft een radius die is afgekapt op max 10km. cappedRadius dus...","created_at":"2016-12-07T13:03:46Z","updated_at":"2016-12-07T13:03:46Z","html_url":"https://github.com/DatapuntAmsterdam/atlas/pull/325#discussion_r91287738","pull_request_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/pulls/325","_links":{"self":{"href":"https://api.github.com/repos/DatapuntAmsterdam/atlas/pulls/comments/91287738"},"html":{"href":"https://github.com/DatapuntAmsterdam/atlas/pull/325#discussion_r91287738"},"pull_request":{"href":"https://api.github.com/repos/DatapuntAmsterdam/atlas/pulls/325"}}},"pull_request":{"url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/pulls/325","id":96732356,"html_url":"https://github.com/DatapuntAmsterdam/atlas/pull/325","diff_url":"https://github.com/DatapuntAmsterdam/atlas/pull/325.diff","patch_url":"https://github.com/DatapuntAmsterdam/atlas/pull/325.patch","issue_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/issues/325","number":325,"state":"open","locked":false,"title":"Feature/tg2319 versnellen laden pano","user":{"login":"Vegter","id":6680002,"avatar_url":"https://avatars.githubusercontent.com/u/6680002?v=3","gravatar_id":"","url":"https://api.github.com/users/Vegter","html_url":"https://github.com/Vegter","followers_url":"https://api.github.com/users/Vegter/followers","following_url":"https://api.github.com/users/Vegter/following{/other_user}","gists_url":"https://api.github.com/users/Vegter/gists{/gist_id}","starred_url":"https://api.github.com/users/Vegter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vegter/subscriptions","organizations_url":"https://api.github.com/users/Vegter/orgs","repos_url":"https://api.github.com/users/Vegter/repos","events_url":"https://api.github.com/users/Vegter/events{/privacy}","received_events_url":"https://api.github.com/users/Vegter/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-06T14:21:05Z","updated_at":"2016-12-07T13:03:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b63ce9f3df836d54d8dbf957a3381a4dc61db72e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/pulls/325/commits","review_comments_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/pulls/325/comments","review_comment_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/issues/325/comments","statuses_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/statuses/39b29c0465ed301c6832fc59ba1907f518a32a97","head":{"label":"DatapuntAmsterdam:feature/tg2319-versnellen-laden-pano","ref":"feature/tg2319-versnellen-laden-pano","sha":"39b29c0465ed301c6832fc59ba1907f518a32a97","user":{"login":"DatapuntAmsterdam","id":15195167,"avatar_url":"https://avatars.githubusercontent.com/u/15195167?v=3","gravatar_id":"","url":"https://api.github.com/users/DatapuntAmsterdam","html_url":"https://github.com/DatapuntAmsterdam","followers_url":"https://api.github.com/users/DatapuntAmsterdam/followers","following_url":"https://api.github.com/users/DatapuntAmsterdam/following{/other_user}","gists_url":"https://api.github.com/users/DatapuntAmsterdam/gists{/gist_id}","starred_url":"https://api.github.com/users/DatapuntAmsterdam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DatapuntAmsterdam/subscriptions","organizations_url":"https://api.github.com/users/DatapuntAmsterdam/orgs","repos_url":"https://api.github.com/users/DatapuntAmsterdam/repos","events_url":"https://api.github.com/users/DatapuntAmsterdam/events{/privacy}","received_events_url":"https://api.github.com/users/DatapuntAmsterdam/received_events","type":"Organization","site_admin":false},"repo":{"id":60016458,"name":"atlas","full_name":"DatapuntAmsterdam/atlas","owner":{"login":"DatapuntAmsterdam","id":15195167,"avatar_url":"https://avatars.githubusercontent.com/u/15195167?v=3","gravatar_id":"","url":"https://api.github.com/users/DatapuntAmsterdam","html_url":"https://github.com/DatapuntAmsterdam","followers_url":"https://api.github.com/users/DatapuntAmsterdam/followers","following_url":"https://api.github.com/users/DatapuntAmsterdam/following{/other_user}","gists_url":"https://api.github.com/users/DatapuntAmsterdam/gists{/gist_id}","starred_url":"https://api.github.com/users/DatapuntAmsterdam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DatapuntAmsterdam/subscriptions","organizations_url":"https://api.github.com/users/DatapuntAmsterdam/orgs","repos_url":"https://api.github.com/users/DatapuntAmsterdam/repos","events_url":"https://api.github.com/users/DatapuntAmsterdam/events{/privacy}","received_events_url":"https://api.github.com/users/DatapuntAmsterdam/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DatapuntAmsterdam/atlas","description":null,"fork":false,"url":"https://api.github.com/repos/DatapuntAmsterdam/atlas","forks_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/forks","keys_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/teams","hooks_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/hooks","issue_events_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/issues/events{/number}","events_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/events","assignees_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/assignees{/user}","branches_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/branches{/branch}","tags_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/tags","blobs_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/git/refs{/sha}","trees_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/statuses/{sha}","languages_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/languages","stargazers_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/stargazers","contributors_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/contributors","subscribers_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/subscribers","subscription_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/subscription","commits_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/commits{/sha}","git_commits_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/git/commits{/sha}","comments_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/comments{/number}","issue_comment_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/issues/comments{/number}","contents_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/contents/{+path}","compare_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/merges","archive_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/downloads","issues_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/issues{/number}","pulls_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/pulls{/number}","milestones_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/milestones{/number}","notifications_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/labels{/name}","releases_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/releases{/id}","deployments_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/deployments","created_at":"2016-05-30T14:31:42Z","updated_at":"2016-10-25T06:17:20Z","pushed_at":"2016-12-07T13:02:57Z","git_url":"git://github.com/DatapuntAmsterdam/atlas.git","ssh_url":"git@github.com:DatapuntAmsterdam/atlas.git","clone_url":"https://github.com/DatapuntAmsterdam/atlas.git","svn_url":"https://github.com/DatapuntAmsterdam/atlas","homepage":"","size":9163,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":5,"forks":3,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"DatapuntAmsterdam:master","ref":"master","sha":"2c2321a9d01ecbe8ac617af44ba298cbecb37573","user":{"login":"DatapuntAmsterdam","id":15195167,"avatar_url":"https://avatars.githubusercontent.com/u/15195167?v=3","gravatar_id":"","url":"https://api.github.com/users/DatapuntAmsterdam","html_url":"https://github.com/DatapuntAmsterdam","followers_url":"https://api.github.com/users/DatapuntAmsterdam/followers","following_url":"https://api.github.com/users/DatapuntAmsterdam/following{/other_user}","gists_url":"https://api.github.com/users/DatapuntAmsterdam/gists{/gist_id}","starred_url":"https://api.github.com/users/DatapuntAmsterdam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DatapuntAmsterdam/subscriptions","organizations_url":"https://api.github.com/users/DatapuntAmsterdam/orgs","repos_url":"https://api.github.com/users/DatapuntAmsterdam/repos","events_url":"https://api.github.com/users/DatapuntAmsterdam/events{/privacy}","received_events_url":"https://api.github.com/users/DatapuntAmsterdam/received_events","type":"Organization","site_admin":false},"repo":{"id":60016458,"name":"atlas","full_name":"DatapuntAmsterdam/atlas","owner":{"login":"DatapuntAmsterdam","id":15195167,"avatar_url":"https://avatars.githubusercontent.com/u/15195167?v=3","gravatar_id":"","url":"https://api.github.com/users/DatapuntAmsterdam","html_url":"https://github.com/DatapuntAmsterdam","followers_url":"https://api.github.com/users/DatapuntAmsterdam/followers","following_url":"https://api.github.com/users/DatapuntAmsterdam/following{/other_user}","gists_url":"https://api.github.com/users/DatapuntAmsterdam/gists{/gist_id}","starred_url":"https://api.github.com/users/DatapuntAmsterdam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DatapuntAmsterdam/subscriptions","organizations_url":"https://api.github.com/users/DatapuntAmsterdam/orgs","repos_url":"https://api.github.com/users/DatapuntAmsterdam/repos","events_url":"https://api.github.com/users/DatapuntAmsterdam/events{/privacy}","received_events_url":"https://api.github.com/users/DatapuntAmsterdam/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DatapuntAmsterdam/atlas","description":null,"fork":false,"url":"https://api.github.com/repos/DatapuntAmsterdam/atlas","forks_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/forks","keys_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/teams","hooks_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/hooks","issue_events_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/issues/events{/number}","events_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/events","assignees_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/assignees{/user}","branches_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/branches{/branch}","tags_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/tags","blobs_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/git/refs{/sha}","trees_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/statuses/{sha}","languages_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/languages","stargazers_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/stargazers","contributors_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/contributors","subscribers_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/subscribers","subscription_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/subscription","commits_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/commits{/sha}","git_commits_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/git/commits{/sha}","comments_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/comments{/number}","issue_comment_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/issues/comments{/number}","contents_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/contents/{+path}","compare_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/merges","archive_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/downloads","issues_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/issues{/number}","pulls_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/pulls{/number}","milestones_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/milestones{/number}","notifications_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/labels{/name}","releases_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/releases{/id}","deployments_url":"https://api.github.com/repos/DatapuntAmsterdam/atlas/deployments","created_at":"2016-05-30T14:31:42Z","updated_at":"2016-10-25T06:17:20Z","pushed_at":"2016-12-07T13:02:57Z","git_url":"git://github.com/DatapuntAmsterdam/atlas.git","ssh_url":"git@github.com:DatapuntAmsterdam/atlas.git","clone_url":"https://github.com/DatapuntAmsterdam/atlas.git","svn_url":"https://github.com/DatapuntAmsterdam/atlas","homepage":"","size":9163,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":5,"forks":3,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DatapuntAmsterdam/atlas/pulls/325"},"html":{"href":"https://github.com/DatapuntAmsterdam/atlas/pull/325"},"issue":{"href":"https://api.github.com/repos/DatapuntAmsterdam/atlas/issues/325"},"comments":{"href":"https://api.github.com/repos/DatapuntAmsterdam/atlas/issues/325/comments"},"review_comments":{"href":"https://api.github.com/repos/DatapuntAmsterdam/atlas/pulls/325/comments"},"review_comment":{"href":"https://api.github.com/repos/DatapuntAmsterdam/atlas/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DatapuntAmsterdam/atlas/pulls/325/commits"},"statuses":{"href":"https://api.github.com/repos/DatapuntAmsterdam/atlas/statuses/39b29c0465ed301c6832fc59ba1907f518a32a97"}}}}
{"actor":{"display_login":"Vegter"}}