geostyler / geostyler-sld-parser

GeoStyler-Style-Parser implementation for SLD
BSD 2-Clause "Simplified" License
51 stars 31 forks source link

Text symbolizer resets color to `#000000` #524

Closed rdewit closed 2 years ago

rdewit commented 2 years ago

Bug

Describe the bug The SLD parser appears to not parse the text color properly and resets it to #000000. This happens with SLDs from QGIS as well as the SLD generated by the demo app.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://geostyler.github.io/geostyler-demo/
  2. Edit Rule 1 to be of Kind: Text and choose a color other than black
  3. Copy the SLD in the Code Editor to clipboard
  4. Reload the page and paste the SLD from clipboard
  5. Observe that the CSS parameter fill in Fill changes from your chosen color to #000000

Expected behavior The SLD parser should recognize the the color and not change it to the default.

Additional context I had a quick glance through the code of the SLD parser and I couldn't immediately see what is going wrong as it tries to extract the fill and fill-opacity from the CSS parameters.

jansule commented 2 years ago

Thanks for the info @rdewit.

@KaiVolland fixed this in https://github.com/geostyler/geostyler-sld-parser/pull/532