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

auto print legend for AGS_MAP/TILE layers depending on id doesn't work #1580

Closed
Grammostola opened this issue Aug 11, 2022 · 0 comments · Fixed by #1581
Closed

auto print legend for AGS_MAP/TILE layers depending on id doesn't work #1580

Grammostola opened this issue Aug 11, 2022 · 0 comments · Fixed by #1581
Labels

Comments

@Grammostola
Copy link
Contributor

If an AGS_MAP or AGS_TILE type layer is configured in index.json without a style but with the correct id and some name the layer will not automatically receive a print legend (there will simply be the title of the layer and no legend icon/s)

The culprit appears to be the following line in the "getAGSJSONContent()" of print-legend.js:

const legendLayer = json.layers.find((l) => l.layerId === id || l.layerName === id)

where the id of the received json can be a Number and the id argument is a string.

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 a pull request may close this issue.

2 participants