[openstreetmap/openstreetmap-website] Increase usage of URLSearchParams (PR #5634)

Holger Jeromin notifications at github.com
Sat Feb 8 19:15:40 UTC 2025


@HolgerJeromin commented on this pull request.



> @@ -124,7 +124,7 @@ OSM.DirectionsEndpoint = function Endpoint(map, input, iconUrl, dragCallback, ch
 
   function getReverseGeocode() {
     var latlng = endpoint.latlng.clone();
-    var reverseGeocodeUrl = OSM.NOMINATIM_URL + "reverse?lat=" + latlng.lat + "&lon=" + latlng.lng + "&format=json";
+    var reverseGeocodeUrl = OSM.NOMINATIM_URL + "reverse?" + new URLSearchParams({ ...latlng, format: "json" });

```suggestion
    const reverseGeocodeUrl = OSM.NOMINATIM_URL + "reverse?" + new URLSearchParams({ ...latlng, format: "json" });
```

And others

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

Message ID: <openstreetmap/openstreetmap-website/pull/5634/review/2604011032 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250208/9d90d40c/attachment.htm>


More information about the rails-dev mailing list