<p dir="auto">This takes <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2825327515" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/5585" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/5585/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/5585">#5585</a> a bit further and drops the separate visibility filtering in favour of ensuring that we always filter for that as part of the initial database query.</p>
<p dir="auto">Technically this creates a slight change in behaviour in that previous nodes which were visible but outside the bounding box would be returned if they were part of an invisible way that had nodes inside the bounding box but that seems like it was more of a bug than a feature.</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/5589'>https://github.com/openstreetmap/openstreetmap-website/pull/5589</a></p>

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5589/commits/7f13a24164c0177f0772090775680cb4bc703200" class="commit-link">7f13a24</a>  Filter out invisible nodes and ways during initial selection</li>
</ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5589/files">1 file</a>)</p>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5589/files#diff-78174c3668c1752d368762fe97c910e6f6806949d9829096844e8791ba1acc32">app/controllers/api/maps_controller.rb</a>
    (16)
  </li>
</ul>

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

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5589">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLPNUISIR27JMX3G3ZL2NXXKJAVCNFSM6AAAAABWKIFLE2VHI2DSMVQWIX3LMV43ASLTON2WKOZSHAZDKNZSGUYDONQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLNQ2B4X6Q47PMXAIQT2NXXKJA5CNFSM6AAAAABWKIFLE2WGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHKQ3JESQ.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/5589</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/5589",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5589",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>