Skip to content

Conversation

@jtroberts
Copy link
Member

@jtroberts jtroberts commented Apr 21, 2025

Purpose

  • Display custom marker icons in the legend.

Proposed Changes

  • Adds ShapeImage and ShapeIcon fields to display custom marker icons in the legend

Issues

Testing

  • Tested with png and svg icons in the ShapeImage and ShapeIcon fields for vector and vector tile layers (I don't think this would apply to other layer types). Tested removing ShapeImage and ShapeIcon values to make sure regular Shapes still work.

@jtroberts jtroberts requested a review from tariqksoliman April 21, 2025 22:24
- Removes shapeOverride field
- shapeIcon will use mdi icons for the legend
- shapeImage will use a URL to a .png or .svg for the legend
@jtroberts jtroberts changed the title Adds a Shape Override to display custom marker icons in the legend Adds ShapeImage and ShapeIcon fields to display custom marker icons in the legend Apr 23, 2025
- Color the shape icon rather than background
- Removed triangle as a special case (apparently it was never handled)
Copy link
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.

Minor change: could you support more possible file formats:

String(shape).toLowerCase().match(/\.(jpeg|jpg|gif|png|svg|webp)$/) != null

@sonarqubecloud
Copy link

Copy link
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.

LGTM! Thanks

@jtroberts jtroberts merged commit ec18e13 into development Apr 29, 2025
2 checks passed
@jtroberts jtroberts deleted the jr-657 branch April 29, 2025 01:39
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.

3 participants