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

#10279: Show credits/attribution text in printed page #10451

Merged
merged 4 commits into from
Jul 5, 2024
Prev Previous commit
Next Next commit
#100279: Show credits/attribution text in printed page (resolve revie…
…w comments)

Description:
- edit clear phrase migration guide file for the added section
- fix FE test for the simplified the method of 'getLayersCredits'
  • Loading branch information
mahmoudadel54 committed Jul 5, 2024
commit d22d9b6094f36ff819a5feba5e119e11b7fa23b1
2 changes: 1 addition & 1 deletion docs/developer-guide/mapstore-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ This is a list of things to check if you want to update from a previous version

Due to showing layers' credits/attributions of printed map which will be displayed at the bottom of the map section, the MapStore `config.yaml` file should be reviewed and updated. Below are reported the relevant changes that need to be applied also to `config.yaml` of MapStore donwstream projects where the printing engine is present.
MV88 marked this conversation as resolved.
Show resolved Hide resolved

- Added a section for credits into config.yaml file at the end of the mainPage for each layout, for more details see [here](https://github.com/geosolutions-it/MapStore2/pull/10451/files#diff-3599ba7c628c7c764665046828bad74c0c8576aad03f5497cf426b59010a6d07R27)
- Added a section for credits into `config.yaml` file at the end of the mainPage for each layout, for more details see [here](https://github.com/geosolutions-it/MapStore2/pull/10451/files#diff-3599ba7c628c7c764665046828bad74c0c8576aad03f5497cf426b59010a6d07R27)
- In this added section, proper values for `absoluteX` and `absoluteY` should be applied to be consistent with overall layout
- There are some edits to the value of `absoluteY` for the section located directly above credit/attribution section based on the layout
mahmoudadel54 marked this conversation as resolved.
Show resolved Hide resolved

Expand Down
2 changes: 1 addition & 1 deletion web/client/utils/PrintUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export function parseCreditRemovingTagsOrSymbol(creditText = "") {
* @memberof utils.PrintUtils
*/
export const getLayersCredits = (layers) => {
const layerCredits = layers.map((layer) => {
const layerCredits = layers.filter(lay => lay?.credits?.title).map((layer) => {
const layerCreditTitle = layer?.credits?.title || '';
const hasOrSymbol = layerCreditTitle.includes('|');
const hasHtmlTag = layerCreditTitle.includes('<');
Expand Down
Loading