Skip to content

fix(wfs-style): display on map & legend#238

Open
ibrahim-sall wants to merge 2 commits intodevelopfrom
fix/wfs-style
Open

fix(wfs-style): display on map & legend#238
ibrahim-sall wants to merge 2 commits intodevelopfrom
fix/wfs-style

Conversation

@ibrahim-sall
Copy link
Copy Markdown
Member

@ibrahim-sall ibrahim-sall commented Mar 24, 2026

If rg2a was properly passed, it was still falling back to default style. Legend was not able to display correct colors for those.
issue #190

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts feature-type styling so that WFS-provided rgb(a) colors are respected (instead of being coerced into defaults), and updates the legend rendering to correctly display line/polygon styles.

Changes:

  • Accept rgb() / rgba() strings directly in getStyleWebGLDefault (avoid hex conversion fallback).
  • Generate SVG-based legend icons for line and polygon feature types (rather than relying on well-known-name point icons).
  • Use POLYGON_LINE_COLOR as a fallback for missing stroke color in the legend icons.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
src/features/navigation/layers/legends/FeatureTypeLayerLegends.tsx Generates SVG legend icons for line/polygon styles.
src/constants/styles.ts Updates WebGL style color selection to support rgb(a) inputs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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