@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/2319790...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev