[openstreetmap/openstreetmap-website] Added km & miles distance selection (#1747)
Jamie Guthrie
notifications at github.com
Tue Feb 13 17:14:36 UTC 2018
Added the option to select between miles and kilometers on the directions page
There is no change in output to what is currently outputted, except for a small change in the rounding on distances between 5000 and 10000m.
Currently 6800m will be displayed as 7km, but with my changes it becomes 6.8km. This is the same for all distances between 5000 and 10000m.
I can make changes so that the formatting is entirely consistent with the current formatting, but it will require a number of if() statements which are probably more hassle than its worth.

You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/1747
-- Commit Summary --
* Added km & miles distance selection
-- File Changes --
M app/assets/javascripts/index/directions.js (44)
M app/assets/stylesheets/common.scss (16)
M app/views/layouts/_search.html.erb (3)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/1747.patch
https://github.com/openstreetmap/openstreetmap-website/pull/1747.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/1747
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20180213/707d2f47/attachment.html>
More information about the rails-dev
mailing list