<p>Fixes <a href="https://github.com/openstreetmap/openstreetmap-website/issues/417" class="issue-link" title="Can't remove Nominatim result highlight">#417</a></p>

<hr>

<h4>You can merge this Pull Request by running</h4>
<pre>  git pull https://github.com/jfirebaugh/openstreetmap-website 417</pre>
<p>Or view, comment on, or merge it at:</p>
<p>  <a href='https://github.com/openstreetmap/openstreetmap-website/pull/419'>https://github.com/openstreetmap/openstreetmap-website/pull/419</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Refactor search JS</li>
  <li>Hide search marker/object when closing sidebar</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/419/files#diff-0">app/assets/javascripts/index.js</a>
    (69)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/419/files#diff-1">app/assets/javascripts/index/search.js</a>
    (61)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/419/files#diff-2">app/assets/javascripts/leaflet.extend.js.erb</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/419/files#diff-3">app/views/site/_home_link.html.erb</a>
    (9)
  </li>
</ul>

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