{"action":"created","comment":{"url":"https://api.github.com/repos/diaspora/diaspora/pulls/comments/39148323","id":39148323,"diff_hunk":"@@ -1,7 +1,52 @@\n // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later\n \n app.views.LocationStream = app.views.Content.extend({\n-  templateName: \"status-message-location\"\n+  events: {\n+    \"click .near-from\": \"toggleMap\"\n+  },\n+  templateName: \"status-message-location\",\n+\n+  toggleMap: function () {\n+    var mapContainer = this.$el.find(\".mapContainer\");\n+\n+    if (mapContainer.hasClass(\"empty\")) {\n+      var location = this.model.get(\"location\");\n+      mapContainer.css(\"height\", \"150px\");\n+\n+      if (location.lat) {\n+        // If map function is enabled the maptiles from the Heidelberg University are used by default.\n+\n+        var map = L.map(mapContainer[0]).setView([location.lat, location.lng], 14);\n+\n+        var tiles = L.tileLayer(\"http://korona.geog.uni-heidelberg.de/tiles/roads/x={x}&y={y}&z={z}\", {\n+          attribution: \"Map data &copy; <a href='http://openstreetmap.org'>OpenStreetMap</a> contributors, \" +\n+                        \"rendering <a href='http://giscience.uni-hd.de/'>\" +\n+                        \"GIScience Research Group @ Heidelberg University</a>\",\n+          maxZoom: 18,\n+          });","path":"app/assets/javascripts/app/views/location_stream.js","position":27,"original_position":27,"commit_id":"263dc6f119344b64c690ab4f85ff94a11c756fe5","original_commit_id":"263dc6f119344b64c690ab4f85ff94a11c756fe5","user":{"login":"svbergerem","id":3798614,"avatar_url":"https://avatars.githubusercontent.com/u/3798614?v=3","gravatar_id":"","url":"https://api.github.com/users/svbergerem","html_url":"https://github.com/svbergerem","followers_url":"https://api.github.com/users/svbergerem/followers","following_url":"https://api.github.com/users/svbergerem/following{/other_user}","gists_url":"https://api.github.com/users/svbergerem/gists{/gist_id}","starred_url":"https://api.github.com/users/svbergerem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svbergerem/subscriptions","organizations_url":"https://api.github.com/users/svbergerem/orgs","repos_url":"https://api.github.com/users/svbergerem/repos","events_url":"https://api.github.com/users/svbergerem/events{/privacy}","received_events_url":"https://api.github.com/users/svbergerem/received_events","type":"User","site_admin":false},"body":"Maybe remove 2 spaces here?\r\n```js\r\nvar tiles = L.tileLayer(..., {\r\n  attribution: ...,\r\n  maxZoom: 18\r\n});\r\n```","created_at":"2015-09-10T11:13:35Z","updated_at":"2015-09-10T11:13:35Z","html_url":"https://github.com/diaspora/diaspora/pull/6256#discussion_r39148323","pull_request_url":"https://api.github.com/repos/diaspora/diaspora/pulls/6256","_links":{"self":{"href":"https://api.github.com/repos/diaspora/diaspora/pulls/comments/39148323"},"html":{"href":"https://github.com/diaspora/diaspora/pull/6256#discussion_r39148323"},"pull_request":{"href":"https://api.github.com/repos/diaspora/diaspora/pulls/6256"}}},"pull_request":{"url":"https://api.github.com/repos/diaspora/diaspora/pulls/6256","id":41011903,"html_url":"https://github.com/diaspora/diaspora/pull/6256","diff_url":"https://github.com/diaspora/diaspora/pull/6256.diff","patch_url":"https://github.com/diaspora/diaspora/pull/6256.patch","issue_url":"https://api.github.com/repos/diaspora/diaspora/issues/6256","number":6256,"state":"open","locked":false,"title":"5813 show geolocation on osm","user":{"login":"zaziemo","id":2119496,"avatar_url":"https://avatars.githubusercontent.com/u/2119496?v=3","gravatar_id":"","url":"https://api.github.com/users/zaziemo","html_url":"https://github.com/zaziemo","followers_url":"https://api.github.com/users/zaziemo/followers","following_url":"https://api.github.com/users/zaziemo/following{/other_user}","gists_url":"https://api.github.com/users/zaziemo/gists{/gist_id}","starred_url":"https://api.github.com/users/zaziemo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zaziemo/subscriptions","organizations_url":"https://api.github.com/users/zaziemo/orgs","repos_url":"https://api.github.com/users/zaziemo/repos","events_url":"https://api.github.com/users/zaziemo/events{/privacy}","received_events_url":"https://api.github.com/users/zaziemo/received_events","type":"User","site_admin":false},"body":"Things @Realtin and I still have to work on but where we need discussion/decision or help:\r\n\r\n**Tile Server**\r\nCurrently we are using mapbox.com which provides free access for up to 50.000 requests per month\r\n- [x]  should every podmin get their own key or should we negotiate one access for everyone\r\n- [x] should we stick to using mapbox or should we probably use another tile server  \r\n- [x] how and where to store the tileserver configuration into the AppConfig?\r\n\r\n**Tests**\r\nWe implemented some Jasmine-Tests but one of them is not working: https://github.com/TeamDeltaQuadrant/diaspora/blob/5813-show-geolocation-on-osm/spec/javascripts/app/views/location_stream_spec.js (see comment)\r\n\r\n**View/Subview**\r\n~~Currently we add the map container div with jquery which is probably not the most elegant solution. Should we add a subview for the map and if so: How do we do that?~~","created_at":"2015-07-28T13:37:12Z","updated_at":"2015-09-10T11:13:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8c586d9e3c7b3483108846d9112ad59bf8b6094c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/diaspora/diaspora/pulls/6256/commits","review_comments_url":"https://api.github.com/repos/diaspora/diaspora/pulls/6256/comments","review_comment_url":"https://api.github.com/repos/diaspora/diaspora/pulls/comments{/number}","comments_url":"https://api.github.com/repos/diaspora/diaspora/issues/6256/comments","statuses_url":"https://api.github.com/repos/diaspora/diaspora/statuses/263dc6f119344b64c690ab4f85ff94a11c756fe5","head":{"label":"TeamDeltaQuadrant:5813-show-geolocation-on-osm","ref":"5813-show-geolocation-on-osm","sha":"263dc6f119344b64c690ab4f85ff94a11c756fe5","user":{"login":"TeamDeltaQuadrant","id":11795785,"avatar_url":"https://avatars.githubusercontent.com/u/11795785?v=3","gravatar_id":"","url":"https://api.github.com/users/TeamDeltaQuadrant","html_url":"https://github.com/TeamDeltaQuadrant","followers_url":"https://api.github.com/users/TeamDeltaQuadrant/followers","following_url":"https://api.github.com/users/TeamDeltaQuadrant/following{/other_user}","gists_url":"https://api.github.com/users/TeamDeltaQuadrant/gists{/gist_id}","starred_url":"https://api.github.com/users/TeamDeltaQuadrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeamDeltaQuadrant/subscriptions","organizations_url":"https://api.github.com/users/TeamDeltaQuadrant/orgs","repos_url":"https://api.github.com/users/TeamDeltaQuadrant/repos","events_url":"https://api.github.com/users/TeamDeltaQuadrant/events{/privacy}","received_events_url":"https://api.github.com/users/TeamDeltaQuadrant/received_events","type":"Organization","site_admin":false},"repo":{"id":38496047,"name":"diaspora","full_name":"TeamDeltaQuadrant/diaspora","owner":{"login":"TeamDeltaQuadrant","id":11795785,"avatar_url":"https://avatars.githubusercontent.com/u/11795785?v=3","gravatar_id":"","url":"https://api.github.com/users/TeamDeltaQuadrant","html_url":"https://github.com/TeamDeltaQuadrant","followers_url":"https://api.github.com/users/TeamDeltaQuadrant/followers","following_url":"https://api.github.com/users/TeamDeltaQuadrant/following{/other_user}","gists_url":"https://api.github.com/users/TeamDeltaQuadrant/gists{/gist_id}","starred_url":"https://api.github.com/users/TeamDeltaQuadrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeamDeltaQuadrant/subscriptions","organizations_url":"https://api.github.com/users/TeamDeltaQuadrant/orgs","repos_url":"https://api.github.com/users/TeamDeltaQuadrant/repos","events_url":"https://api.github.com/users/TeamDeltaQuadrant/events{/privacy}","received_events_url":"https://api.github.com/users/TeamDeltaQuadrant/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TeamDeltaQuadrant/diaspora","description":"Distributed and contextual social networking","fork":true,"url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora","forks_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/forks","keys_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/teams","hooks_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/hooks","issue_events_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/issues/events{/number}","events_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/events","assignees_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/assignees{/user}","branches_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/branches{/branch}","tags_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/tags","blobs_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/git/refs{/sha}","trees_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/statuses/{sha}","languages_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/languages","stargazers_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/stargazers","contributors_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/contributors","subscribers_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/subscribers","subscription_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/subscription","commits_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/commits{/sha}","git_commits_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/git/commits{/sha}","comments_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/comments{/number}","issue_comment_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/issues/comments{/number}","contents_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/contents/{+path}","compare_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/merges","archive_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/downloads","issues_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/issues{/number}","pulls_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/pulls{/number}","milestones_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/milestones{/number}","notifications_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/labels{/name}","releases_url":"https://api.github.com/repos/TeamDeltaQuadrant/diaspora/releases{/id}","created_at":"2015-07-03T14:16:37Z","updated_at":"2015-07-03T14:16:41Z","pushed_at":"2015-09-09T15:03:54Z","git_url":"git://github.com/TeamDeltaQuadrant/diaspora.git","ssh_url":"git@github.com:TeamDeltaQuadrant/diaspora.git","clone_url":"https://github.com/TeamDeltaQuadrant/diaspora.git","svn_url":"https://github.com/TeamDeltaQuadrant/diaspora","homepage":"https://diasporafoundation.org/","size":102273,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"diaspora:develop","ref":"develop","sha":"f9a452265d0b5f42d2a536ee35474dbb998bbfdc","user":{"login":"diaspora","id":293207,"avatar_url":"https://avatars.githubusercontent.com/u/293207?v=3","gravatar_id":"","url":"https://api.github.com/users/diaspora","html_url":"https://github.com/diaspora","followers_url":"https://api.github.com/users/diaspora/followers","following_url":"https://api.github.com/users/diaspora/following{/other_user}","gists_url":"https://api.github.com/users/diaspora/gists{/gist_id}","starred_url":"https://api.github.com/users/diaspora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diaspora/subscriptions","organizations_url":"https://api.github.com/users/diaspora/orgs","repos_url":"https://api.github.com/users/diaspora/repos","events_url":"https://api.github.com/users/diaspora/events{/privacy}","received_events_url":"https://api.github.com/users/diaspora/received_events","type":"Organization","site_admin":false},"repo":{"id":911765,"name":"diaspora","full_name":"diaspora/diaspora","owner":{"login":"diaspora","id":293207,"avatar_url":"https://avatars.githubusercontent.com/u/293207?v=3","gravatar_id":"","url":"https://api.github.com/users/diaspora","html_url":"https://github.com/diaspora","followers_url":"https://api.github.com/users/diaspora/followers","following_url":"https://api.github.com/users/diaspora/following{/other_user}","gists_url":"https://api.github.com/users/diaspora/gists{/gist_id}","starred_url":"https://api.github.com/users/diaspora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diaspora/subscriptions","organizations_url":"https://api.github.com/users/diaspora/orgs","repos_url":"https://api.github.com/users/diaspora/repos","events_url":"https://api.github.com/users/diaspora/events{/privacy}","received_events_url":"https://api.github.com/users/diaspora/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/diaspora/diaspora","description":"Distributed and contextual social networking","fork":false,"url":"https://api.github.com/repos/diaspora/diaspora","forks_url":"https://api.github.com/repos/diaspora/diaspora/forks","keys_url":"https://api.github.com/repos/diaspora/diaspora/keys{/key_id}","collaborators_url":"https://api.github.com/repos/diaspora/diaspora/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/diaspora/diaspora/teams","hooks_url":"https://api.github.com/repos/diaspora/diaspora/hooks","issue_events_url":"https://api.github.com/repos/diaspora/diaspora/issues/events{/number}","events_url":"https://api.github.com/repos/diaspora/diaspora/events","assignees_url":"https://api.github.com/repos/diaspora/diaspora/assignees{/user}","branches_url":"https://api.github.com/repos/diaspora/diaspora/branches{/branch}","tags_url":"https://api.github.com/repos/diaspora/diaspora/tags","blobs_url":"https://api.github.com/repos/diaspora/diaspora/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/diaspora/diaspora/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/diaspora/diaspora/git/refs{/sha}","trees_url":"https://api.github.com/repos/diaspora/diaspora/git/trees{/sha}","statuses_url":"https://api.github.com/repos/diaspora/diaspora/statuses/{sha}","languages_url":"https://api.github.com/repos/diaspora/diaspora/languages","stargazers_url":"https://api.github.com/repos/diaspora/diaspora/stargazers","contributors_url":"https://api.github.com/repos/diaspora/diaspora/contributors","subscribers_url":"https://api.github.com/repos/diaspora/diaspora/subscribers","subscription_url":"https://api.github.com/repos/diaspora/diaspora/subscription","commits_url":"https://api.github.com/repos/diaspora/diaspora/commits{/sha}","git_commits_url":"https://api.github.com/repos/diaspora/diaspora/git/commits{/sha}","comments_url":"https://api.github.com/repos/diaspora/diaspora/comments{/number}","issue_comment_url":"https://api.github.com/repos/diaspora/diaspora/issues/comments{/number}","contents_url":"https://api.github.com/repos/diaspora/diaspora/contents/{+path}","compare_url":"https://api.github.com/repos/diaspora/diaspora/compare/{base}...{head}","merges_url":"https://api.github.com/repos/diaspora/diaspora/merges","archive_url":"https://api.github.com/repos/diaspora/diaspora/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/diaspora/diaspora/downloads","issues_url":"https://api.github.com/repos/diaspora/diaspora/issues{/number}","pulls_url":"https://api.github.com/repos/diaspora/diaspora/pulls{/number}","milestones_url":"https://api.github.com/repos/diaspora/diaspora/milestones{/number}","notifications_url":"https://api.github.com/repos/diaspora/diaspora/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/diaspora/diaspora/labels{/name}","releases_url":"https://api.github.com/repos/diaspora/diaspora/releases{/id}","created_at":"2010-09-15T05:20:04Z","updated_at":"2015-09-09T17:22:14Z","pushed_at":"2015-09-09T15:03:58Z","git_url":"git://github.com/diaspora/diaspora.git","ssh_url":"git@github.com:diaspora/diaspora.git","clone_url":"https://github.com/diaspora/diaspora.git","svn_url":"https://github.com/diaspora/diaspora","homepage":"https://diasporafoundation.org/","size":256293,"stargazers_count":10259,"watchers_count":10259,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2656,"mirror_url":null,"open_issues_count":422,"forks":2656,"open_issues":422,"watchers":10259,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/diaspora/diaspora/pulls/6256"},"html":{"href":"https://github.com/diaspora/diaspora/pull/6256"},"issue":{"href":"https://api.github.com/repos/diaspora/diaspora/issues/6256"},"comments":{"href":"https://api.github.com/repos/diaspora/diaspora/issues/6256/comments"},"review_comments":{"href":"https://api.github.com/repos/diaspora/diaspora/pulls/6256/comments"},"review_comment":{"href":"https://api.github.com/repos/diaspora/diaspora/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/diaspora/diaspora/pulls/6256/commits"},"statuses":{"href":"https://api.github.com/repos/diaspora/diaspora/statuses/263dc6f119344b64c690ab4f85ff94a11c756fe5"}}}}