<p>When clicking on search results the respective osm object is loaded asynchronously and afterwards shown on the map. Some objects (e.g. administrative boundaries) can take a few seconds to load (or more). If a user already panned/zoomed the map in the meantime, his actions are reverted when the map fits to the object again. This can be quite annoying.</p>

<p>There is actually no need for this behaviour, because a good geocoder does already return an appropriate bounding box of the search result.</p>

<hr>

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

<h4>Commit Summary</h4>
<ul>
  <li>Do not fit map to search result (object) twice.</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/413/files#diff-0">app/assets/javascripts/index.js</a>
    (2)
  </li>
</ul>

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