[openstreetmap/openstreetmap-website] Reduce individual parsing of number strings (PR #5598)

Marwin Hochfelsner notifications at github.com
Mon Feb 3 15:31:42 UTC 2025


@hlfan commented on this pull request.



>      }
 
     var hash = OSM.parseHash(location.hash);
 
     const loc = Cookies.get("_osm_location")?.split("|");
 
+    function parseBounds({ minlon, minlat, maxlon, maxlat }) {
+      return L.latLngBounds([minlat, minlon], [maxlat, maxlon]);
+    }
+

Would you rather have it called `latLngBoundsFromObject` or do you have a better suggestion?

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

Message ID: <openstreetmap/openstreetmap-website/pull/5598/review/2590275971 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250203/22876eee/attachment.htm>


More information about the rails-dev mailing list