<p>This changes the "browse" view of nodes, ways, and relations to use a newly introduced API call named "fordisplay". The "fordisplay" call behaves identical to "full" for visible objects, but for invisible objects will return a previous, visible version of the object, together with either current or previous versions of dependencies. When "fordisplay" returns an object that is not currently visible, it will add a "deleted=true" attribute to the root element of the XML document, enabling the Javascript frontend code responsible for displaying the object on Leaflet to choose another style.</p>
<p>This is how a deleted object is represented on the browse page:</p>
<p><a href="https://cloud.githubusercontent.com/assets/705471/23102876/8fb719c8-f6b1-11e6-9083-deb66126c007.png" target="_blank"><img src="https://cloud.githubusercontent.com/assets/705471/23102876/8fb719c8-f6b1-11e6-9083-deb66126c007.png" alt="deleted" style="max-width:100%;"></a></p>
<p>This pull request fixes the nuisance that if you examine a changeset that deletes an object, and you click on the struck-through object ID, you're stranded with a browse page that doesn't even tell you where the object used to be.</p>
<p>This pull request does not contain implementation of the "fordisplay" API calls in cgimap.</p>
<p>Also, this pull request adds a few fixtures for tests and this introduces one test failure in AmfController that I was unable to understand or fix.</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/1448'>https://github.com/openstreetmap/openstreetmap-website/pull/1448</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Display (a suitable older version of) deleted objects when browsing.</li>
  <li>fix accidental revert of an upstream change</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1448/files#diff-0">app/assets/javascripts/leaflet.map.js</a>
    (18)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1448/files#diff-1">app/assets/javascripts/osm.js.erb</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1448/files#diff-2">app/controllers/node_controller.rb</a>
    (20)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1448/files#diff-3">app/controllers/relation_controller.rb</a>
    (104)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1448/files#diff-4">app/controllers/way_controller.rb</a>
    (25)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1448/files#diff-5">app/models/node.rb</a>
    (11)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1448/files#diff-6">app/models/relation.rb</a>
    (10)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1448/files#diff-7">app/models/way.rb</a>
    (11)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1448/files#diff-8">config/routes.rb</a>
    (3)
  </li>
  <li>
    <strong>D</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1448/files#diff-9">db/structure.sql</a>
    (2689)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1448/files#diff-10">test/controllers/amf_controller_test.rb</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1448/files#diff-11">test/controllers/changeset_controller_test.rb</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1448/files#diff-12">test/controllers/node_controller_test.rb</a>
    (8)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1448/files#diff-13">test/controllers/way_controller_test.rb</a>
    (25)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1448/files#diff-14">test/fixtures/current_nodes.yml</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1448/files#diff-15">test/fixtures/current_ways.yml</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1448/files#diff-16">test/fixtures/nodes.yml</a>
    (12)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1448/files#diff-17">test/fixtures/way_nodes.yml</a>
    (8)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1448/files#diff-18">test/fixtures/ways.yml</a>
    (9)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1448/files#diff-19">test/models/old_node_test.rb</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1448/files#diff-20">test/models/old_way_test.rb</a>
    (4)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/1448.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/1448.patch</a></li>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/1448.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/1448.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/1448">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABWnLSuP3O-dnmkaFwDGRZW3zIzlqwcJks5reEjKgaJpZM4MFd7Q">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABWnLQgPH0fUnZ6YkBz_fHvLZRTnBjnwks5reEjKgaJpZM4MFd7Q.gif" width="1" /></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/1448"></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":"Browse deleted objects (#1448)"}],"action":{"name":"View Pull Request","url":"https://github.com/openstreetmap/openstreetmap-website/pull/1448"}}}</script>