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

[TASK-1199] Fix geo-points not displaying in map #5206

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

pauloamorimbr
Copy link
Contributor

@pauloamorimbr pauloamorimbr commented Oct 29, 2024

Checklist

  1. If you've added code that should be tested, add tests
  2. If you've changed APIs, update (or create!) the documentation
  3. Ensure the tests pass
  4. Run ./python-format.sh to make sure that your code lints and that you've followed our coding style
  5. Write a title and, if necessary, a description of your work suitable for publishing in our release notes
  6. Mention any related issues in this repository (as #ISSUE) and in other repositories (as kobotoolbox/other#ISSUE)
  7. Open an issue in the docs if there are UI/UX changes
  8. Create a testing plan for the reviewer and add it to the Testing section
  9. Add frontend or backend tag and any other appropriate tags to this pull request

Description

This PR fixes a bug where sometimes the geo-points are not properly plotted in form > data > map

Notes

Issue was in map.es6:

  • The buildMarkers function did not have submissions data set when called
  • The issue was due to the async nature of setState
  • buildMarkers was being called right after the setState, so the state wasn't yet ready when the function was executed.
  • To fix it, buildMarkers (and buildHeatMap) were moved to the callback of setState function, so they'll have the data to be processed.

Testing

  • Create a form with a GeoPoint, Line or Area question
  • Save + deploy the form
  • Collect data with either Enketo or Collect
  • Go to Data → Maps
  • The submitted points should now be properly plotted in the map

Copy link

@magicznyleszek magicznyleszek self-requested a review October 29, 2024 07:01
@pauloamorimbr pauloamorimbr merged commit 6d239d8 into main Oct 29, 2024
7 checks passed
@pauloamorimbr pauloamorimbr deleted the task-1199-bug-map-does-not-show-geo-points branch October 29, 2024 12:59
@tiritea tiritea changed the title [TASK-1199] Fix geo-points now displaying in map [TASK-1199] Fix geo-points not displaying in map Oct 31, 2024
@tf2024TN
Copy link

I'm sorry to inform you that the issue still persists on the Kobotoolbox site until now. I cannot view my data on the map for the new form I created last Thursday, October 24, 2024. It worked on the same day, but unfortunately, not this week. I also tried with my previous projects to troubleshoot the problem, but the same issue occurs: when I click on the map, I receive the message, "No geopoint response received." Please keep me updated on the resolution of this issue.

@magicznyleszek
Copy link
Member

I'm sorry to inform you that the issue still persists on the Kobotoolbox site until now. I cannot view my data on the map for the new form I created last Thursday, October 24, 2024. It worked on the same day, but unfortunately, not this week. I also tried with my previous projects to troubleshoot the problem, but the same issue occurs: when I click on the map, I receive the message, "No geopoint response received." Please keep me updated on the resolution of this issue.

Although this PR got merged, I don't think it was deployed to the servers yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants