[openstreetmap/openstreetmap-website] Fixed displacing points specified from context menu (PR #4904)
Anton Khorev
notifications at github.com
Sat Sep 21 14:10:58 UTC 2024
@AntonKhorev 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) {
Looked at what is already in use by included libraries:
- `let/const` - used by Bootstrap and Turbo
- `?.` - used by Turbo
- template literals - used by Bootstrap and Turbo
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4904#discussion_r1769576577
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4904/review/2319790645 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240921/c6466f26/attachment.htm>
More information about the rails-dev
mailing list