[openstreetmap/openstreetmap-website] Fixed displacing points specified from context menu (PR #4904)
Nenad Vujicic
notifications at github.com
Sat Jul 20 15:29:45 UTC 2024
@nenad-vujicic commented on this pull request.
> @@ -402,8 +440,10 @@ OSM.Directions = function (map) {
}
}
- endpoints[0].setValue(params.from || "", from);
- endpoints[1].setValue(params.to || "", to);
+ var ll_from_search_form = decodeURIComponent(location.search).match(/^\?from=([+-]?\d+(\.\d*)?)(?:\s+|\s*[/,]\s*)([+-]?\d+(\.\d*)?)$/);
Yes, it does. It captures the situation when user inputs some coordinates into search field and then pushes "Find directions between two points" button. Earlier, this performed reverse geocoding, now it doesn't do it anymore.
Our idea behind the current solution is "if user enters the coordinates or drags pointers, leave the coordinates. If user right-clicks and selects from context menu, perform reverse geocoding".
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4904#discussion_r1685470457
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4904/review/2190009995 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240720/0d110031/attachment.htm>
More information about the rails-dev
mailing list