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

Holger Jeromin notifications at github.com
Sun Feb 9 06:27:35 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" });

I would migrate all lines you change.
But whatever. 

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

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


More information about the rails-dev mailing list