[openstreetmap/openstreetmap-website] Add profile location (PR #5302)
Anton Khorev
notifications at github.com
Mon Nov 11 12:21:52 UTC 2024
@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/2427159022 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20241111/5a4391df/attachment.htm>
More information about the rails-dev
mailing list