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

feat: legend support for external layers (DHIS2-3201) #1303

Merged
merged 11 commits into from
Dec 8, 2020
Merged

Conversation

turban
Copy link
Contributor

@turban turban commented Dec 1, 2020

Fixes: https://jira.dhis2.org/browse/DHIS2-3201

This PR adds legend support for external layers. The legend can be a predefined in DHIS2, or a url to a legend image.

This was already supported for external layers in the maintenance app:

Screenshot 2020-12-02 at 12 49 17

Showing a predefined legend and a legend image in the maps app:

Screenshot 2020-12-02 at 12 44 37

We don't control the design of an external layer image - the max-width is adjusted to the container.

The same legends shown for a plugin map (dashboard):

Screenshot 2020-12-02 at 12 45 21

The logic for saving external layers is changed: Before we save the full layer config so we can recreate the layer from the analytical object alone. This is not sufficient when we now start to add additional capabilities to external layers. If the legend is updated this should be reflected on all saved maps using the layer. After this PR we will store the id of the external layer, and then fetch the latest layer config when the map is loading.

@turban turban marked this pull request as draft December 1, 2020 16:49
@turban turban marked this pull request as ready for review December 2, 2020 11:55
@turban turban merged commit 2947dad into master Dec 8, 2020
@turban turban deleted the feat/DHIS2-3201 branch December 8, 2020 09:24
dhis2-bot added a commit that referenced this pull request Dec 8, 2020
# [1.1.0](v1.0.3...v1.1.0) (2020-12-08)

### Features

* legend support for external layers (DHIS2-3201) ([#1303](#1303)) ([2947dad](2947dad))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 1.1.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.

2 participants