[openstreetmap/openstreetmap-website] Improves displaying lat, lon values close to 0.0 (PR #4956)

Nenad Vujicic notifications at github.com
Fri Jul 5 16:14:37 UTC 2024


This PR addresses issue about using exponential instead of standard for latitudes and longitudes close to 0.0 in search results described in #4950

Fixes #4950. Improved result_to_html routine by detecting latitude and longitude values close to 0.0 and replacing their representation (exponential) with standard, by calculating number of required decimals (by looking at the position of decimal point if available) and generating standard representation.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/4956

-- Commit Summary --

  * Improves displaying lat, lon values close to 0.0

-- File Changes --

    M app/helpers/geocoder_helper.rb (35)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/4956.patch
https://github.com/openstreetmap/openstreetmap-website/pull/4956.diff

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

Message ID: <openstreetmap/openstreetmap-website/pull/4956 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240705/c2800471/attachment-0001.htm>


More information about the rails-dev mailing list