<p>In app/assets/javascripts/params.js:</p>
<pre style='color:#555'>> +    mapParams.lon = parseFloat(params.lon);
> +    mapParams.lat = parseFloat(params.lat);
> +    mapParams.zoom = parseInt(params.zoom || 5);
> +    mapParams.object_zoom = false;
> +  } else if (params.mlon && params.mlat) {
> +    mapParams.lon = parseFloat(params.mlon);
> +    mapParams.lat = parseFloat(params.mlat);
> +    mapParams.zoom = parseInt(params.zoom || 12);
> +    mapParams.object_zoom = false;
> +  } else if (loc = document.cookie.replace(/(?:^|.*;\s*)_osm_location\s*=\s*((?:[^;](?!;))*[^;]?).*/, "$1")) {
> +    loc = loc.split("|");
> +    mapParams.lon = parseFloat(loc[0]);
> +    mapParams.lat = parseFloat(loc[1]);
> +    mapParams.zoom = parseInt(loc[2]);
> +    mapParams.layers = loc[3];
> +  } else if (OSM.home) {
</pre>
<p>Yes, it is a bit crazy, but I'm not sure there is that much that we can unify because the point is that they are (mostly) different rather than redundant.</p>

<p>There may be something we can do about the four or so different ways of passing a location in the url (but back compatibility is a big issue here) but with one exception (bbox vs minlon/minlat/maxlon/maxlat) they all exist for a reason.</p>

<p>Assuming there is nothing in the URL then we look to cookies, then to the user's home location, then to geoip and finally to a fixed default.</p>

            <p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">
              —<br>
              Reply to this email directly or <a href='https://github.com/openstreetmap/openstreetmap-website/pull/94/files#r1597360'>view it on GitHub</a>.
            </p>
            <img src='https://github.com/notifications/beacon/uTRSc6ihLa7Shf84BpiOpmLWAu4oQih75mggZl1E8_kktyfaOsWW6PwqBlSyjcDz.gif' height='1' width='1'>