[openstreetmap/openstreetmap-website] Simplify routing endpoint interface (PR #5064)
Anton Khorev
notifications at github.com
Sun Aug 11 04:27:25 UTC 2024
This is on top of #5062.
Now you only have to call `endpoint.setValue` with a single parameter. The parameter is checked if it's coordinates. If not, geocoding is performed.
No reverse geocoding is done yet.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/5064
-- Commit Summary --
* Remove references to global variables from endpoint drag listener
* Rename route request variable
* Move endpoints code to its own module
* Don't call endpoint.setLatLng() from outside of endpoint module
* Don't set input value from endpoint.setLatLng()
* Make setLatLng a private function
* Remove latlng parameter from endpoint.setValue
* Rename geocodeCallback to changeCallback, call it from latlon setValue
* Remove endpoint.hasGeocode state and related getRoute code
* Move empty value check out of endpoint.getGeocode
* Make getGeocode a private function
-- File Changes --
A app/assets/javascripts/index/directions-endpoint.js (88)
M app/assets/javascripts/index/directions.js (140)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/5064.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5064.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5064
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5064 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240810/d16f8ed0/attachment.htm>
More information about the rails-dev
mailing list