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

widthUnit and radiusUnit not working during conversion to OpenLayers style #824

Open
AlenKelemen opened this issue Oct 5, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@AlenKelemen
Copy link

Description

I am trying to use widthUnit and radiusUnit properties set to 'm' when converting Geostyler styles to OpenLayers styles. However, it seems that these properties are not working as expected, and the resulting OpenLayers style does not reflect the intended units.

Expected behaviour

The converted style in OpenLayers should apply the correct units (e.g., meters) for width and radius properties, when widthUnit ,radiusUnit set to 'm'

How to reproduce

const geostylerStyle = {
  name: 'example',
  rules: [
    {
      name: 'rule 1',
      symbolizers: [
        {
          kind: 'Circle',
          radius: 10,
          radiusUnit: 'm',
          color: '#FF0000'
        }
      ]
    }
  ]
};

const olParser = new GeoStylerOpenlayersParser();
 return olParser.writeStyle(geoStylerStyle)
    .then(({ output: olStyle }) => olStyle)

### Possible Solution

Is there a known limitation regarding widthUnit or radiusUnit properties in the conversion process? If this feature is not implemented, are there any suggested workarounds?

### Additional Context

 versions:

"geostyler-openlayers-parser": "^5.0.0",
 "ol": "^10.1.0",
@AlenKelemen AlenKelemen added the bug Something isn't working label Oct 5, 2024
@jansule
Copy link
Contributor

jansule commented Oct 7, 2024

Thanks for the info @AlenKelemen. The unit properties are currently not supported in the openlayers parser. Adding support for this would be a great improvement. Are you planning on providing a PR for this?

PS: I will move this issue to the geostyler-openlayers-parser repository, since it is an issue with that parser.

@jansule jansule transferred this issue from geostyler/geostyler Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants