[openstreetmap/openstreetmap-website] Change zoom precision function (PR #5084)

Anton Khorev notifications at github.com
Fri Aug 16 16:27:58 UTC 2024


`ceil( log10(2**(8+zoom) / 180) )`

`2**(8+zoom)` = world size in pixels
`180` = span of latitude values
`2**(8+zoom) / 180` = number of pixels in one degree. If there are 100 pixels in one degree, you need log10(100) = 2 fractional digits to represent a degree value for a given pixel offset

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5084#issuecomment-2293804377
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5084/c2293804377 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240816/a9cff826/attachment.htm>


More information about the rails-dev mailing list