Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not display map marker if latitude and longitude are not present on an Encounter #996

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

holmbergius
Copy link
Contributor

This PR fixes a small logical flaw in the display logic of map markers, preventing a marker from being displayed at 0,0 on the map if the Encounter object does not have both a latitude and a longitude.

PR fixes #995

Before you Submit!

  • Is all the text internationalized?
  • If you made a change to the header, did you update the react, jsp, and html?
  • Are all depedencies at a locked version?
  • Did you adhere to best practices?
  • Is there a quick unit test you can add?

@holmbergius holmbergius added the bug something's broken! label Jan 25, 2025
@holmbergius holmbergius requested a review from naknomum January 25, 2025 22:54
@holmbergius holmbergius self-assigned this Jan 25, 2025
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.14%. Comparing base (b798976) to head (6b90c2b).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##              main    #996   +/-   ##
=======================================
  Coverage     0.14%   0.14%           
  Complexity      29      29           
=======================================
  Files          565     565           
  Lines        63363   63363           
  Branches     10982   10982           
=======================================
  Hits            89      89           
  Misses       63255   63255           
  Partials        19      19           
Flag Coverage Δ
backend 0.14% <ø> (ø)
frontend 0.14% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TanyaStere42
Copy link
Member

Just making sure: there's a use case where the location ID has gps rather than the encounter directly, and that still displays, right?

@holmbergius
Copy link
Contributor Author

@TanyaStere42 Excellent question. I dug through encounter.jsp...and I don't see where default locationID coordinates were ever displayed if the Encounter has no GPS but the location ID does in the JSON. I think this was only ever an option in Encounter Search mapped results.

@TanyaStere42
Copy link
Member

That could be a regression? Or it may just be something that has been discussed with a couple of the live platforms for future dev. Not sure which

Copy link
Member

@naknomum naknomum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the conspiracy to hide Null Island continues!
lgtm

@naknomum naknomum merged commit 961a7b5 into main Jan 31, 2025
1 check passed
@naknomum naknomum deleted the issue-995-null-map-mark branch January 31, 2025 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something's broken!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Null GPS coordinates on an Encounter still result in the dispay of a map marker at 0,0
4 participants