[OSM-dev] Too many decimal places in permalinks

Tom Hughes tom at compton.nu
Tue Oct 23 10:25:07 BST 2007

In message <4714CFF7.1080000 at arjam.net>
        Robert Munro <rjmunro at arjam.net> wrote:

> I noticed the other day that the permalinks on the view tab of
> www.openstreetmap.org have way more decimal places than is useful.
> Below is a little (untested) patch to site.js that should make the links
> much shorter. It rounds the numbers to the (current zoom level)/3
> decimal places, which at zoom level 2 (the worst case) is accurate to
> less than 3 pixels - zoom level 2 is:
>  (1024 pixels wide)/(360 degrees)= 2.8 pixels/degree.

Applied and deployed.


Tom Hughes (tom at compton.nu)

More information about the dev mailing list