feat: support multiple coordinates and fallback coordinates in event layers (DHIS2-8165) - #2236
Merged
Conversation
turban
marked this pull request as draft
August 6, 2022 11:58
5 failed tests on run #1781 ↗︎Details:
|
||||||||||||||||||||||||||||||||||||||||||
| Test | ||
|---|---|---|
| Data Download > downloads data from a thematic layer |
Screenshot
|
|
| Data Download > downloads data from an event layer |
Screenshot
|
|
filemenu.cy.js • 1 failed test • e2e
| Test | ||
|---|---|---|
| File menu > deletes MAP_TITLE map |
Screenshot
|
|
fetcherrors.cy.js • 1 failed test • e2e
| Test | ||
|---|---|---|
| Fetch errors > error in org units request does not crash app |
Screenshot
|
|
interpretations.cy.js • 1 failed test • e2e
| Test | ||
|---|---|---|
| Interpretations > opens the interpretations panel for a map |
Screenshot
|
|
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.
turban
marked this pull request as ready for review
February 24, 2023 17:04
jenniferarnesen
approved these changes
Mar 1, 2023
dhis2-bot
added a commit
that referenced
this pull request
Mar 1, 2023
# [1.30.0](v1.29.2...v1.30.0) (2023-03-01) ### Features * support multiple coordinates and fallback coordinates in event layers (DHIS2-8165) ([#2236](#2236)) ([6aeb137](6aeb137))
Contributor
|
🎉 This PR is included in version 1.30.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: https://dhis2.atlassian.net/browse/DHIS2-8165
This PR adds support for multiple event coordinates field:
*) Only for programs with enrollment
The same fields are available as a fallback coordinate, in addition the "org unit coordinate" can be a fallback.
We also support cascading fallback coordinates for programs with enrollment:
To see event clustering when testing this branch locally you need to set the glyphs in components/map/MapApi.js:
const glyphs = 'http://localhost:8082/fonts/{fontstack}/{range}.pbf'It is hard to test all the coordinate fields until we get sufficient demo data.
Comments:
buildEventGeometryGetterwas simplified as the event coordinate is only returned in the main "geometry" fieldCoordinate fields for a tracker program:

Fallback coordinates for the same program:

Coordinate fields for a non-tracker program:

Fallback coordinates for the same non-tracker program:

Events from program with "household coordinate" and no fallback:

Events from program with "household coordinate" and cascading fallback:
