@AntonKhorev commented on this pull request.


> @@ -178,6 +220,42 @@ $(document).ready(function () {
     }
   }
 
+  function updateHomeLocation() {
+    const lat = $("#home_lat").val().trim();
+    const lon = $("#home_lon").val().trim();
+    if (!lat || !lon) {
+      return;
+    }
+
+    const geocodeUrl = 
`${OSM.NOMINATIM_URL}reverse?format=json&lat=${lat}&lon=${lon}`;

If you only want a country why don't you ask for a country
```suggestion
    const geocodeUrl = 
`${OSM.NOMINATIM_URL}reverse?format=json&lat=${lat}&lon=${lon}&zoom=3`;
```
instead of getting a full address of things you don't care about and then doing 
`.split(",")`?

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

Message ID: 
<openstreetmap/openstreetmap-website/pull/5302/review/2427159...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to