[openstreetmap/openstreetmap-website] Fixed displacing points specified from context menu (PR #4904)
David Tsiklauri
notifications at github.com
Tue Aug 6 16:20:06 UTC 2024
@nertc commented on this pull request.
> - geocodeCallback();
- });
+ if (endpoint.latlng.distanceTo(L.latLng(json.lat, json.lon)) > 200.0) {
+ input.val(endpoint.value);
+ } else {
+ endpoint.value = json.display_name;
+ input.val(json.display_name);
+ }
+
+ geocodeCallback();
+ });
+ } else {
+ $.getJSON(OSM.NOMINATIM_URL + "search?q=" + encodeURIComponent(endpoint.value) + "&format=json&viewbox=" + viewbox, function (json) {
+ endpoint.awaitingGeocode = false;
+ endpoint.hasGeocode = true;
+ if (!json || json.length === 0) {
If it needs a separate issue, we can create it, however I didn't mean refactoring of the old code (which definitely would be a separate issue), but to change them in the new code. Also, if somewhere we have coding style guidelines, please, link it and I'll create an issue linked to it.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4904#discussion_r1705810748
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4904/review/2221752135 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240806/298f88eb/attachment.htm>
More information about the rails-dev
mailing list