{"action":"created","comment":{"url":"https://api.github.com/repos/emberjs/guides/pulls/comments/57271102","id":57271102,"diff_hunk":"@@ -0,0 +1,301 @@\n+In Super Rentals, we want the ability to provide directions from where the renter is located to his or her various rental options.\n+To accomplish this, we need to make use of the browser's native geolocation API to determine our current location,\n+as well as interface with google's map and geocoding API to display directions.\n+\n+To implement this feature, we are going to take advantage of several Ember concepts:\n+\n+1. A component to display a google map with directions.\n+2. Utility functions to interface with Google APIs.\n+3. A service to keep track of the browser's current location.\n+\n+### Making Google Maps Available in Ember\n+\n+There are several ways to include 3rd party libraries in Ember. See the guides section on [managing dependencies](../../addons-and-dependencies/managing-dependencies/) as a starting point when you need to add one.\n+\n+Since Google provides its map API as a remote script, we'll use curl to download it into our project's vendor directory.\n+\n+```shell\n+curl -o vendor/gmaps.js https://maps.googleapis.com/maps/api/js?v=3.22\n+```\n+Once in the vendor directory, the script can be built into our app.\n+We'll just need to import it in our build file.\n+\n+```ember-cli-build.js\n+/*jshint node:true*/\n+/* global require, module */\n+var EmberApp = require('ember-cli/lib/broccoli/ember-app');\n+\n+module.exports = function(defaults) {\n+  var app = new EmberApp(defaults, {\n+    // Add options here\n+  });\n+\n+  // Use `app.import` to add additional libraries to the generated\n+  // output files.\n+  //\n+  // If you need to use different assets in different\n+  // environments, specify an object as the first parameter. That\n+  // object's keys should be the environment name and the values\n+  // should be the asset to use in that environment.\n+  //\n+  // If the library that you are including contains AMD or ES6\n+  // modules that you would like to import into your application\n+  // please specify an object with the list of modules as keys\n+  // along with the exports of each module as its value.\n+  app.import('vendor/gmaps.js');","path":"source/localizable/tutorial/location-service.md","position":45,"original_position":45,"commit_id":"42c1677322697b289f833f942e864e17b9d88370","original_commit_id":"42c1677322697b289f833f942e864e17b9d88370","user":{"login":"acorncom","id":802505,"avatar_url":"https://avatars.githubusercontent.com/u/802505?v=3","gravatar_id":"","url":"https://api.github.com/users/acorncom","html_url":"https://github.com/acorncom","followers_url":"https://api.github.com/users/acorncom/followers","following_url":"https://api.github.com/users/acorncom/following{/other_user}","gists_url":"https://api.github.com/users/acorncom/gists{/gist_id}","starred_url":"https://api.github.com/users/acorncom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acorncom/subscriptions","organizations_url":"https://api.github.com/users/acorncom/orgs","repos_url":"https://api.github.com/users/acorncom/repos","events_url":"https://api.github.com/users/acorncom/events{/privacy}","received_events_url":"https://api.github.com/users/acorncom/received_events","type":"User","site_admin":false},"body":"This would be a great use of the esoteric syntax for annotating lines added:\r\n\r\nember-cli-build.js{+4,+5,+6}\r\n\r\nSee it in action at the bottom of this page: https://guides.emberjs.com/v2.4.0/getting-started/quick-start/","created_at":"2016-03-24T03:34:46Z","updated_at":"2016-03-24T03:34:46Z","html_url":"https://github.com/emberjs/guides/pull/1289#discussion_r57271102","pull_request_url":"https://api.github.com/repos/emberjs/guides/pulls/1289","_links":{"self":{"href":"https://api.github.com/repos/emberjs/guides/pulls/comments/57271102"},"html":{"href":"https://github.com/emberjs/guides/pull/1289#discussion_r57271102"},"pull_request":{"href":"https://api.github.com/repos/emberjs/guides/pulls/1289"}}},"pull_request":{"url":"https://api.github.com/repos/emberjs/guides/pulls/1289","id":60696144,"html_url":"https://github.com/emberjs/guides/pull/1289","diff_url":"https://github.com/emberjs/guides/pull/1289.diff","patch_url":"https://github.com/emberjs/guides/pull/1289.patch","issue_url":"https://api.github.com/repos/emberjs/guides/issues/1289","number":1289,"state":"open","locked":false,"title":"Add a Services-centric tutorial","user":{"login":"toddjordan","id":3609063,"avatar_url":"https://avatars.githubusercontent.com/u/3609063?v=3","gravatar_id":"","url":"https://api.github.com/users/toddjordan","html_url":"https://github.com/toddjordan","followers_url":"https://api.github.com/users/toddjordan/followers","following_url":"https://api.github.com/users/toddjordan/following{/other_user}","gists_url":"https://api.github.com/users/toddjordan/gists{/gist_id}","starred_url":"https://api.github.com/users/toddjordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toddjordan/subscriptions","organizations_url":"https://api.github.com/users/toddjordan/orgs","repos_url":"https://api.github.com/users/toddjordan/repos","events_url":"https://api.github.com/users/toddjordan/events{/privacy}","received_events_url":"https://api.github.com/users/toddjordan/received_events","type":"User","site_admin":false},"body":"Addresses issue #1019\r\nI actually went for extra credit here and created 2 services, one for google maps functionality and one for geolocation.  I'm willing to back down on geolocation if that's too much.\r\n\r\nAlso, screenshot I added has a little style added.  I mentioned in the text that I did this, but I don't know if it will make people sad to follow the tutorial and not have it styled like the picture. I can do a couple things with this:\r\n1. throw in the styles I added to app.css to the tutorial so the the follow can make it look like the screenshot.\r\n2. remove the style and show it ugly","created_at":"2016-02-25T15:30:31Z","updated_at":"2016-03-24T03:34:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7e31a6dec0418de049018e7a438d342240d9e332","assignee":{"login":"locks","id":32344,"avatar_url":"https://avatars.githubusercontent.com/u/32344?v=3","gravatar_id":"","url":"https://api.github.com/users/locks","html_url":"https://github.com/locks","followers_url":"https://api.github.com/users/locks/followers","following_url":"https://api.github.com/users/locks/following{/other_user}","gists_url":"https://api.github.com/users/locks/gists{/gist_id}","starred_url":"https://api.github.com/users/locks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/locks/subscriptions","organizations_url":"https://api.github.com/users/locks/orgs","repos_url":"https://api.github.com/users/locks/repos","events_url":"https://api.github.com/users/locks/events{/privacy}","received_events_url":"https://api.github.com/users/locks/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/emberjs/guides/pulls/1289/commits","review_comments_url":"https://api.github.com/repos/emberjs/guides/pulls/1289/comments","review_comment_url":"https://api.github.com/repos/emberjs/guides/pulls/comments{/number}","comments_url":"https://api.github.com/repos/emberjs/guides/issues/1289/comments","statuses_url":"https://api.github.com/repos/emberjs/guides/statuses/42c1677322697b289f833f942e864e17b9d88370","head":{"label":"toddjordan:maps-service-tutorial","ref":"maps-service-tutorial","sha":"42c1677322697b289f833f942e864e17b9d88370","user":{"login":"toddjordan","id":3609063,"avatar_url":"https://avatars.githubusercontent.com/u/3609063?v=3","gravatar_id":"","url":"https://api.github.com/users/toddjordan","html_url":"https://github.com/toddjordan","followers_url":"https://api.github.com/users/toddjordan/followers","following_url":"https://api.github.com/users/toddjordan/following{/other_user}","gists_url":"https://api.github.com/users/toddjordan/gists{/gist_id}","starred_url":"https://api.github.com/users/toddjordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toddjordan/subscriptions","organizations_url":"https://api.github.com/users/toddjordan/orgs","repos_url":"https://api.github.com/users/toddjordan/repos","events_url":"https://api.github.com/users/toddjordan/events{/privacy}","received_events_url":"https://api.github.com/users/toddjordan/received_events","type":"User","site_admin":false},"repo":{"id":39234886,"name":"guides","full_name":"toddjordan/guides","owner":{"login":"toddjordan","id":3609063,"avatar_url":"https://avatars.githubusercontent.com/u/3609063?v=3","gravatar_id":"","url":"https://api.github.com/users/toddjordan","html_url":"https://github.com/toddjordan","followers_url":"https://api.github.com/users/toddjordan/followers","following_url":"https://api.github.com/users/toddjordan/following{/other_user}","gists_url":"https://api.github.com/users/toddjordan/gists{/gist_id}","starred_url":"https://api.github.com/users/toddjordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toddjordan/subscriptions","organizations_url":"https://api.github.com/users/toddjordan/orgs","repos_url":"https://api.github.com/users/toddjordan/repos","events_url":"https://api.github.com/users/toddjordan/events{/privacy}","received_events_url":"https://api.github.com/users/toddjordan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/toddjordan/guides","description":"The source for http://guides.emberjs.com","fork":true,"url":"https://api.github.com/repos/toddjordan/guides","forks_url":"https://api.github.com/repos/toddjordan/guides/forks","keys_url":"https://api.github.com/repos/toddjordan/guides/keys{/key_id}","collaborators_url":"https://api.github.com/repos/toddjordan/guides/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/toddjordan/guides/teams","hooks_url":"https://api.github.com/repos/toddjordan/guides/hooks","issue_events_url":"https://api.github.com/repos/toddjordan/guides/issues/events{/number}","events_url":"https://api.github.com/repos/toddjordan/guides/events","assignees_url":"https://api.github.com/repos/toddjordan/guides/assignees{/user}","branches_url":"https://api.github.com/repos/toddjordan/guides/branches{/branch}","tags_url":"https://api.github.com/repos/toddjordan/guides/tags","blobs_url":"https://api.github.com/repos/toddjordan/guides/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/toddjordan/guides/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/toddjordan/guides/git/refs{/sha}","trees_url":"https://api.github.com/repos/toddjordan/guides/git/trees{/sha}","statuses_url":"https://api.github.com/repos/toddjordan/guides/statuses/{sha}","languages_url":"https://api.github.com/repos/toddjordan/guides/languages","stargazers_url":"https://api.github.com/repos/toddjordan/guides/stargazers","contributors_url":"https://api.github.com/repos/toddjordan/guides/contributors","subscribers_url":"https://api.github.com/repos/toddjordan/guides/subscribers","subscription_url":"https://api.github.com/repos/toddjordan/guides/subscription","commits_url":"https://api.github.com/repos/toddjordan/guides/commits{/sha}","git_commits_url":"https://api.github.com/repos/toddjordan/guides/git/commits{/sha}","comments_url":"https://api.github.com/repos/toddjordan/guides/comments{/number}","issue_comment_url":"https://api.github.com/repos/toddjordan/guides/issues/comments{/number}","contents_url":"https://api.github.com/repos/toddjordan/guides/contents/{+path}","compare_url":"https://api.github.com/repos/toddjordan/guides/compare/{base}...{head}","merges_url":"https://api.github.com/repos/toddjordan/guides/merges","archive_url":"https://api.github.com/repos/toddjordan/guides/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/toddjordan/guides/downloads","issues_url":"https://api.github.com/repos/toddjordan/guides/issues{/number}","pulls_url":"https://api.github.com/repos/toddjordan/guides/pulls{/number}","milestones_url":"https://api.github.com/repos/toddjordan/guides/milestones{/number}","notifications_url":"https://api.github.com/repos/toddjordan/guides/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/toddjordan/guides/labels{/name}","releases_url":"https://api.github.com/repos/toddjordan/guides/releases{/id}","deployments_url":"https://api.github.com/repos/toddjordan/guides/deployments","created_at":"2015-07-17T04:29:07Z","updated_at":"2016-01-18T20:37:17Z","pushed_at":"2016-03-18T18:23:36Z","git_url":"git://github.com/toddjordan/guides.git","ssh_url":"git@github.com:toddjordan/guides.git","clone_url":"https://github.com/toddjordan/guides.git","svn_url":"https://github.com/toddjordan/guides","homepage":null,"size":27785,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"emberjs:master","ref":"master","sha":"92efab6e66057f6295e9fd0ece0681b3a3d31b0e","user":{"login":"emberjs","id":1253363,"avatar_url":"https://avatars.githubusercontent.com/u/1253363?v=3","gravatar_id":"","url":"https://api.github.com/users/emberjs","html_url":"https://github.com/emberjs","followers_url":"https://api.github.com/users/emberjs/followers","following_url":"https://api.github.com/users/emberjs/following{/other_user}","gists_url":"https://api.github.com/users/emberjs/gists{/gist_id}","starred_url":"https://api.github.com/users/emberjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emberjs/subscriptions","organizations_url":"https://api.github.com/users/emberjs/orgs","repos_url":"https://api.github.com/users/emberjs/repos","events_url":"https://api.github.com/users/emberjs/events{/privacy}","received_events_url":"https://api.github.com/users/emberjs/received_events","type":"Organization","site_admin":false},"repo":{"id":22767401,"name":"guides","full_name":"emberjs/guides","owner":{"login":"emberjs","id":1253363,"avatar_url":"https://avatars.githubusercontent.com/u/1253363?v=3","gravatar_id":"","url":"https://api.github.com/users/emberjs","html_url":"https://github.com/emberjs","followers_url":"https://api.github.com/users/emberjs/followers","following_url":"https://api.github.com/users/emberjs/following{/other_user}","gists_url":"https://api.github.com/users/emberjs/gists{/gist_id}","starred_url":"https://api.github.com/users/emberjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emberjs/subscriptions","organizations_url":"https://api.github.com/users/emberjs/orgs","repos_url":"https://api.github.com/users/emberjs/repos","events_url":"https://api.github.com/users/emberjs/events{/privacy}","received_events_url":"https://api.github.com/users/emberjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/emberjs/guides","description":"The source for http://guides.emberjs.com","fork":false,"url":"https://api.github.com/repos/emberjs/guides","forks_url":"https://api.github.com/repos/emberjs/guides/forks","keys_url":"https://api.github.com/repos/emberjs/guides/keys{/key_id}","collaborators_url":"https://api.github.com/repos/emberjs/guides/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/emberjs/guides/teams","hooks_url":"https://api.github.com/repos/emberjs/guides/hooks","issue_events_url":"https://api.github.com/repos/emberjs/guides/issues/events{/number}","events_url":"https://api.github.com/repos/emberjs/guides/events","assignees_url":"https://api.github.com/repos/emberjs/guides/assignees{/user}","branches_url":"https://api.github.com/repos/emberjs/guides/branches{/branch}","tags_url":"https://api.github.com/repos/emberjs/guides/tags","blobs_url":"https://api.github.com/repos/emberjs/guides/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/emberjs/guides/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/emberjs/guides/git/refs{/sha}","trees_url":"https://api.github.com/repos/emberjs/guides/git/trees{/sha}","statuses_url":"https://api.github.com/repos/emberjs/guides/statuses/{sha}","languages_url":"https://api.github.com/repos/emberjs/guides/languages","stargazers_url":"https://api.github.com/repos/emberjs/guides/stargazers","contributors_url":"https://api.github.com/repos/emberjs/guides/contributors","subscribers_url":"https://api.github.com/repos/emberjs/guides/subscribers","subscription_url":"https://api.github.com/repos/emberjs/guides/subscription","commits_url":"https://api.github.com/repos/emberjs/guides/commits{/sha}","git_commits_url":"https://api.github.com/repos/emberjs/guides/git/commits{/sha}","comments_url":"https://api.github.com/repos/emberjs/guides/comments{/number}","issue_comment_url":"https://api.github.com/repos/emberjs/guides/issues/comments{/number}","contents_url":"https://api.github.com/repos/emberjs/guides/contents/{+path}","compare_url":"https://api.github.com/repos/emberjs/guides/compare/{base}...{head}","merges_url":"https://api.github.com/repos/emberjs/guides/merges","archive_url":"https://api.github.com/repos/emberjs/guides/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/emberjs/guides/downloads","issues_url":"https://api.github.com/repos/emberjs/guides/issues{/number}","pulls_url":"https://api.github.com/repos/emberjs/guides/pulls{/number}","milestones_url":"https://api.github.com/repos/emberjs/guides/milestones{/number}","notifications_url":"https://api.github.com/repos/emberjs/guides/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/emberjs/guides/labels{/name}","releases_url":"https://api.github.com/repos/emberjs/guides/releases{/id}","deployments_url":"https://api.github.com/repos/emberjs/guides/deployments","created_at":"2014-08-08T18:25:02Z","updated_at":"2016-03-23T20:33:37Z","pushed_at":"2016-03-24T03:30:33Z","git_url":"git://github.com/emberjs/guides.git","ssh_url":"git@github.com:emberjs/guides.git","clone_url":"https://github.com/emberjs/guides.git","svn_url":"https://github.com/emberjs/guides","homepage":null,"size":28908,"stargazers_count":187,"watchers_count":187,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":622,"mirror_url":null,"open_issues_count":64,"forks":622,"open_issues":64,"watchers":187,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/emberjs/guides/pulls/1289"},"html":{"href":"https://github.com/emberjs/guides/pull/1289"},"issue":{"href":"https://api.github.com/repos/emberjs/guides/issues/1289"},"comments":{"href":"https://api.github.com/repos/emberjs/guides/issues/1289/comments"},"review_comments":{"href":"https://api.github.com/repos/emberjs/guides/pulls/1289/comments"},"review_comment":{"href":"https://api.github.com/repos/emberjs/guides/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/emberjs/guides/pulls/1289/commits"},"statuses":{"href":"https://api.github.com/repos/emberjs/guides/statuses/42c1677322697b289f833f942e864e17b9d88370"}}}}