Skip to content

feat: support multiple coordinates and fallback coordinates in event layers (DHIS2-8165) - #2236

Merged
turban merged 43 commits into
masterfrom
feat/DHIS2-8165
Mar 1, 2023
Merged

feat: support multiple coordinates and fallback coordinates in event layers (DHIS2-8165)#2236
turban merged 43 commits into
masterfrom
feat/DHIS2-8165

Conversation

@turban

@turban turban commented Aug 6, 2022

Copy link
Copy Markdown
Contributor

Fixes: https://dhis2.atlassian.net/browse/DHIS2-8165

This PR adds support for multiple event coordinates field:

  • Event coordinate
  • Enrollment coordinate *
  • Tracked entity coordinate *
  • Program stage data elements of type coordinates
  • Program tracked entity attributes of type coordinate *

*) 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:

  • Enrollment > event > tracked entity > org unit coordinate

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:

  • The check for "spatialSupport" was removed as PostGIS is now a DHIS2 requirement (= all instances have spatial support)
  • buildEventGeometryGetter was simplified as the event coordinate is only returned in the main "geometry" field

Coordinate fields for a tracker program:
Screenshot 2023-02-24 at 18 29 24

Fallback coordinates for the same program:
Screenshot 2023-02-24 at 18 30 47

Coordinate fields for a non-tracker program:
Screenshot 2023-02-24 at 18 31 48

Fallback coordinates for the same non-tracker program:
Screenshot 2023-02-24 at 18 32 53

Events from program with "household coordinate" and no fallback:
Screenshot 2023-02-24 at 18 34 23

Events from program with "household coordinate" and cascading fallback:
Screenshot 2023-02-24 at 18 35 34

@turban
turban marked this pull request as draft August 6, 2022 11:58
@cypress

cypress Bot commented Aug 6, 2022

Copy link
Copy Markdown

5 failed tests on run #1781 ↗︎

5 31 17 0 Flakiness 0

Details:

Merge branch 'master' into feat/DHIS2-8165
Project: maps Commit: 61b00a6c23
Status: Failed Duration: 07:41 💡
Started: Mar 1, 2023 10:22 AM Ended: Mar 1, 2023 10:29 AM
Failed  dataDownload.cy.js • 2 failed tests • e2e

View Output Video

Test
Data Download > downloads data from a thematic layer Screenshot
Data Download > downloads data from an event layer Screenshot
Failed  filemenu.cy.js • 1 failed test • e2e

View Output Video

Test
File menu > deletes MAP_TITLE map Screenshot
Failed  fetcherrors.cy.js • 1 failed test • e2e

View Output Video

Test
Fetch errors > error in org units request does not crash app Screenshot
Failed  interpretations.cy.js • 1 failed test • e2e

View Output Video

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
turban marked this pull request as ready for review February 24, 2023 17:04
@turban turban changed the title feat: provide access to enrollment coordinates for event layers feat: support multiple coordinates and fallback coordinates in event layers (DHIS2-8165) Feb 24, 2023
@turban
turban merged commit 6aeb137 into master Mar 1, 2023
@turban
turban deleted the feat/DHIS2-8165 branch March 1, 2023 10:38
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))
@dhis2-bot

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.30.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants