Re: [openstreetmap/openstreetmap-website] Reuse bounds size functions (PR #6076)

2025-06-15 Thread Marwin Hochfelsner via rails-dev
Closed #6076. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6076#event-18154752511 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-dev mailing

Re: [openstreetmap/openstreetmap-website] Reuse bounds size functions (PR #6076)

2025-06-15 Thread Marwin Hochfelsner via rails-dev
@hlfan pushed 2 commits. a99f753870c8abf91b996bc78d7254850fcb8fb3 Directly assign bounds without leaflet c4c9c174c6239593078d15738d943f0f3df8f521 Combine bounds area functions and reduce leaflet dependency -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6076/

Re: [openstreetmap/openstreetmap-website] Reuse bounds size functions (PR #6076)

2025-06-14 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > @@ -369,6 +368,14 @@ L.extend(L.Icon.Default.prototype, { } }); +OSM.boundsArea = function ([[minLat, minLon], [maxLat, maxLon]]) { + const height = maxLat - minLat; + let width = maxLon - minLon; + + if (width < 0) width += 360; This fix

Re: [openstreetmap/openstreetmap-website] Reuse bounds size functions (PR #6076)

2025-06-14 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > @@ -55,10 +55,10 @@ describe("OSM", function () { it("parses bbox params", function () { const expected = L.latLngBounds([57.6247, -3.6845], [57.7247, -3.7845]); let params = OSM.mapParams("?bbox=-3.6845,57.6247,-3.7845,57.7247");

Re: [openstreetmap/openstreetmap-website] Reuse bounds size functions (PR #6076)

2025-06-06 Thread Marwin Hochfelsner via rails-dev
@hlfan commented on this pull request. > @@ -252,7 +247,7 @@ OSM.Query = function (map) { */ function queryOverpass(lat, lng) { const latlng = L.latLng(lat, lng).wrap(), - bounds = map.getBounds().wrap(), + bounds = map.wrapLatLngBounds(map.getBounds()), Removed, p

Re: [openstreetmap/openstreetmap-website] Reuse bounds size functions (PR #6076)

2025-06-06 Thread Marwin Hochfelsner via rails-dev
@hlfan pushed 3 commits. 4ac8b1f95f6d54da415d36c8e24a4067ff3d3c43 Drop unnecessary custom wrap function d183de86d71143a6d9f424e80746220b118e98cf Directly assign bounds without leaflet 2ff145d2192f02edcf62421f7852e33132305859 Combine bounds area functions and reduce leaflet dependency -- View

Re: [openstreetmap/openstreetmap-website] Reuse bounds size functions (PR #6076)

2025-06-06 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > @@ -252,7 +247,7 @@ OSM.Query = function (map) { */ function queryOverpass(lat, lng) { const latlng = L.latLng(lat, lng).wrap(), - bounds = map.getBounds().wrap(), + bounds = map.wrapLatLngBounds(map.getBounds()), What

Re: [openstreetmap/openstreetmap-website] Reuse bounds size functions (PR #6076)

2025-06-04 Thread Marwin Hochfelsner via rails-dev
hlfan left a comment (openstreetmap/openstreetmap-website#6076) > Why do you want to add a Leaflet dependency to the code that doesn't use > Leaflet? Good question, I removed it! -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6

Re: [openstreetmap/openstreetmap-website] Reuse bounds size functions (PR #6076)

2025-06-03 Thread Marwin Hochfelsner via rails-dev
@hlfan pushed 4 commits. bbfae509cbc265fda2a129816d03300687d5d3b7 Ensure comparison with latLngBounds bc65e7ed857ecd97bb3a8e5669d777ba549855ff Drop custom wrap function in favor of wrapLatLngBounds 901bb98d3fea571c4620623624446022b813ebde Directly assign bounds without leaflet 64496d73b1965db0

Re: [openstreetmap/openstreetmap-website] Reuse bounds size functions (PR #6076)

2025-06-03 Thread Anton Khorev via rails-dev
AntonKhorev left a comment (openstreetmap/openstreetmap-website#6076) Why do you want to add a Leaflet dependency to the code that doesn't use Leaflet? -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6076#issuecomment-2935185541

Re: [openstreetmap/openstreetmap-website] Reuse bounds size functions (PR #6076)

2025-06-02 Thread Marwin Hochfelsner via rails-dev
@hlfan pushed 1 commit. eecc9414a91d71e3d6a677fa14b3caca9cad9998 Centralize antimeridian bounds handling -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6076/files/e6d248208a16022c9fe7623de4bba52a6a1d717b..eecc9414a91d71e3d6a677fa14b3caca9cad9998 You are recei

Re: [openstreetmap/openstreetmap-website] Reuse bounds size functions (PR #6076)

2025-06-02 Thread Marwin Hochfelsner via rails-dev
@hlfan pushed 1 commit. e6d248208a16022c9fe7623de4bba52a6a1d717b Centralize antimeridian bounds handling -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6076/files/883c7a6d57a76d73b1c372ce1cd6caf9e8cef805..e6d248208a16022c9fe7623de4bba52a6a1d717b You are recei

Re: [openstreetmap/openstreetmap-website] Reuse bounds size functions (PR #6076)

2025-06-02 Thread Marwin Hochfelsner via rails-dev
@hlfan pushed 4 commits. 1a0a1c47c6d59f07b9d012a34c463d1b9a99f9d6 Reuse error printing 966a5f3916022640f16fe951e5c60797537812e5 Fix bounding box coordinates in OSM.location test d88d39e05ccce9b6722378dcbcbf8282b8321677 Remove unused distance function and its tests 883c7a6d57a76d73b1c372ce1cd6

Re: [openstreetmap/openstreetmap-website] Reuse bounds size functions (PR #6076)

2025-06-01 Thread Marwin Hochfelsner via rails-dev
@hlfan pushed 1 commit. 47913851f0d57ab1068cfec90dda6920f86c5489 Reuse bounds and size functions -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6076/files/9db226ca03bd4a4c5cf09774aba5455a4ae94155..47913851f0d57ab1068cfec90dda6920f86c5489 You are receiving this

Re: [openstreetmap/openstreetmap-website] Reuse bounds size functions (PR #6076)

2025-06-01 Thread Marwin Hochfelsner via rails-dev
hlfan left a comment (openstreetmap/openstreetmap-website#6076) Updated `.getSize()` so `.wrap()` isn't necessary anymore. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6076#issuecomment-2928189028 You are receiving this because

Re: [openstreetmap/openstreetmap-website] Reuse bounds size functions (PR #6076)

2025-06-01 Thread Anton Khorev via rails-dev
AntonKhorev left a comment (openstreetmap/openstreetmap-website#6076) What do you think `.wrap()` on `L.LatLngBounds` does? See https://github.com/openstreetmap/openstreetmap-website/pull/5473#issue-2770179737. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetm

Re: [openstreetmap/openstreetmap-website] Reuse bounds size functions (PR #6076)

2025-06-01 Thread Marwin Hochfelsner via rails-dev
@hlfan pushed 2 commits. 12f9398b6d39d4e05e11f2c3897f7bfcfceb24d9 Reuse error printing 9db226ca03bd4a4c5cf09774aba5455a4ae94155 Reuse bounds and size functions -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6076/files/89b2d81e5b7f5d5bd1e424aabb9ffbfa349e930b.

[openstreetmap/openstreetmap-website] Reuse bounds size functions (PR #6076)

2025-06-01 Thread Marwin Hochfelsner via rails-dev
Reuse more utilities instead of redoing from scratch. You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/openstreetmap-website/pull/6076 -- Commit Summary -- * Reuse error printing * Reuse bounds and size functions -- File Changes -- M ap