[openstreetmap/openstreetmap-website] Add button for directions from location (PR #5635)

Marwin Hochfelsner notifications at github.com
Sun Feb 9 17:04:18 UTC 2025


@hlfan commented on this pull request.



> @@ -11,7 +11,7 @@ OSM.Search = function (map) {
     e.preventDefault();
     var query = $(this).closest("form").find("input[name=query]").val();
     if (query) {
-      OSM.router.route("/directions?from=" + encodeURIComponent(query) + OSM.formatHash(map));
+      OSM.router.route("/directions?to=" + encodeURIComponent(query) + OSM.formatHash(map));

If I phrase the main goal of this pull request as "I want to get more easily from where I am to where I searched," then this change makes the flow clearer, even though it is not needed when the handler function is implemented the way I propose.
This is also the way it works for every non-OSM map app I tested.

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

Message ID: <openstreetmap/openstreetmap-website/pull/5635/review/2604315752 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250209/885085c4/attachment-0001.htm>


More information about the rails-dev mailing list