<p></p>
<p><b>@AntonKhorev</b> commented on this pull request.</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5736#discussion_r2035135113">app/assets/javascripts/osm.js.erb</a>:</p>
<pre style='color:#555'>> @@ -93,6 +100,11 @@ OSM = {
mapParams.lon = params.get("mlon");
mapParams.lat = params.get("mlat");
mapParams.zoom = params.get("zoom") || 12;
+ } else if (geoURI.has("geo") && geoURI.has("u") && !geoURI.has("z")) {
+ mapParams.bounds = L.latLng(geoURI.get("geo").split(",")).toBounds(geoURI.get("u") * 4);
+ } else if (geoURI.has("geo")) {
+ [mapParams.lat, mapParams.lon] = geoURI.get("geo").split(",");
+ mapParams.zoom = geoURI.getAll("z").reduce((out, cur) => parseInt(cur, 10) || out, 12);
</pre>
<p dir="auto">Because you won't give up on merging different parameters, you are:</p>
<ul dir="auto">
<li>reading zoom off the geouri parameters, despite it's not defined there and you can't know what it means if you find it</li>
<li>treating 0 as an invalid zoom value</li>
<li>reading <code class="notranslate">u</code> from url parameters, again not knowing what it means; try <code class="notranslate">geo:60,30?u=no</code></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/5736#pullrequestreview-2753090704">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLLKJ6DAOYDC54VHVAT2YT5NZAVCNFSM6AAAAABYDP55XWVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDONJTGA4TANZQGQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLJ2AZBZQJK2FQ2MEED2YT5NZA5CNFSM6AAAAABYDP55XWWGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTVEDDKJA.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/5736/review/2753090704</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/5736#pullrequestreview-2753090704",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5736#pullrequestreview-2753090704",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>