<p>I thought it would be helpful to make setting the user's home location much easier, and save having to use the slightly clunky Settings page interface.</p>
<p>Now the user can just right-click anywhere on the map and select "Set home location", and their home location will be updated (provided they are logged in)</p>
<p>The backend process might need reworking a bit (not sure how happy you'll be using an Ajax call - However creating a new valid OSM.Router.route path seemed like a bit of an overkill!)</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/openstreetmap/openstreetmap-website/pull/1868'>https://github.com/openstreetmap/openstreetmap-website/pull/1868</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Add context-menu button</li>
  <li>Stop duplicate Home Location markers being added to map</li>
  <li>Shortern set_home_location method and change Set Home Location Ajax call</li>
  <li>Remove redundant translation</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1868/files#diff-0">app/assets/javascripts/index.js</a>
    (7)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1868/files#diff-1">app/assets/javascripts/index/contextmenu.js</a>
    (16)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1868/files#diff-2">app/controllers/user_controller.rb</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1868/files#diff-3">config/locales/en.yml</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1868/files#diff-4">config/routes.rb</a>
    (3)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/1868.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/1868.patch</a></li>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/1868.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/1868.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1868">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABWnLblf3oaVT8oZwueeu_WtSpilkicHks5tzLYWgaJpZM4UCMKT">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABWnLYa6cemzlzrPTQLYTMsTThrLA7L9ks5tzLYWgaJpZM4UCMKT.gif" height="1" width="1" alt="" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/openstreetmap/openstreetmap-website/pull/1868"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/openstreetmap/openstreetmap-website","title":"openstreetmap/openstreetmap-website","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/openstreetmap/openstreetmap-website"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Add \"Set home location to here\" button on context menu (#1868)"}],"action":{"name":"View Pull Request","url":"https://github.com/openstreetmap/openstreetmap-website/pull/1868"}}}</script>
<script type="application/ld+json">{"@type":"MessageCard","@context":"http://schema.org/extensions","hideOriginalBody":"false","originator":"37567f93-e2a7-4e2a-ad37-a9160fc62647","title":"Add \"Set home location to here\" button on context menu (#1868)","sections":[{"text":"","activityTitle":"**Jamie Guthrie**","activityImage":"https://avatars0.githubusercontent.com/u/4670502?s=160\u0026v=4","activitySubtitle":"@jguthrie100","facts":[]},{"title":"Commit Summary","facts":[{"name":"c1bcf8b","value":"Add context-menu button"},{"name":"bc1806b","value":"Stop duplicate Home Location markers being added to map"},{"name":"4e9845f","value":"Shortern set_home_location method and change Set Home Location Ajax call"},{"name":"1dafbf5","value":"Remove redundant translation"}]},{"title":"File Changes","facts":[{"name":"Modified","value":"[app/assets/javascripts/index.js](https://github.com/openstreetmap/openstreetmap-website/pull/1868/files#diff-0) (7 changes)"},{"name":"Modified","value":"[app/assets/javascripts/index/contextmenu.js](https://github.com/openstreetmap/openstreetmap-website/pull/1868/files#diff-1) (16 changes)"},{"name":"Modified","value":"[app/controllers/user_controller.rb](https://github.com/openstreetmap/openstreetmap-website/pull/1868/files#diff-2) (6 changes)"},{"name":"Modified","value":"[config/locales/en.yml](https://github.com/openstreetmap/openstreetmap-website/pull/1868/files#diff-3) (1 changes)"},{"name":"Modified","value":"[config/routes.rb](https://github.com/openstreetmap/openstreetmap-website/pull/1868/files#diff-4) (3 changes)"}]}],"potentialAction":[{"name":"Add a comment","@type":"ActionCard","inputs":[{"isMultiLine":true,"@type":"TextInput","id":"IssueComment","isRequired":false}],"actions":[{"name":"Comment","@type":"HttpPOST","target":"https://api.github.com","body":"{\"commandName\":\"IssueComment\",\"repositoryFullName\":\"openstreetmap/openstreetmap-website\",\"issueId\":1868,\"IssueComment\":\"{{IssueComment.value}}\"}"}]},{"name":"Close pull request","@type":"HttpPOST","target":"https://api.github.com","body":"{\"commandName\":\"PullRequestClose\",\"repositoryFullName\":\"openstreetmap/openstreetmap-website\",\"pullRequestId\":1868}"},{"targets":[{"os":"default","uri":"https://github.com/openstreetmap/openstreetmap-website/pull/1868"}],"@type":"OpenUri","name":"View on GitHub"},{"targets":[{"os":"default","uri":"https://github.com/openstreetmap/openstreetmap-website/pull/1868.patch"}],"@type":"OpenUri","name":"View patch"},{"targets":[{"os":"default","uri":"https://github.com/openstreetmap/openstreetmap-website/pull/1868.diff"}],"@type":"OpenUri","name":"View diff"},{"name":"Unsubscribe","@type":"HttpPOST","target":"https://api.github.com","body":"{\"commandName\":\"MuteNotification\",\"threadId\":336118419}"}],"themeColor":"26292E"}</script>