<p dir="auto">Embed pages have links to the <em>fixthemap</em> page that have lat/lon/zoom params:<br>
<a href="https://github.com/user-attachments/assets/32f4ac9c-0dc8-4311-a48b-ac5dab3ebbcf">image.png (view on web)</a></p>
<p dir="auto"><a href="https://www.openstreetmap.org/fixthemap?lat=53.25688279713156&lon=-1.4329004287719729&zoom=13" rel="nofollow">Example link</a></p>
<p dir="auto"><em>fixthemap</em> has an <em>Add a Note</em> section with a new note icon that is supposed to be a link:<br>
<a href="https://github.com/user-attachments/assets/e6286464-d694-4864-9e12-0ddb21c23c8d">image.png (view on web)</a></p>
<p dir="auto">But it's not a link because javascript writing it is broken. <code class="notranslate">zoom</code> is used as a string with <code class="notranslate">+</code> operator, concatenation happens instead of addition, and link generation fails.</p>
<p dir="auto">This PR forces zoom to be a number inside <code class="notranslate">OSM.formatHash</code> which is used to generate a link.<br>
<a href="https://github.com/user-attachments/assets/f23548aa-257d-4201-8305-99d6c5bfdd29">image.png (view on web)</a></p>
<p dir="auto">Actually we don't need javascript to write new note links because lat/lon/zoom are available server-side, but I'm not changing that yet.</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/5869'>https://github.com/openstreetmap/openstreetmap-website/pull/5869</a></p>

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5869/commits/fe36264963c008c7989e0ebb2cad0a188abfa807" class="commit-link">fe36264</a>  Add title to "add a note" link on fixthemap page</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5869/commits/12e5841304693ff23b3beb1d8b05d68048758969" class="commit-link">12e5841</a>  Convert zoom to number in OSM.formatHash</li>
</ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5869/files">3 files</a>)</p>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5869/files#diff-a9b88a8a3644f944b9bd54361da588c69fa6a210cf7327194c17895a8ad2b0d6">app/assets/javascripts/osm.js.erb</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5869/files#diff-cba131d6623a3f40ef83f10c6bd946c20e8c5b2eb27c09a9690ad319daf89eb8">app/views/site/fixthemap.html.erb</a>
    (3)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5869/files#diff-4d591c14de81f8af936d8299720e5b70fe47ac2a7dd4b13529faba8211a3ae63">test/system/fixthemap_test.rb</a>
    (11)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5869.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/5869.patch</a></li>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5869.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/5869.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/5869">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLPVPUPCV6VM74MFQQ32XHTMHAVCNFSM6AAAAAB2FTZOQSVHI2DSMVQWIX3LMV43ASLTON2WKOZSHE3DCOJTGI3TOMA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLII7N5GEDXI4CZ73YL2XHTMHA5CNFSM6AAAAAB2FTZOQSWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHLBC4B4I.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/5869</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/5869",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5869",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>