Skip to content

Use a prerendered image for the layer legend#722

Merged
jtroberts merged 2 commits intodevelopmentfrom
jr-658
Aug 4, 2025
Merged

Use a prerendered image for the layer legend#722
jtroberts merged 2 commits intodevelopmentfrom
jr-658

Conversation

@jtroberts
Copy link
Copy Markdown
Member

Purpose

  • Use a prerendered image for the layer legend

Proposed Changes

  • Allow a URL to an image in the existing "Legend From URL" configuration field for all valid layer types
  • Check if legend URL is a valid image
  • Display the image from the legend URL as the layer's legend graphic

Issues

Testing

@jtroberts jtroberts requested a review from tariqksoliman July 30, 2025 01:13
Copy link
Copy Markdown
Member

@tariqksoliman tariqksoliman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! One issue I see, and I this may be because I don't have many long legend items, but the legends from images are too small:

34673467

Could you perhaps add another configuration option to say how wide the image section is, or perhaps take the image width from the image and force the img to be that width (up until some max-width)?

Thanks!

@jtroberts
Copy link
Copy Markdown
Member Author

I went with the second option and adjusted the legend width to match the image width up to a max-width of 300px. This looks better to me.

Two vertical legends:
Screenshot 2025-07-31 at 7 30 40 PM

Bunch of legends:
Screenshot 2025-07-31 at 7 31 42 PM

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Aug 1, 2025

Copy link
Copy Markdown
Member

@tariqksoliman tariqksoliman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thanks!

@jtroberts jtroberts merged commit eb256c7 into development Aug 4, 2025
2 checks passed
@jtroberts jtroberts deleted the jr-658 branch August 4, 2025 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants