[openstreetmap/openstreetmap-website] Refactor more of the internal coordiante usage to `{ lat, lng }` (PR #7039)

Marwin Hochfelsner notifications at github.com
Sun Apr 26 16:27:03 UTC 2026


@hlfan commented on this pull request.



> @@ -70,10 +70,9 @@ $(function () {
     map.on("click", function (e) {
       if (!$("#updatehome").is(":checked")) return;
 
-      const [lat, lon] = OSM.cropLocation(e.lngLat, map.getZoom() + 1);
-
+      const { lat, lng } = OSM.cropLocation(L.latLng(e.lngLat.lat, e.lngLat.lng), map.getZoom() + 1);

Is casting `e.lngLat` necessary here?

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

Message ID: <openstreetmap/openstreetmap-website/pull/7039/review/4177153696 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260426/1bdd18d4/attachment.htm>


More information about the rails-dev mailing list