### Description Fixes #6639 The dashboard map markers were previously rendered in the order they appeared in the DOM (which matches the text list order). This caused visual z-order issues where "Northern" markers (background) were sometimes drawn on top of "Southern" markers (foreground) if they appeared later in the list.
This PR fixes the issue by: 1. Collecting all user data from the DOM first. 2. Sorting the users by latitude in descending order (North to South). 3. Adding the markers to the map in this sorted order. This ensures that Northern markers are always rendered first (in the background) and Southern markers are rendered last (in the foreground), preserving the correct visual perspective. **Screenshot (After Fix):** <img width="1023" height="557" alt="image (2)" src="https://github.com/user-attachments/assets/0673fa49-bab9-4bea-bfb7-c3c9c2f28a98" /> ### How has this been tested? I tested this locally in the development environment: 1. Created two users with overlapping coordinates using the Rails console: * **User A (Friend):** Latitude `51.501` (North) * **User B (Me):** Latitude `51.5` (South) 2. Verified on the Dashboard map that **User B (South)** is correctly drawn **in front of** User A (North). You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/openstreetmap-website/pull/6654 -- Commit Summary -- * Fix incorrect z-order of dashboard map markers (fixes #6639) -- File Changes -- M app/assets/javascripts/dashboard.js (18) -- Patch Links -- https://github.com/openstreetmap/openstreetmap-website/pull/6654.patch https://github.com/openstreetmap/openstreetmap-website/pull/6654.diff -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6654 You are receiving this because you are subscribed to this thread. Message ID: <openstreetmap/openstreetmap-website/pull/[email protected]>
_______________________________________________ rails-dev mailing list [email protected] https://lists.openstreetmap.org/listinfo/rails-dev
