[openstreetmap/openstreetmap-website] Add coordinate precision function (PR #5581)
Marwin Hochfelsner
notifications at github.com
Fri Jan 31 04:41:11 UTC 2025
The amount of `latlng.lat/lng.toFixed(precision)` calls has been bugging me.
I've put a function next to OSM.zoomPrecision that outputs a latlng array that can be destructured, spread and `join`ed.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/5581
-- Commit Summary --
* Add coordinate precision function
-- File Changes --
M app/assets/javascripts/index/contextmenu.js (35)
M app/assets/javascripts/index/directions-endpoint.js (8)
M app/assets/javascripts/index/directions.js (16)
M app/assets/javascripts/index/query.js (7)
M app/assets/javascripts/index/search.js (7)
M app/assets/javascripts/leaflet.map.js (22)
M app/assets/javascripts/osm.js.erb (17)
M app/assets/javascripts/user.js (8)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/5581.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5581.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5581
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5581 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250131/13043f7f/attachment.htm>
More information about the rails-dev
mailing list